New Reply

programming atmega32 clock source

 
Share Thread Thread Tools
Mar18-13, 11:44 PM   #1
 

programming atmega32 clock source


iam using atmega 32 and i want to use external 16MHZ crystal I have figured out the fuse setting for this as lowbuyte=0xFF and highbyte=0Xc9
what i cannot understand is should i set fuse bits before programming or after programming? because as i have specified external crystal as clock source if i set fuse bits before programming it will require external crytal to be programmed (iam assuming controller requires clock source to be programmed does it?)and if i set the fuse bits after programming how will i reprogram it?

Iam using a universal burner to programme atmega32
 
PhysOrg.com
PhysOrg
engineering news on PhysOrg.com

>> Researchers use light projector and single-pixel detectors to create 3-D images
>> GPS solution provides 3-minute tsunami alerts
>> Single-pixel power: Scientists make 3-D images without a camera
Mar19-13, 03:55 AM   #2
 
As I remember, the Atmega 32 latches the fuses when you leave the programming mode. So even if you program the fuse bits, they wont have effect until you leave the programming mode. So the answer to your question is that, you don't need the external crystal before you leave the programming mode.

And yes the controller needs a clock source to be able to program the flash.

If you want to reprogram the fuse bits, there is something about the Lock bits that you need to do. So read up on the lock bits in the user manual.

Sidenote: I heard of some guys who programmed the fuse bit for an external crystal, left the programming mode, but they had no external crystal, so the controller didn't do anything. So be sure the crystal is connected and all before you program the fuse bits and leave programming mode. :D
 
Mar19-13, 05:09 AM   #3
 
thanks runie I have an external crystal so that won't be a problem but can i reprogram the flash (not the fuse bits ) without using external crystal?since i have set the fused bits to external crystal from where will it get the clock to reprogram flash?
 
Mar19-13, 05:53 AM   #4
 

programming atmega32 clock source


I believe it will need the clock from the external source then. So if you remove the crystal, then you can't program the flash.

However, some microcontrollers do it, such that when you enter programming mode, it switches to the internal oscillator. Thus you can always program the flash. But I don't know if this is the case with the ATmega 32.

The User Manual should tell you more.
 
New Reply
Thread Tools


Similar Threads for: programming atmega32 clock source
Thread Forum Replies
Pthread.h on ATmega32 micrcontroller Programming & Comp Sci 2
Time dilation explaination with mechanical clock instead of light clock Special & General Relativity 55
Free/GNU/Open Source programming language for Windows GUI Programming & Comp Sci 1
BCD switches as a clock source Electrical Engineering 2
Help with programming a Keithley 220 Current Source Math & Science Software 0