SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By tonys
#56078
Hi I'm up to this part of the tutorial:

http://www.sparkfun.com/commerce/tutori ... als_id=105

I've set the fuse bits for a 16Mhz crystal on my ATMega168. I'm still not sure what SUT_CKSEL to pick, so I picked the very last one on the list. I got the RS232 shifter board and it seems to be working fine, when I tie RX and TX the keyboard echoes correctly to TeraTerm. But the program in the tutorial doesn't work, when I run it, all it does is print boxes, which I'm guessing means an unknown character or it didn't receive it correctly. Does anyone know how to make it print correctly, or what I might be doing wrong? Here is the code of the tutorial.

http://www.sparkfun.com/tutorial/Beginn ... ega168.zip

Thanks!
By tlynch99
#56105
I am interested in learning about this as well. I am having a similar problem. Everything work with regards to the loop backs etc... but when I try and run the program all I get is ".....". I think it may have something to do with the baud rate not being correct, but I am not sure.
By tonys
#56106
Wow I just fixed it now. I'm using AVR Studio. First I picked the last SUT_CKSEL on the list "Ext Crystal Osc 8.0-". Then this is what fixed it: make sure to uncheck CKDIV8. That tutorial needs to be updated and more specific. The final fuse values should be EXTENDED=0xF9, HIGH=0xDF, LOW=0xBF. I can finally get on to other stuff! :)
By EricAtPobot
#59166
As you may have guessed, the CKDIV8 flag divides the clock by 8, so the frequency at which the proc is running is no more the crystal one, but 1 MHz if your crystal is a 8MHz one. The baud rates generation is thus no more correct (at least if you have not configured them for a 1 MHz clock).
By signal7
#59495
Personally, if I'm doing anything time critical, I will set the clock prescaler in software right after I set up the stack. The fuse bits on all of the atmel parts I've used just set the initial prescaler value. Software can then successfully set the prescaler to known value and you don't have to worry about whether or not the fuse bits are programmed right.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]