Reply by David Snowdon July 10, 20032003-07-10
G'Day,

It seems this is the problem in some way shape or form - I wrote a
software SPI implementation that matched the ADS8341 data sheet timing
diagram, and it works very well indeed (apart from the obvious speed
problem!).

I find it surprising that TI sells two incompatible products (or am I
missing something??).

Talk to you soon,

Dave.

Beginning Microcontrollers with the MSP430

Reply by Karl Adler July 8, 20032003-07-08
If this helps, download the software SPI to talk to a D/A (DAC7513) from
www.microtrendsys.com. site .
Karl.
Reply by Ralph Hilton July 8, 20032003-07-08
On Tue, 8 Jul 2003 11:57:33 -0500 you wrote:

>Have you tried using the CKPH bit in the U0TCTL register.
>
>Also, regarding 16 bit resolution ... if your signal is noisy (larger than
>the LSB's), and if speed is not an issue, you can possibly take 12 bit
>readings and add them to get 16 bit resolution. For example two 12 bit
>readings added yields 13 bit resolution, four 12 bit readings added yields
>14 bit resolution, eight 12 bit readings added yields 15 bit resolution,
>etc. ... if the signal is noisier than the LSB's.

Sadly it doesn't work that way. 2 x 12 bit doesn't give 13 in practice.

The frequencies of the noise and other factors which I won't spend 30 mins
detailing prevent that.

To get 16 bits I would suggest using a 24 bit chip - they hardly cost more
than 16 bit ones.

Oversample and over-specify and you get a rock steady 16 bits for a couple
of extra dollars.


--
Ralph Hilton
Reply by July 8, 20032003-07-08
Hi,

> What on earth is a beautifier and a semantic checker?! I'm guessing the
> concurrent versions system is to do with version control. I think I might
> know what a disassembler is! ;-)

a beautifier/prettyprinter prints/beautyfies the code due to the syntax.
One example ist

for(foor;foo<limit1;foo++){do_somethin();do_another_thing();}

indent prettypints this (without parameters) with this result:

for (foo = bar; foo < limit1; foo++)
{
do_somethin ();
do_another_thing ();
}

Languages like ruby are inverse, because the semantic is influenced from the printing.

A semantic checker checks the semantic and complains about bad things like dead code, uninitialised variables (especially pointers), possible buffer overflows, possible infinite loops. possible access behind the boundaries of a field etc..

The CVS is for version control and open source. You can find many software for CVS line MetaCVS and WinCVS.

Regards

Rolf F.
Reply by Robert Wood July 8, 20032003-07-08
>> Yeah... This is exactly what it does. Have you had no joy either? <<

Nope. If I get an answer on how to do it, I'll let you know. I am waiting for
a reply from Epic on whether it's possible.

>> I'm considering writing a software SPI implementation to look at the bits coming back manually, just to see whether it makes a difference. At least then I have full control over what does what. <<

I'm considering using an AVR with on board EEPROM instead! ;-)

>> I thought this part of the project was going to be easy! <<

Me too! I spent about ten hours on it yesterday and have given up 'til I get a
response from TI.

And yes, I tried all four variations of CKPH and CKPL!

Cheers,

Rob
Reply by Eisenbeis, Clyde [EPM/MTN] July 8, 20032003-07-08
Have you tried using the CKPH bit in the U0TCTL register.

Also, regarding 16 bit resolution ... if your signal is noisy (larger than
the LSB's), and if speed is not an issue, you can possibly take 12 bit
readings and add them to get 16 bit resolution. For example two 12 bit
readings added yields 13 bit resolution, four 12 bit readings added yields
14 bit resolution, eight 12 bit readings added yields 15 bit resolution,
etc. ... if the signal is noisier than the LSB's.

Clyde Eisenbeis
Reply by David Snowdon July 8, 20032003-07-08
G'Day Rob,

Yeah... This is exactly what it does. Have you had no joy either? I'm
considering writing a software SPI implementation to look at the bits
coming back manually, just to see whether it makes a difference. At
least then I have full control over what does what.

I thought this part of the project was going to be easy!

Talk to you soon,

Dave.
Reply by Robert Wood July 8, 20032003-07-08
>> I'm using an MSP430F149 to interface to an ADS8341 (also from TI). I've used exactly the same code on an Atmel AVR with the same ADC, and it works very well. I'm very confused about what the problem could be here. <<

Does the ADS8341 output the data out on the negative going clock edge and
expect the processor to latch it in on the positive clock edge? If so, I'm
not sure it'll work. I'm having a similar problem with an EEPROM. It simply
won't work because the MSP430 seems to clock data in on the negative edge for
mode 0. If you reverse the mode to 1,1 it doesn't help, because the slave
device also inverts polarity.

Bah!

I'm waiting for a response from TI on this, but these things always take
forever to answer.

Cheers,

Rob.
Reply by David Snowdon July 8, 20032003-07-08
G'Day,

I'm presently working on a project which requires an ADC to be
interfaced to an MSP430 (I need a 16-bit or so ADC rather than the
MSP's built in 12-bit since its for some fairly precise
instrumentation).

I'm using an MSP430F149 to interface to an ADS8341 (also from TI). I've
used exactly the same code on an Atmel AVR with the same ADC, and it
works very well. I'm very confused about what the problem could be here.

I'm setting the SPI interface up in the following manner, which I
_think_ makes the SPI interface match the way the ADS8341 is expecting
it.



I'm having all sorts of issues trying to get the system to work. But
yeah... Works fine with an AVR, so all I can think it can be is the SPI
interface.

I'm sort of at a loss. I've looked at the data coming out of the
ADS8341 on a CRO and it looks reasonable to me... the SPI interface
seems to be giving the wrong numbers (given the waveform).

I'm using the same SPI code to communicate with a CAN controller
(MCP2510) on the other USART, and it is working very well.

If any of you have had any experience with it or ideas about what it
could be, I'd be really interested to hear from you! (I'm feeling
pretty stuck at the moment).

The application is a current/voltage sensing system in a solar powered
car.

Talk to you soon,

Dave.