Hi:
I am having problems with either my code or my microcontroller. I have the atmega328p connected to a l298 h-bridge.
The atmega is connected to an xbee which receives instructions from my laptop. i=forward, k=reverse etc. I have the microcontroller set so that when I press a letter, it prints out reverse,forward,etc to hyperterminal.
if I use the microcontroller without PWM for the wheels I have no problem but when I use the PWM and start doing a sequence of left forward reverse etc. I can see on hyperterminal that it prints some of the commands and then INITIALIZATION COMPLETE( which to me means that it came out of the loop or the micro was reseted) and then back to the commands. After a while the wheels just get stuck on one of the commands and the hyperterminal does not print anything else.
This is what I see:
Initialization Complete
foward
turn right
reverse
turn left
foward
turn right
reverse
turn left
reverse
turn right
foward
turn right
reverse
Initialization Complete
turn left
foward
turn right
turn left
And at this point the wheels are stock on turn left or whatever happened to be the last command
any ideas??? please