go away spammer

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

0 Members and 1 Guest are viewing this topic.

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
$50 Robot: 8MHz clock makefile
« 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!

Offline SomeSabaTopic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 0
Re: $50 Robot: 8MHz clock makefile
« Reply #1 on: December 14, 2007, 11:30:36 PM »
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!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: $50 Robot: 8MHz clock makefile
« Reply #2 on: December 15, 2007, 10:31:57 AM »
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.

 


Get Your Ad Here