hi
i have been programming my atmega32 using a stk500 development board and it has been going fine. however i would like to now move my programmed mcu onto a breadboard. so i started with a simple program to test on a breadboard of a blinking led, the code is shown below:
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRB |=1 << PINB1;
DDRB |=1 <<PINB0;
while(1)
{
PORTB |=1 << PINB0;
PORTB^=1 << PINB1;
_delay_ms(200);
}
}
the code allows an led on pinb0 to be held high and an led on pinb1 to blink. the code was programmed on my mcu with the stk500 board and then a connector was used on the board to connect to the leds on the stk500 board. once the mcu was programmed it seemed that it was working fine. so i removed the mcu from the socket and connected it to a breadboard with the configuration shown in the image. then i applied a 5V DC supply to the broad but the leds on the breadboard did not light up. after several hours of attempting to make it work i failed to determine what the probelm is. so then i taught maybe the mcu is damaged but when i connected the mcu back into the stk500 board the leds on the pinb0 and pinb1 were acting as they were programmed. i know i am missing something small on my breadboard but not sure what please help!
i have been programming my atmega32 using a stk500 development board and it has been going fine. however i would like to now move my programmed mcu onto a breadboard. so i started with a simple program to test on a breadboard of a blinking led, the code is shown below:
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRB |=1 << PINB1;
DDRB |=1 <<PINB0;
while(1)
{
PORTB |=1 << PINB0;
PORTB^=1 << PINB1;
_delay_ms(200);
}
}
the code allows an led on pinb0 to be held high and an led on pinb1 to blink. the code was programmed on my mcu with the stk500 board and then a connector was used on the board to connect to the leds on the stk500 board. once the mcu was programmed it seemed that it was working fine. so i removed the mcu from the socket and connected it to a breadboard with the configuration shown in the image. then i applied a 5V DC supply to the broad but the leds on the breadboard did not light up. after several hours of attempting to make it work i failed to determine what the probelm is. so then i taught maybe the mcu is damaged but when i connected the mcu back into the stk500 board the leds on the pinb0 and pinb1 were acting as they were programmed. i know i am missing something small on my breadboard but not sure what please help!
Attachments
-
68 KB Views: 44