avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] ADC usage on AT90S4433


From: Michael Jin
Subject: RE: [avr-gcc-list] ADC usage on AT90S4433
Date: Fri, 10 May 2002 09:47:40 -0400

Hi,

I think the problem is that the "&&" in the "while((unsigned
char)(inp(ADCSR)&& (1<<ADSC))){" statement should be "&" instead. Both
conditions are always met, so that it loop forever.


-----Original Message-----
From: address@hidden [mailto:address@hidden
Behalf Of Joerg Wunsch
Sent: Friday, May 10, 2002 7:59 AM
To: address@hidden
Subject: Re: [avr-gcc-list] ADC usage on AT90S4433


Urs Seiler <address@hidden> wrote:

> Function "blink" lights a light for a short while. This happens
> three times, in other words twice before the loop and one before the
> ADC starts but it does never come out of the while loop in
> function"readADC".

I can't see an obvious error in your code.

In my demo program at ftp://ftp.ifbus.de/pub/j_wunsch/avr-demo.zip
you can find a simple use of an interrupt-controlled ADC channel
on the '4433 chip.  You could give it a try to see whether your
chip works correctly, and if so, use it as the base of your design
if you want.

--
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]