Page 1 of 1

7 seg LED display and Delay

Posted: Sun Feb 10, 2008 12:45 pm
by stafvg
I was 'playing' with the 4 digits 7 segment LED display and have noticed some strange behaviour. I use the multiprogrammer with PIC16F88 and flowcode 3 (prof). In attachments there are 2 files, they look the same only the delay is different.
It is a testprogram that uses the Macro LED7seg4. The program should display one digit at a time. In DEMO everything goes as it should but when you change the delay from 1 msec to more then 4 msec (like 1 sec in 7segment2.fcf) then the live version of the program only displays the last digit.
Now I have different test programs like with nested while loops and they are all the same ; strange behaviour when the delay is greater then 4 msec.
In the C-code of these programs, I don't see anything strange. Bye the way, can I use nested while loops ?

Re: 7 seg LED display and Delay

Posted: Tue Feb 12, 2008 12:59 pm
by Benj
Hello Staf

The problem could be your chip configuration,

Make sure that in Flowcodes Chip -> Configure is set to XTAL and Watchdog Off.

Then on your hardware make sure that the oscillator select switch is set to XTAL.

Re: 7 seg LED display and Delay

Posted: Tue Feb 12, 2008 6:37 pm
by stafvg
Hi Ben,

Indeed, it was a wrong configuration. The first PIC I saw in the list was a 16F88, the switch on the board was on XTAL but in the configuration I saw that is was on RC. So now that it set on the same configuration it is working as I have programmed it.

Many thanks for your reply !

Staf