Dear Support,
When I want to compile this PWM example program, I get the next error message.
I use PIC24FJ256GA110 chip.
http://www.matrixtsl.com
Fordító indítása...
C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat "pwm_fader" "H:\Flowcode\BUG\" "24FJ256GA110"
Launching compiler...
H:\Flowcode\BUG>xc16-gcc -c -mcpu="24FJ256GA110" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\FLOWCO~1\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\FLOWCO~1\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "pwm_fader".c -o "pwm_fader".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
In file included from C:\Program Files (x86)\Flowcode 7\CAL\includes.c:407:0,
from pwm_fader.c:147:
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_PWM.c: In function 'FC_CAL_PWM_Enable_1':
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_PWM.c:117:11: error: 'OC1CON' undeclared (first use in this function)
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_PWM.c:117:11: note: each undeclared identifier is reported only once for each function it appears in
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_PWM.c: In function 'FC_CAL_PWM_Disable_1':
C:\Program Files (x86)\Flowcode 7\CAL\/PIC16BIT\PIC16BIT_CAL_PWM.c:756:3: error: 'OC1CON' undeclared (first use in this function)
Error returned from [xc16-gcc.exe]
Completed compilation, return = 1
C:\Program Files (x86)\Flowcode 7\compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1
Could anyone help me?
Best Regards,
Lagoda
PWM macro compilation error (PIC24FJ256GA110)(SOLVED)
Moderator: Benj
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
PWM macro compilation error (PIC24FJ256GA110)(SOLVED)
- Attachments
-
- pwm_fader.fcfx
- (6.72 KiB) Downloaded 264 times
Last edited by Lagoda on Tue May 02, 2017 7:41 pm, edited 1 time in total.
- 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: PWM macro compilation error (PIC24FJ256GA110)
Hi Lagoda,
Thanks for letting us know. Hopefully the attached modified CAL should fix the problem for you.
Simply copy the file into your "Flowcode 7\CAL\PIC16BIT" folder and then hopefully this should solve the problem for you.
Let me know how you get on.
Thanks for letting us know. Hopefully the attached modified CAL should fix the problem for you.
Simply copy the file into your "Flowcode 7\CAL\PIC16BIT" folder and then hopefully this should solve the problem for you.
Let me know how you get on.
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
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: PWM macro compilation error (PIC24FJ256GA110)
Hi Ben,
Thanks for the quick response.
Now the program's compilation is okay.
Unfortunately, in the target circuit it does not work, the PWM output is constantly low.
If I testing it in the simulator, when the Duty indicator=100% on the Dashboard Panel then the Duty variable is only 64.
Lagoda
Thanks for the quick response.
Now the program's compilation is okay.
Unfortunately, in the target circuit it does not work, the PWM output is constantly low.
If I testing it in the simulator, when the Duty indicator=100% on the Dashboard Panel then the Duty variable is only 64.
Lagoda
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: PWM macro compilation error (PIC24FJ256GA110)
Hi Ben,
I tested the program in the target circuit and I've experienced the following.
I used PICKIT3 (PGED1, PGEC1) to programming, and I used Flowkit2 (PGED2, PGEC2) for debugging.
If I set the delay to 100us then the order of execution is 2, 3, 4, 6, 3, 5, (7, 4. 6, 3, 5). The sequence in parentheses repeats in the cycle.
If I set the delay to 1ms, the order of execution is as follows: 2, 3, 4, 6, 3, 5 and the next F8 key is interrupted the debugging. Ghost mode remains active (green toolbar) but tracing is canceled.
In simulation mode, the position marker follows the order sequence on the icons of flowchart. In debugging mode, the position marker will jump over the some icons, but it looks like the jumped command has been executed.
(Would PWM macro has been enabled?)
Another little thing. If the debugging speed is set to normal, Code Profiling markers will disappear. Is it okay?
Thanks in advance for your help
Best Regards,
Lagoda
I tested the program in the target circuit and I've experienced the following.
I used PICKIT3 (PGED1, PGEC1) to programming, and I used Flowkit2 (PGED2, PGEC2) for debugging.
If I set the delay to 100us then the order of execution is 2, 3, 4, 6, 3, 5, (7, 4. 6, 3, 5). The sequence in parentheses repeats in the cycle.
If I set the delay to 1ms, the order of execution is as follows: 2, 3, 4, 6, 3, 5 and the next F8 key is interrupted the debugging. Ghost mode remains active (green toolbar) but tracing is canceled.
In simulation mode, the position marker follows the order sequence on the icons of flowchart. In debugging mode, the position marker will jump over the some icons, but it looks like the jumped command has been executed.
(Would PWM macro has been enabled?)
Another little thing. If the debugging speed is set to normal, Code Profiling markers will disappear. Is it okay?
Thanks in advance for your help
Best Regards,
Lagoda
- Attachments
-
- PWM_fade_mini_1ms.png
- (48.71 KiB) Downloaded 2803 times
-
- PWM_fade_mini_100us.png
- (52.38 KiB) Downloaded 2803 times
-
- pwm_fader_mini.fcfx
- (6.28 KiB) Downloaded 249 times
-
- Posts: 170
- Joined: Fri Jul 15, 2016 9:51 pm
- Has thanked: 69 times
- Been thanked: 61 times
- Contact:
Re: PWM macro compilation error (PIC24FJ256GA110)(SOLVED)
The PWM error was fixed by the upgrade.
(Flowcode_7_Latest_020517.zip)
Thank you very much.
Lagoda
(Flowcode_7_Latest_020517.zip)
Thank you very much.
Lagoda