Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | Timer ticks occurring much more faster

There are 3 messages in this thread.

You are currently looking at messages 0 to 3.

Timer ticks occurring much more faster - ratemonotonic - 12:04 09-07-08

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



Re: Timer ticks occurring much more faster - Ignacio G.T. - 08:43 10-07-08

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?

Re: Timer ticks occurring much more faster - ratemonotonic - 05:01 15-07-08

On Jul 10, 1:43 pm, "Ignacio G.T." <igtorque.rem...@evomer.yahoo.es>
wrote:
> ratemonotonic escribi=F3:
>
> > 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
> > =3D 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.
>
> =BFExactly 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.