I am just getting back into using AVRs with linux, and here's my
situation. I'm using avr-gcc, an STK500v2, and an AT90S2313 (I know,
it's old, but I already have a couple) to try some test programs.
This is the program that builds ok, programs and verifies okay, and
then doesn't work. It should let my control lights with the
pushbuttons, but i'm clearly doing something wrong. Thanks for your
advice!
#include <avr/io.h>
int main(void)
{
DDRB = 0xFF; /* We put port B pins in output mode */
PORTB = 0xFF; /* put all lights in off state */
PORTB = 0x00;
DDRD = 0x00; /* We put port D pins in input mode */
for(;;){
PORTB = PORTD; //match the ports
}
PORTB = 0xAA;
return(0);
}Message
Question about how to tell if my chip is broken
2007-05-04 by David Greenberg
Attachments
- No local attachments were found for this message.