John, you said "Not trying to teach you anything of course"
I've been watching you in this group for years. You could teach me a lot! AND I would willingly learn!
:)
Anyways, I must have something wrong with my test equipment.
I will try my (non-PC-based scope) tomorrow.
Many thanks!
--- In AVR-Chat@yahoogroups.com, John Samperi <samperi@...> wrote:
>
> At 12:00 AM 1/09/2012, you wrote:
> >When I look at the signal, I get between 0.9 and 2.1ms (about)for a
> >call for 5ms.
> >
> >When I try 10ms delay, I get between 2 and 4ms delay.
>
> hmm something is fishy, maybe your test equipment? :-)
>
> As you have tried different boards and they were working ok
> before that seems to be the most likely problem.
>
> I'm assuming here that your boards are reasonably made with proper
> supply bypass and steady supply.
>
> The project I'm currently working on has a 70ms and a 50ms delay and
> it is very accurate.
>
> Not trying to teach you anything of course but something like this
> could be handy to check your setup.
> I have never used anything but the Studio generated makefile so the
> F_CPU is entered in the project settings.
>
> #include <avr/io.h>
> #include <util/delay.h>
>
> int main(void)
> {
> DDRD |= (1 << PD4);
>
> for( ;; )
> {
>
> PORTD |= (1 << PD4);
> _delay_ms(500); //Max 65.535 seconds with latest winAvr
> PORTD &= ~(1 << PD4);
> _delay_ms(500);
> }
> }
>
>
>
>
> Regards
>
> John Samperi
>
> ********************************************************
> Ampertronics Pty. Ltd.
> 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
> Tel. (02) 9674-6495
> Website http://www.ampertronics.com.au
> *Electronic Design * Custom Products * Contract Assembly
> ********************************************************
>Message
Re: delay time is not reliable
2012-08-31 by englsprogeny1
Attachments
- No local attachments were found for this message.