Delay_10us almost 3x longer

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
blysynski
Posts: 17
Joined: 05 Dec 2019 18:20

Delay_10us almost 3x longer

#1 Post by blysynski » 30 Jan 2020 22:43

Getting weird results: Delay_10us is generating a output almost 30us and timer 0 appears to be running 2x as fast. I can't find where my error is.

config words are:

CONFIG1L : $300000 : 0x0023
CONFIG1H : $300001 : 0x0009
CONFIG2L : $300002 : 0x005F
CONFIG2H : $300003 : 0x003C
CONFIG3H : $300005 : 0x0091
CONFIG4L : $300006 : 0x0081
CONFIG5L : $300008 : 0x000F
CONFIG5H : $300009 : 0x00C0
CONFIG6L : $30000A : 0x000F
CONFIG6H : $30000B : 0x00E0
CONFIG7L : $30000C : 0x000F
CONFIG7H : $30000D : 0x0040

and oscillator control is:

OSCCON = 0x34 ' HFINTOSC 1 MHz
OSCCON2 = 0xBC

thanks for the help.

blysynski
Posts: 17
Joined: 05 Dec 2019 18:20

Re: Delay_10us almost 3x longer

#2 Post by blysynski » 31 Jan 2020 16:27

Found it! - no need for help.

Thanks

Post Reply

Return to “mikroBasic PRO for PIC General”