View Single Post
Old 12-07-2010, 08:04 PM   #9 (permalink)
FalconFour
EcoModding Lurker
 
FalconFour's Avatar
 
Join Date: Sep 2010
Location: Fresno, CA
Posts: 78

LEAF - '11 Nissan LEAF
Thanks: 4
Thanked 9 Times in 7 Posts
There are 6 analog inputs.

There are 3 buttons attached to the analog inputs on the MPGuino.

That leaves 3 unused analog pins on the MPGuino board.

And since the analog-input pins on the ATMega are directly connected to the pins on the Arduino board... that means you can just directly attach to them and address them.

I guess since you needed me to clarify this, you'll also need me to clarify which pins on the ATmega to solder to... :P



Bam. Connect SCL and SDA to analog pins 1 and 2, and use the standard Wire library, far as I can figure. No need for all that direct port access stuff... plus, PORTA...PORTC are direct access to the digital pins, I think something else is used to interact with the analog pins... and I think data is "written" to the analog inputs by switching the pull-up resistors on and off. I think.
  Reply With Quote