Go Down

Topic: Arduino Mega 2560 Comparator (Read 109 times) previous topic - next topic

dragospuri

Hello,

Can someone explain to me why the AIN0 (the positive input) of the ATmega2560 comparator does not have an Arduino Pin? So basically your only option is Bandgap Ref.

But I need to have my own signals on both of the inputs. Works great on a Nano or UNO. Wanted to get more RAM so I bought a Mega without checking this... *sigh*
Is it even possible to solder a wire on that pin?

WHY?! Why not connect it?

CrossRoads

Designer's choice option at time of creation.
Check the pins to the left & right of it, see if connected to a header pin.  Then just add a little flux and solder to the adjacent pin.
If not, can add a wire to take it to another pin. Use a really fine/small tip to do it.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

dragospuri

Unfortunately the adjacent pins are Digital Pin 1 (TX0) - and since I'm using USB communication I can't use this one because it would trigger the comparator - and Digital Pin 5 (AIN1) - which is the other comparator input, so can't be used either.

Good idea though.

westfw

Quote
WHY?!
Easy enough: The official Arduino environment does not support the comparator peripheral...
(that may be an unfortunate decision on their part, but ... that seems to be the way it is.)

dragospuri

Well, I don't see why they did on the UNO or Nano and they don't on the Mega.

Anyway, I managed to solder a thin wire from a pair of headphones to the ATmega2560 pin and connect it to the  "Reserved" (unused) pin on the Power side of the Arduino board.

westfw

FYI: The Seeedunino MEGA (http://www.seeedstudio.com/depot/Seeeduino-Mega-p-717.html) connects both analog comparator inputs to pins...

dragospuri

It's kind of expensive...

Also, it uses an FTDI chip. I've been having problems with them being too slow. Surprisingly (or not?), the CH340 chip works a lot better.

Thanks for the info though.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy