|
Prev: MBR or not? (on SD cards)
Next: MBR or not in SD cards?
From: ratemonotonic on 9 Jul 2008 12:04 Hi All , I am implementing RTC code on an AVR Atmega2560 I have a 32Khz clock crystal to TSOSC1 which is used by timer2 in async mode. I have configured the clock divide to 8 so the clock to the timer is 32768/8 = 4096. It is a 8bit so a interrupt should be generated every 16hz (4096/256). So on 16 ticks make one second. If I add up second to make 5 minutes and light an LED on this event , it is happening within 2minutes. Why is this. I have checked the crystal is oscillation at 32Khz. Has any on encountered this? BR Rate
From: Ignacio G.T. on 10 Jul 2008 08:43 ratemonotonic escribi�: > Hi All , > > I am implementing RTC code on an AVR Atmega2560 I have a 32Khz clock > crystal to TSOSC1 which is used by timer2 in async mode. I have > configured the clock divide to 8 so the clock to the timer is 32768/8 > = 4096. It is a 8bit so a interrupt should be generated every 16hz > (4096/256). > > So on 16 ticks make one second. If I add up second to make 5 minutes > and light an LED on this event , it is happening within 2minutes. Why > is this. I have checked the crystal is oscillation at 32Khz. �Exactly 2 minutes, or perhaps 1 minute and 40 seconds?
From: ratemonotonic on 15 Jul 2008 05:01 On Jul 10, 1:43 pm, "Ignacio G.T." <igtorque.rem...(a)evomer.yahoo.es> wrote: > ratemonotonic escribió: > > > Hi All , > > > I am implementing RTC code on an AVR Atmega2560 I have a 32Khz clock > > crystal to TSOSC1 which is used by timer2 in async mode. I have > > configured the clock divide to 8 so the clock to the timer is 32768/8 > > = 4096. It is a 8bit so a interrupt should be generated every 16hz > > (4096/256). > > > So on 16 ticks make one second. If I add up second to make 5 minutes > > and light an LED on this event , it is happening within 2minutes. Why > > is this. I have checked the crystal is oscillation at 32Khz. > > ¿Exactly 2 minutes, or perhaps 1 minute and 40 seconds? Investigating further I have varified the it is seeing a clock of exactly 200Khz. Just as an experiment I freeze sprayed the chip and it stopped seeing the 200khz clock. It looks like it is some kind of switching noise it was picking up.
|
Pages: 1 Prev: MBR or not? (on SD cards) Next: MBR or not in SD cards? |