Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: dmclifton on February 15, 2011, 10:31:00 AM
-
I am trying to determine if my microprocessor is operating properly. I have uploaded the following piece of code:
int main(void)
{
configure_ports(); // configure which ports are analog, digital, etc.
while(1)
{
PORT_ON(PORTD, 0);
PORT_ON(PORTD, 1);
PORT_ON(PORTD, 2);
PORT_ON(PORTD, 3);
PORT_ON(PORTD, 4);//turn LED on
}
return 0;
}
(this is using the header file from the $50 robot tutorial).
I upload this, test the voltages on the pins of the D ports and get something between .3 and .8 on all. I then adjust all the PORT_ON to PORT_OFF and upload the code. I check the voltages and get the same.
Does this indicate that it is not working properly, or do the voltages mean nothing?
-
Are you sure it's wired correctly?
-
Are you sure it's wired correctly?
I thought it was - however, I was able to nab another chip from a friend and same results. I have checked the connectivity and voltages all over and I can't find anything off from what I think I should expect. However, the situation on this board is awful in terms of soldering - it was my first attempt to learn and it looks like it. I honestly think at this point my best path forward may be to scrap it and start from scratch.