I'm doing a simple routine here.
Output goes high
output goes low for 5 ms
output goes back to high.
Problem is that when I scope the signal it is not low for exactly 5ms.
It's 1.925 or 1.426 or 1.003ms (approximate times)(always less than 5 ms)
Details:
ATMeg16
JTAG interface to AVR Studio 4.18
GCC coded
delay.h
I've read about this and verified that I am good with the following:
1. I am optimized correctly in the makefile
CPFLAGS = -g -Os -Wall -Wstrict-prototypes-I$(AVRLIB) -Wa,-ahlms=$(<:.c=.lst)
2. F_CPU is set correctly
#define F_CPU 7372800
3. Fuse Settings are set correctly (External Crystal/ Res; High Freq)
Stertup Time 16K CK+64ms
4. All interrupts are disabled
// disable interrupts
cli();
Any other ideas?
Many thanks guys!Message
delay time is not reliable
2012-08-31 by englsprogeny1
Attachments
- No local attachments were found for this message.