Society of Robots - Robot Forum
Software => Software => Topic started by: SomeSaba on December 11, 2007, 07:25:11 PM
-
Hello,
I am using an Atmega168, and i happen to be sending serial data with the UART too.
In the new UART tutorial, Admin changed the clock speed from 1MHz to 8Mhz (via Ponyprog i think), and i also need to do this. A while ago i accidenly messed with the fusebits and i was locked out of my mega168, so i dont want to make the same mistake, but i use avr-gcc and i cant get pony prog to work.
So i have to actually type in the hex code for the fuse high and low bytes to get what i want, which scares me because i know ill mess up. So i was wondering if ponyprog makes a makefile that sets the fusebits everytime you program it, if so, can anyone send me their makefile for the 8Mhz clock?
If not its okay, <3, thank you for your time!
-
Nevermind!
I dont need the makefile anymore,
I was planning on controlling my motors with serial command, and i set everything up (at 1MHz), i doubled Tx to get .2% error with 9600buad and ran my code. It was horrible, i spent 2 full days tweaking, changing back and forth to 2400 buad, nothing was working like it was suppose to, the left motors would run forward when i comanded the right motors to go reverse! ???.
Then i came to the conclusion that the serial was for some reason unreliable and switched my controller to PWM mode, i setup a timer0, and now it works perfectly!
Thank you!
-
Sorry I wasn't able to help.
I played around with PonyProg for about 20 minutes back when you first posted this and wasn't able to figure out how to change the clock divisor for you. I spent quite awhile googling for it too.
I guess software is the only way for now . . .
If anyone figures it out, let us know.