Closed GoogleCodeExporter closed 8 years ago
On the more advanced chips (168, 328), writing a 1 to the PIN register (LED_PIN
vs LED_PORT) causes the output state to toggle. It's buried in the datasheet
somewhere.
Original comment by wes...@gmail.com
on 19 Sep 2014 at 5:37
Got it on the datasheet thank you for your answer :
Three I/O memory address locations are for each port :
– PORTx, Data Direction Register
– DDRx, and the Port Input Pins
– PINx. The Port Input Pins I/O location is read only
While the Data Register and the Data Direction Register are read/write.
However, writing a logic one to a bit in the PINx Register, will result in a
toggle in the corresponding bit in the Data Register.
This is what says the datasheet. I like the point :
"Is Read Only" but writing to it do an action (toggle) ;-)
Original comment by ch.hall...@gmail.com
on 19 Sep 2014 at 4:49
Original issue reported on code.google.com by
ch.hall...@gmail.com
on 16 Sep 2014 at 11:26