Page 1 of 1

Timing Issue

Posted: Sun Sep 06, 2009 2:16 am
by Ron
Hello,

I had a working program and then could not locate the latest source code, somehow must have deleted it. I went to older back up that should work and RS232 would not connect.

So I went back to basics with 2 versions of the same program. 18F4620, 20000000 EXT

Program 1

1 -> RA0 LED comes on when power is applied, instantly.

Program 2

Delay 2 seconds
1-> RA0 LED comes on 40 seconds later. Confirmed several times, always 40 seconds.



Using PICKIT2 programmer with the latest software

Config bits set as follows in config area of Flowcode

0x300002,0x1e
0x300003,0x1e
0x300005,0x81
0x300006,0x80
0x300008,0xf
0x300009,0xc0
0x30000a,0xf
0x30000b,0xe0
0x30000c,0xf
0x30000d,0x40

Any ideas why a 2 second delay in flowcode would become a real world 40 second delay?

Again everything was working fine this morning with code burned on PIC from source I lost somehow, so went with backup from a week ago and now nothing works.

Thank you,

Ron

Re: Timing Issue

Posted: Sun Sep 06, 2009 11:44 am
by Ron
Hi,

I changed the program for a 16F887 and it works properly.

So my guess is it is the config bits, any ideas????

Thank you,

Ron

Re: Timing Issue

Posted: Mon Sep 07, 2009 8:52 am
by Benj
Hello Ron

The following configuration settings should work correctly for your device running at 20MHz.
Config.JPG
(147.58 KiB) Downloaded 946 times