NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Interupts with a button
July 15, 2011 by jasongillikin |
Just curious what the correct code is for using the interupt pins with a button... what Do I call the Pin??? is it PIND |=(1<<PD3); OR is it PORTD |= (1<<PCINT19); OR Both, or Either... None maybe? Thanks for the help Jason |
---|---|
July 16, 2011 by BobaMosfet |
Download the ATMEGA168 Data sheet (you can search on google), and it will explain how you address pins. BM |
July 16, 2011 by Noter |
Write to PORTD and read from PIND. Either PD3 or PCINT19 is fine because they are both defined iom168p.h with a value of 3. |
Please log in to post a reply.
Did you know that essentially all power supplies' voltages drop when current is drawn from them? Learn more...
|