external ADs

Questions on other types of hardware and getting it talking to the ARM CPU
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

external ADs

Post by YahooArchive »

--- In ARMexpress@yahoogroups.com, "basicnode" <bruce@...> wrote:
> The LPC2103 ADC can be programmed to repetitively do conversions,
> check the User Manual and specifically the BURST bit. You would have
> to write directly to the registers to set up this operation.

I'll read up on BURT next; I did see an example using BURST for
multiple channels
http://www.standardics.nxp.com/support/ ... tn06004.pd\
f

> You could poll on the DONE bit while the conversions are in process,
> or the ADC can be setup to interrupt after each conversion.
>
> Next would be handling the interrupts. So in C this can be readily
> done.

I generally find that I need to avoid polling to be able to get
anything else done, so I'll read the man section on ADC again
http://www.standardics.nxp.com/support/ ... user.manua\
l.lpc2101.lpc2102.lpc2103.pdf
pages 185+, for other's reference

> In BASIC, it would require using an untested/undocumented
> feature that was added to be included in a future release. There are
> 4 general purpose interrupts that can be assigned by the user to this
> type of task. At present this feature is untested and no sample code
> exists, but if you want to be the guinea pig to try this out contact
> me offline.

That might be good to try; I'll let you know once I get the other
concepts straightened out.



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: external ADs

Post by YahooArchive »

Good day, folks.

I have a rate gyro device. It has both SPI IO and analog IO. I am getting my
back-side kicked with respect to talking to it serially. So, in the interests
of moving forward, I want to use the analog output.

The spec reads that it is +/- 1.89v with respect to Vdd/2. Vdd is 4.81vdc at
the sensor. That makes the analog output range of .515VDC at one extreem (-75
deg/sec), to 2.405VDC with no rate sensed, to 4.295VDC at the other extreem (+75
deg/sec) (serially the reported range is +/- 300 deg/sec).

Now, I want to make the input to the AD ins on the ARMmite swing from 0 to
3.3VDC, in order to get max resolution of 10 bits, correct?

What would you folks suggest that would allow me to interface to the analog
output on the device in a manner that yields max resolution, but with little
saturation, so that I can get max range out of it too?

As info, I have uploaded the datasheet to the files section - see
CRS10_Datasheet.zip for the CRS-10 Rate Gyro Specs & Data.

Please let me know, when able and convenient. Thank you.

-t

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: external ADs

Post by YahooArchive »

Tod, Have you tried SHIFTIN/SHIFTOUT ? This has a lot more options than SPI. I
have used this successfully for a couple of serial I/O devices that did not seem
to work with SPI. Note the #defines for clock polarity and timing. You'll do a
lot better with a digital interface than with the ARMite ADC. It seems to be
very difficult to keep the noise level low. The effective resolution is a lot
less than 10 bits unless you can average.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: external ADs

Post by YahooArchive »

Hi there, Richard.

Thank you for your time and suggestions. I finally licked the serial comms
problems very very early this morning - @ ~0300hrs (ugh.!.). I ended up having
two issues:

I was errorneously allowing CSEL to go back high between bytes (that was a
simple oversight on my behalf), and

The Sensor's SPI Mode of operations is actually different that I had been coding
for. My initial efforts were focused around a high clock idle state as depicted
on the timing chart, however, upon detailed review of the Interface
Specification that accompanied the timing chart, it clearly asserts that the
clock idle state is low. Once I corrected that, and changed my bit-banged
routines around a bit with setting the MISO/MOSI bits at the correct time WRT
this new clock implementation, I was able to get it to sing happily with the
ARMmite.

Woo Hoo! At any rate, I'd still like to know how to affect the Analog Voltage
Re-Scaling as described below. If anyone has the knowledge of the best way to
do this, I'd surely appreciate it. I was initially thinking a simple voltage
divider network, but then got to thinking that the dynamics of it might require
the use of silicon, in addition to carbon... Any suggestions are welcomed.
TIA.

Take care.

-t

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: external ADs

Post by YahooArchive »

During my search of possible solution for scaling an analog voltage (as
discussed in a different thread), I came a cross a good document, and possibly a
site that may yield a lot of other gems for us hobbyists who dabble in
uber-geekery... :-)

The text is available here:
http://www.scribd.com/doc/7266136/Analo ... processors

You can save it locally via the 'More' drop-down on the GUI.

Enjoy!

-t

Post Reply