16F87 Clock

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
User avatar
psf
Posts: 45
Joined: Mon Jun 25, 2007 9:44 pm
Location: Italia
Has thanked: 6 times
Been thanked: 2 times

16F87 Clock

Post by psf »

Hi, I selected 4000000 as clock speed but when I programmed it (no PPP) and selected INTRC I/0 the Pic not worked correctly.
So I selected INTRC CLOUT and I mesured 7,8 KhZ (Fosc/4) as reported in data sheet. So I selected with an asm code the OSCCON as 0x66 in order to obtain a 4Mhz clock. Flowcode shouldn't do it for me? Anyway the clockout doesn't work and I don't know the clock frequency!.
What should I do simply to obtain 4Mhz clock using internally rc oscillator? Thanks

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Post by Steve »

Try config words as follows:

Code: Select all

config1 (0x2007) = 0x2F39
config2 (0x2008) = 0x3FFF
In your program, you will need to set OSCCON to 0x60.

Post Reply