Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: Jdog on November 22, 2008, 11:24:26 PM
-
PLEASE HELP! I have no idea what's going on. I finally completed my microcontroller a few days ago and got it working. I uploaded the holdservo program to it so I could modify the servos, and it worked. After I modified them I uploaded the provided photovore code to it. I plugged both of my modified servos into it and only 1 of them worked, but that one worked perfectly. It turns out I messed up one of the servos when I tried modifying it. So I ordered another servo. When it arrived I put the holdservo program back on the controller and modified it. Then I put the photovore program on it again. Now when I plug everything in and turn it on the motors turn a little bit and then stop. This happens everytime I turn it on and off.
-
Also, now I just tried to reprogram it thinking that sometthing might have gone wrong when it uploaded the program, and now the computer doesn't even recognize it.
-
Sounds like the uC is dead... Though it is possible you just wrote a bad fuse value.
Do you have a spare microcontroller?
-
I do, and I tried plugging that one in and connecting it to the computer, and it still doesn't recognize it.
-
you sure your ICSP pins are all connected correctly? Is the power connected correctly? You might also try restarting the computer, I remember a couple of times where my AVR programmer stopped working until I restarted.
-
My pins are connected correctly and so is my power. I just restarted my computer and it still isn't recognizing it. I also checked the voltages and they're good too.
-
after you program the robot...do you turn off the robot. unplug the programmer from the robot mcu, and then power cycle the robot?
-
what does power cycle mean
-
I'm guessing it's the microcontroller, so I'm going to get a new one of those. Does it make sense to get the better one for the extra dollar.
-
what does power cycle mean
turn the board on , then turn it off, then turn it on
-
Check the battery voltage.
Also, using a multimeter, check the pin to the servo that wasn't working properly for a disconnect.
-
Everything is working except now when I try to write the program on the Atmega168 after it said it wrote it and verified it it says write failed
-
check to make sure microcontroller is firmly in its socket , double check connections, and check voltage
-
I did that and it still isn't working, do i need a different program for the 168?
-
there might be a "ghost" short somewhere
-
Upload this hex file and let us know if you still get the error:
http://www.societyofrobots.com/robotforum/index.php?action=dlattach;topic=5932.0;attach=2153
If you still get an error, that means you wired something improperly or set up ponyprog improperly.
If you don't get the error, that means you compiled your .hex improperly.
-
When you re-compiled the program for the ATMega168 did you remember to change the makefile to say your are using an ATMega168 rather than a ATMega8 ?
-
Yes. And I changed the timer in the Sor_utils