LPC932 dual slope AtoD

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


Has anyone any practical experience of building a dual slope AtoD using a
Philips P89LPC932 micro? I have read the Philips app note about this so it
certainly seems possible. I don't need much resolution and a few samples
per second would suffice - I am only reading the pots in a joystick on a
wheelchair. The app note gives example code for a sigma delta method but
that is unnecessarily complex for this application. Anyone have any dual
slope application code for this micro they can share.

Ian

Re: LPC932 dual slope AtoD



Ian Bell wrote:
Quoted text here. Click to load it

Two paths spring to mind:
- Look at the LPC935/938, and even the LPC9381 - these have ADCs almost
for free.

- The PWMs in these devices make good DACs, and with a simple LPF, and
the comparitor, you then create a tracking ADC. This can give over 8 bit
precision, by dithering the DAC LSB, or you can weighted-parallel two
PWMs, for very high precision DACs. We have done the latter using
the Timer-Similar Atmel LP2052.
-jg


Re: LPC932 dual slope AtoD



Quoted text here. Click to load it

Yes, I looked at the 935. Unfortunately we have an mcb900 sbc with a 932
fitted and as a charity we prefer not to spend money if we can avoid it. In
fact the 932 is soldered to the board so changing it means buying a
complete board.

Quoted text here. Click to load it

I had already thought of using one of the PWM outputs in the 932 for this.
However, we need two PWM outputs for dc motor drives and it is not clear to
me from the 932 data sheet if all four CCUs can be used independently.

Ian


Re: LPC932 dual slope AtoD


Ian Bell schrieb:

Quoted text here. Click to load it

I have done dual slope ADCs with several other '51 devices. This will
surely be portable to the 932. You need several external parts
(reference, integrator OP, multiplexer - cheapest parts like TL431,
TLC272 and 4051 are OK).
For details, you can contact me at info (a) autometer dot de.

--
Dipl.-Ing. Tilmann Reh
http://www.autometer.de - Elektronik nach Ma.

Re: LPC932 dual slope AtoD


Hi Ian,

have you considered the LPC935?  with 8bit ADC or the LPC938 with 8bit ADC?

OR you have a bunch of LPC932(A1)'s on hand?


JG

Quoted text here. Click to load it



Re: LPC932 dual slope AtoD



Quoted text here. Click to load it

I have just the one 932 in a Keil mcb900 board. I am doing this project for
a charity so I have to keep costs to a minimum. I am sure it can be done -
there's even a Philips app note but no code examples. I was hoping to short
cut the work via an example or two.

Ian

Re: LPC932 dual slope AtoD


On Mon, 06 Mar 2006 11:02:19 +0000, the renowned Ian Bell

Quoted text here. Click to load it

I've often used dual slope and similar types to get 15 bits or so
resolution at high accuracy, but for a joystick a single slope
converter would probably be just fine. Create a voltage ramp, start it
at time 0 and measure how long it takes to equal the voltage threshold
with a hardware timer. Do it alternately with a reference voltage
rather than the unknown and you can cancel out many of the analog
errors (by calculating the quotient), but it's probably not necessary
for a joystick.  


Best regards,
Spehro Pefhany
--
"it's the network..."                          "The Journey is the reward"
snipped-for-privacy@interlog.com             Info for manufacturers: http://www.trexon.com
We've slightly trimmed the long signature. Click to see the full one.
Re: LPC932 dual slope AtoD



Quoted text here. Click to load it

Thanks for the reply. I have seen accurate dual slope techniques used in
weigh scales for example so as you say a simple single slope should do for
my low resolution joystick. Thanks for confirming my own thinking.

Ian

Re: LPC932 dual slope AtoD


And once again me ;-)
Did you consider using the LPC935 or 938 basically the same device but
with real AtoD. Afaik they are pin and code compatible.

Schwob

Ian Bell wrote:
Quoted text here. Click to load it


Re: LPC932 dual slope AtoD



Quoted text here. Click to load it

Ian,

I wrote some code to scale a pot for a PIC16C84. It should be possible to
use the technique.

I used it to read a joystick. It uses a ratio technique, so removes the
component tolerence problems.

http://www.doug.h.rice.btinternet.co.uk/vtmr/read_pot.htm

Doug



Re: LPC932 dual slope AtoD


Quoted text here. Click to load it

  Nice site Doug. I book marked an all that.

David



Site Timeline