Hello,
I have the following question:
- the random-function doesn't work in my program
- in the attachment (random.fcf) is a loop that waits for a press of switch SW0
- while the switch is not pressed a random number is generated (variable rnd)
- when the switch is pressed the variable rnd is displayd on the lcd-display
In the Supplementary Code i have set:
#include <rand.h>
The parameters in Linker: (Compiler Options)
-ld "C:\Program Files\Matrix Multimedia\Flowcode V4\BoostC\lib" libc.pic16.lib flowcode.pic16.lib float.pic16.lib rand.pic16.lib "%f.obj" -t PIC%p -d "%d" -p "%f"
I have the E-Blocks Multiprogrammer EB-006-00-7 with Flowcode4
My processor is PIC16F877a
Can somenone help me please!!
W. Tulp
Random doesn't work.
Moderator: Benj
- 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: Random doesn't work.
Hello,
I have changed your C code for the Flowcode supported random function and this is now working correctly.
I have changed your C code for the Flowcode supported random function and this is now working correctly.
- Attachments
-
- random.fcf
- (6 KiB) Downloaded 289 times
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