Hi there,
I have been trying to identify the PWM component (as on page 9 of the FCv3 Datasheet) in Flowcode v3, where is it?
thanks,
PWM Component in Flowcode V3
- 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:
Hi Mark
It is there but I dont think it is all finished quite yet. Eg there isn't an icon for it yet. I know that it is possble to use it though. I will try to explain how it works but to be honest Steve is your man. He will be back on monday.
Firstly you set up a variable for each PWM you wish to use.
Eg pwm1, pwm2
Set this variable with a value. I could be wrong about these numbers but I think they are right.
255 = always off. 0 = always on. 122 = 50:50 mark space.
The use a C code variable
The ccpr1l and ccpr2l point to the PWM registers and the FCV_PWM1 is the C code equivalent of the pwm1 variable. Note the capitalisation and the preceeding FCV_
Fully intergrated PWM modules are going to arrive shortly so sorry for the wait.
It is there but I dont think it is all finished quite yet. Eg there isn't an icon for it yet. I know that it is possble to use it though. I will try to explain how it works but to be honest Steve is your man. He will be back on monday.
Firstly you set up a variable for each PWM you wish to use.
Eg pwm1, pwm2
Set this variable with a value. I could be wrong about these numbers but I think they are right.
255 = always off. 0 = always on. 122 = 50:50 mark space.
The use a C code variable
Code: Select all
ccpr1l = FCV_PWM1; //Sends variable pwm1 to first PWM module.
ccpr2l = FCV_PWM2; //Sends variable pwm2 to second PWM module.
Fully intergrated PWM modules are going to arrive shortly so sorry for the wait.
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
- 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:
Hello Milkat
I think the PWM component will support the vast range of the 18F devices and I dont see any reason why all PWM outputs wouldn't be allowed.
I think the PWM component will support the vast range of the 18F devices and I dont see any reason why all PWM outputs wouldn't be allowed.
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