avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: fokumdt
Subject: [avr-gcc-list] Unusually Long Delay for ATMega128
Date: Wed, 27 Jun 2007 10:27:10 -0500 (CDT)
User-agent: SquirrelMail/1.4.6

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

Attachment: Sensors.c
Description: Text Data

Attachment: Timer.c
Description: Text Data

Attachment: Timer.h
Description: Text Data

Attachment: Sensors.h
Description: Text Data


reply via email to

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