#includeint main (void) { DDRB = 0xFF; // Set all LEDs as output PORTB |= 0xFF; // the LED }
Hi guys, I was testing my atmega32 development board with the above code to glow the LED's that are connected to PB4, PB5, PB6, PB7.
After I flash the code using avrdude, I dont see the LEDs glow at all. If I check the Port B's pins with a multimeter, I read around 3.5V on the pins 4,5,6,7 of portB and 0.5V in the remaining of the portB pins..
I have no clue why I dont read high on all the portB pins. I have another code written in assembly, whose hex I've attached with this post.. This hex could glow the LEDs..
Can anyone tell me what is the possible reason..?
avr-gcc -mmcu=atmega32 aim.c -o aim.hex
is the options I use to build the hex file.