Bit of an update here. I fiddled around with it a bit more last night and it looks like, for whatever reason, the code isn't executing.
When i was practicing on my breadboard a while back, I noticed the LED wouldn't come on after I uploaded the hex file to the micro. It's pretty much the very first line of code, not counting configuration, so I didn't see any reason why it would fail. I thought maybe I blew up my microcontroller, so I tried code from Sparkfun which essentially makes an LED blink and it worked perfectly fine (required a minor circuit change).
Yesterday in an attempt to determine if i destroyed my servo, I used the same blinking LED program but this time I attached my servo to the pin where the LED was supposed to be and I noticed it would rotate, stop, rotate, stop, etc as expected.
Now I need to figure out why the commands in the Admin's tutorial doesn't play nice with my microcontroller. I've tried both writing and compiling the code myself and also uploading the pre-made HEX file and neither of them work. So today's job will be trying to figure out why some code that seems to work for everyone doesn't play nice with the Atmega88PA (or perhaps MY atmega88PA).
So far, my first two thoughts are this:
Sparkfun sets the value of the port/bit differently than SoR. Sparkfun basically sets all the values at once whereas it looks like SoR uses some bitwise operations to turn on/off a specific bit on the port
Sparkfun - [PORTD = 0xFF],
SoR - [#define PORT_ON( port_letter, number ) port_letter |= (1<<number)]
My second idea is the Makefile. The only real difference I see in the Makefile between the two projects is the CPU frequency and the MCU. But I'm not sure how much that would affect the HEX File.
- MCU: Sparkfun sets the MCU to Atmega168, while SoR sets it to Atmega8.
- F_CPU: Sparkfun sets it to 8000000, Sor = 3686400