sumberg / kex_japan_2018

Comparison of methods for controlling legacy hardware from a modern micro-controller
GNU General Public License v3.0
2 stars 0 forks source link

[#14] Atmega328 PORTD as output pins #15

Closed sumberg closed 6 years ago

sumberg commented 6 years ago

Parent issue: #14

Set the PORTD as output pins. See this.

TEST: Use LEDS to confirm that each pin behaves accordingly.

PORTD Bit/Pin name Pin number
PD0 2
PD1 3
PD2 4
PD3 5
PD4 6
PD5 11
PD6 12
PD7 13
sieken commented 6 years ago

Used delay library to write a test program for PORTD, and while the delay functionality seems to be a bit off on timing (probably related to F_CPU define), the program indicates that all the pins are set as ouput, and writing to PORTD sets the value of the output pins properly.