[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] ADC sample code in C
From: |
James Washer |
Subject: |
Re: [avr-gcc-list] ADC sample code in C |
Date: |
Tue, 22 Nov 2005 17:25:15 -0800 |
mega8 or so.. internal... yes, I can imagine polling external would be a pain.
- jim
On Wed, 23 Nov 2005 06:45:07 +1030
Matthew Smith <address@hidden> wrote:
> James Washer wrote:
> > I'm looking for a small piece of sample C source code for playing with the
> > ADC to get me started. Anyone have anything they'd like to share?
>
> Which device? Internal or external ADC? I'm pretty sure that I saw an
> application note or similar at AVR Freaks for using an internal ADC. If
> it's an external one, you'd be on your own and will need to read the ADC
> datasheet.
>
> Last word on external ADCs, at least ones with a byte-wide interface -
> if it's got an interrupt out pin (end of conversion), connect it to an
> interrupt in on the AVR and handle it with an ISR; DON'T connect it to
> GPIO and try to poll it! (Guess how I know this...)
>
> Cheers
>
> M
>
> --
> Matthew Smith
> Kadina Business Consultancy, South Australia
> Work: <http://www.kbc.net.au> Personal: <http://www.mss.cx>
>
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>