Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - timer problem with atmega32 and atmega 16

(you are viewing a thread; or go back to list of threads)

timer problem with atmega32 and atmega 16 (by sushil)
sir,

i am using atmega32 and 16. i started with your tutorial program led blinking project. there is a ploblem with time. i selected 1 sec ie 1000ms on time and 1000ms off time but when i run it on off time is about 10-11 sec on and 10 to 11 sec off. time responce is too slow. do you think i need to set up fuse bits and how?
i am using 12 mhz crystal
will u please tell me any alterations i need to do with fuse bits because once i altered some fuse bits related to clock citcuit then it worked properly but device got locked and i was not able to detect or program controller any more this happened both with atmega 31 and atmega16
i selected these devices because of its easy burning
i am using ispprog burner which directly connects device with parallel port with a buffer in between. will u suggest me anything else.

thanks n regards
sushil sabharwal
india
Tue Nov 10 2009, 06:02:22
(no subject) (by Jonathan Westhues)
My guess is that you are running with CKSEL[3:0] = 0001. This is the default, and corresponds to an internal RC oscillator at 1 MHz. So you're running at 1/12 the frequency that you thought, so everything is 12x too slow.

Read the datasheet, and set the fuse bits for the oscillator that you actually have.
Tue Nov 10 2009, 11:15:52
Fuse bits setting problem (by sushil)
I tried to alter the fuse bits as per datasheet to run with 12 mhz xtal but i got my device locked this happened with me thrice i got my 3 chips locked and no way to open it. will you tell me how to alter fuse bits without locking my device. now my software is not even detecting the device.
i am workin on a machine development in my job.


thanks n regards
sushil sabharwal
india
Wed Nov 11 2009, 05:04:16
fuse bits (by sushil)
will you please tell me best setting for fuse bits for 12 mhz crystal and what about other bits like JTAGEN & CKOP.
Wed Nov 11 2009, 05:15:17
(no subject) (by Jonathan Westhues)
Somehow, your programming software is setting the lock bits. Don't touch those: all the bits with LB in the name should be left unprogrammed (i.e., equal to 1; 0 means locked).

You want to change only the clock configuration, per

http://cq.cx/ladder-forum.pl?action=viewthread&parent=409

The datasheet seems to imply that a "chip erase" command will reset the lock bits. So it may be possible to salvage your dead chips, if your programmer is able to send that.
Wed Nov 11 2009, 05:16:34
(no subject) (by yogesh)
hi sushil,
which programmer you are using, few days back i've compiled a Atmega8 @ 8Mhz and every thing works fine.
you can contact at my email id.



yogesh
Sat Nov 14 2009, 11:42:45
(no subject) (by hi yogesh)
hi yogesh,

i am using simple isp programmer software named ispprog with simple circuit having a buffer between microcontroller and parallel port. below is link for that schematic for circuit is attached with this post.
Fri Nov 20 2009, 02:55:47, download attachment schematic.gif
(no subject) (by hi yogesh)
my email is [email protected]
i vent seen ur mail in post

can i have that
Fri Nov 20 2009, 02:59:54
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):