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 ?
7 seg LED display and Delay
7 seg LED display and Delay
- Attachments
-
- 7SEGMENT3.fcf
- (3.5 KiB) Downloaded 411 times
-
- 7SEGMENT2.fcf
- (3.5 KiB) Downloaded 382 times
Staf Van Gestel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: 7 seg LED display and Delay
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: 7 seg LED display and Delay
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
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
Staf Van Gestel