NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » ADC6 and ADC7 on ATmega328p

October 03, 2010
by tucker
tucker's Avatar

Hey all,

I'm putting together a device that needs 8 channels of analog data for the ATmega328p. Looking at the pin configuration for the PDIP (the Nerdkits chip) however, I only see ADC0 through ADC5. What are the pins for the remaining 2 channels from the ADC? Are there any special considerations when using them? I searched for ATmega328p ADC6 and ADC7, but couldn't find much.

Application: 6 degree of freedom inertial measurement unit with 2 redundant accelerometer channels and 1Hz GPS data. First accelerometer and GPS chip are in place and reading well via the ADC and double-buffered serial input, respectively. If I have to remove the redundant channels, I could, but they would certainly be helpful!

  • Tucker
October 03, 2010
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Tucker,

The ATmeg328 (and 168) in the DIP package only have 6 ADC channels. There do exist external ADC chips that you an connect and communicate with over SPI, or you could just use two ATmegas and communicate with between them with something like SPI.

Humberto

October 03, 2010
by tucker
tucker's Avatar

That's what I needed to know. I'll drop the redundant channels for now. Thanks Humberto!

Tucker

October 04, 2010
by Ralphxyz
Ralphxyz's Avatar

Tucker, please post your code for the accelerometer and GPS both of which I am planning future projects.

What accelerometer are you using? You could either dump the code inline on the forum or use

the paste bin.

Thanks,

Ralph

Post a Reply

Please log in to post a reply.

Did you know that you can make a capacitive proximity sensor with some aluminum foil and paperclips? Learn more...