[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Unusually Long Delay for ATMega128

From: Gaël Rossignol
Subject: RE: [avr-gcc-list] Unusually Long Delay for ATMega128
Date: Thu, 28 Jun 2007 09:59:07 +0200


If you use the internal RC oscillator you probably need to calibrate your
Atmega. It may possibly resolve your problems of time, look at OSCCAL
register in datasheet. You have some application note on the web site of
Atmel who can help you to automatically calibrate your Atmega.



-----Message d'origine-----
De : address@hidden [mailto:address@hidden 
Envoyé : jeudi 28 juin 2007 00:24
À : address@hidden
Objet : [avr-gcc-list] Unusually Long Delay for ATMega128

Thanks, everyone for your suggestions.  After lots of tests the problem,
here appears to be related not to my timer code, but rather in the way my
I2C messages are being decoded on my host system (a gumstix).  I will now
look at these next.


> Date: Wed, 27 Jun 2007 10:27:10 -0500 (CDT)
> From: address@hidden
> Subject: [avr-gcc-list] Unusually Long Delay for ATMega128
> To: address@hidden
> Message-ID:
>       <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
> Hi,
> I am working on some code to read the Parallax Ping sensor from a board
> (robostix) with an ATMega128 microcontroller.  Unfortunately, I am getting
> some strange tick counts from my functions.  For example, in my Sensor.c
> file, I start the counter, then call a function to delay for 5
> microseconds, then read the counter value.  I have repeated this process
> several times, and I generally see about 350 ticks after my routine --
> this converts to about a 20 microsecond delay.  Am I missing anything
> pretty obvious in my Timer.h and Timer.c files?
> Thanks,
> Daniel

AVR-GCC-list mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]