Hi everyone!
I'm working on a blinking-lights project, where the twist is that the blinking is to be controlled over wifi using ESP8266 modules to receive data. My project has come to the point where I can receive data over wifi -> UART/serial into the ATMEGA16, which then blinks the LEDs on the STK500 (PORTB).
Next, I want to change the AVR to ATMEGA88 -- simply because they are smaller, and I have a whole bunch of them (I aim to make several receiver unit to run in parallel). However, changing the device proves to be quite involved. I realize there are many differences between these two hardware architectures, and I have compared the datasheets to update the UART init, but I just can't seem to get the ATMEGA88 to run "at all". It's proofs of life should be: light up LEDs on the STK and/or transmit something over UART (to the ESP, which I intercept through the RS232 SPARE and to a terminal on my PC). Nothing!
To isolate the problem, I created the following bare-bones ATMEGA88 project, which does not light up any LEDs:
#include <avr/io.h> int main(void) { DDRB = 0xFF; // set PORTB for output PORTB = 0b01111111; // crash indicator (LED 7) /* Replace with your application code */ while (1) { } }
Plase find attached a photo of the setup on my STK. Also, reading fuses and programming/verifying the HEX works fine in Atmel Studio.
Thanks!
Joakim