NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Setting Pin Low
March 09, 2011 by dgikuljot ![]() |
According to the nerdkits guide this is how you set a pin to output ground or low:
Is my method good also, or is it bad for mcu in any way. Thanks, Kuljot Dhami |
---|---|
March 09, 2011 by esoderberg ![]() |
dgikuljot, See page 58 of NK guide. Say for example PC3 is high and all else on PORTC off, then PORTC = 00000100 and what your code does is: PORTC = 00000100 | 00000000 = 00000100. IE PC3 still high, so I don't think your method will work as you intend. Eric |
Please log in to post a reply.
Did you know that Pulse Width Modulation (PWM) can be used to control the speed of a motor digitally? Learn more...
|