bug with 16f88 - Resolved

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

Moderator: Benj

hertz89
Posts: 19
Joined: Sat Mar 22, 2014 6:30 pm
Been thanked: 3 times
Contact:

bug with 16f88 - Resolved

Postby hertz89 » Fri Mar 11, 2016 1:13 pm

hi
i have pic16f88 ..when try simple program for test the delay get bigger...i mean before the led start there are 300 msec delay

in real life the delay become 3 second! i thought the problem from the pic so i bought 3 more from other shop and same problem

i have pickit2 clone and it work fine for all my other mcu....i think the problem from flowcode 6
Attachments
Flowcode1.fcfx
(4.26 KiB) Downloaded 139 times

User avatar
LeighM
Matrix Staff
Posts: 1962
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 474 times
Been thanked: 674 times
Contact:

Re: bug with 16f88

Postby LeighM » Fri Mar 11, 2016 1:35 pm

Hi,
You have Project Options set to Internal RC Osc

osc.jpg
osc.jpg (34.04 KiB) Viewed 3560 times

Is that what you want?
Do you have an external crystal?

Internal RC will be very slow by default, but you also have Project Options->Clock Speed set to 4MHz, so the delay calculations in Flowcode will be wrong.

You can change the Internal RC Oscillator Frequency by writing to the OSCCON register, see Page 40 of PIC16F88 datasheet.

Leigh

hertz89
Posts: 19
Joined: Sat Mar 22, 2014 6:30 pm
Been thanked: 3 times
Contact:

Re: bug with 16f88

Postby hertz89 » Fri Mar 11, 2016 2:32 pm

hii

how do that in flowcode? could you give me the code?

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8542
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2456 times
Been thanked: 3526 times
Contact:

Re: bug with 16f88

Postby medelec35 » Fri Mar 11, 2016 3:56 pm

At the very start, so should be the first icon.
Place a C code block with

Code: Select all

osccon=0x60;
:
setting osccon.png
setting osccon.png (36.51 KiB) Viewed 3543 times

It's not a Flowcode bug so moved topic from the Bugs section.

Martin
These users thanked the author medelec35 for the post:
LeighM (Fri Mar 11, 2016 3:59 pm)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.