Author
Topic: $50 Robot: 8MHz clock makefile (Read 2217 times)

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?

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!