Accessing ADC6 and ADC7

I've built a small board using an ATMega88 in a 32 pin TQFP package which gives me the much needed ADC6 and ADC7. All the Arduino code is working fine except for being able to read in the analog voltages on both ADC6 and ADC7 (the other ADCs work perfectly).

I realize that I must be missing something simple in a configuration as the standard chips don't include the extra ports in the DIP packages.

Can anyone lead me in the proper direction?

Thank you.

Yes - you need to edit pins_arduino.c and add the missing pins. I know just enough here to be dangerous

These line references are from pins_arduino.c from arduino-0021. -0022 looks the same.

Line 354 starts the 168/328 pin assignments.

After 402, you'll need to add 2 more pins After 425, you'll need to add 2 more pins After 463, you'll need to add 2 more pins.

Now the tricky part - what to call those pins and where to add them between 358 & 379? They are called ADC6 & 7 on the datasheet. But they analog input only. Guess you could try calling them C6 & C7 (since C0-C5 are the other analog pins) & see what happens. Make you keep a copy of your original.

Tried everything that you suggested, but no joy. I just can't seem to get a response from the ADC6 and ADC7 pins. Any other thoughts would be most helpful.


  Serial.println (analogRead (6)) ;
  Serial.println (analogRead (7)) ;

should work...