16F1508 PWM Error

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

16F1508 PWM Error

Post by Sanjay Singh »

Hi all,

I'm getting "error 1" message while compiling the attached program.

The compiler message is like this,

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Target folder: H:\INTERF~1
Source name: H:\Interface\PWM.fcfx
Title:
Description:
Device: PIC.16F.16F1508
Generated by: Flowcode v6.1.2.0
Date: Monday, August 24, 2015 22:21:50
Users: 1
Registered to: ***************
Licence key: ******
http://www.matrixtsl.com
Launching the compiler...
Launching BoostC...
Completed BoostC compilation, return = 1



FINISHED

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The oscillator is set external @ 19.660MHz

Kindly help me to resolve this issue.....

Regards,
San
Attachments
PWM.fcfx
(6.09 KiB) Downloaded 327 times

Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: 16F1508 PWM Error

Post by Sanjay Singh »

Hi all,

Even the "RS232" macro is throwing the "Error 1" while compiling.
There seems to be many issues with the 16f1508.fcdx file

I'm struck halfway in a project & hoping for some help.

Regards,
Sanjay

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Hi Sanjay,
I'll have a look at updating the CAL for this chip and get back to you as soon as possible.
Leigh

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Hi
Please try this updated PWM CAL,, place in your Flowcode 6\CAL\PIC directory.
Regards,
Leigh
ps. next the RS232 ....
Attachments
PIC_CAL_PWM.c
(14.28 KiB) Downloaded 362 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Here's a fix for the 16F1508 UART ...
Attachments
PIC_CAL_UART.c
(23.32 KiB) Downloaded 388 times

Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: 16F1508 PWM Error

Post by Sanjay Singh »

Hi Leigh,

After the update, the RS232 macro is working & the PWM is throwing "error 2"

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files\Flowcode 6\compilers\pic\boostc\boostc_16F.exe -v -t PIC16F1508 "PWM.c"
Launching BoostC...
.............................................................................................................................
Completed BoostC compilation, return = 0

Launching the linker/assembler...
C:\Program Files\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe -ld "C:\Program Files\Flowcode 6\compilers\pic\boostc\lib" libc_16F.lib rand_16F.lib float_16F.lib "PWM.obj" -t PIC16F1508 -d "H:\C_ENTR~1\INTERF~1" -p "PWM" -swcs 6 2
BoostLink Optimizing Linker Version 7.20
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday


Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external symbol, function:FC_CAL_PWM_ChangePeriod_1
Error: Unresolved external function:'FC_CAL_PWM_ChangePeriod_1(unsigned char,unsigned short)'
Error: Unresolved external symbol, function:FC_CAL_PWM_ChangePeriod_1
........


failure

C:\Program Files\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe reported error code -2


FINISHED
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

Kindly advice on this issue.

Regards,
Sanjay

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Hi Sanjay,

Sorry about that. I fixed our head revision, but it's 2 months since our last release and there have been a few changes in the components (but not yet released).
So I've attached the latest components, these will match with the CAL code.
Please copy these component files to the Flowcode 6 \components directory, might be worth doing a backup of the old versions first :)

Let me know if you have any issues, in which case I'll have to roll back to a previous CAL version, and fix that instead.

Regards,
Leigh
Attachments
PWM.fcpx
(7.8 KiB) Downloaded 327 times
cal_pwm.fcpx
(8.08 KiB) Downloaded 326 times

Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: 16F1508 PWM Error

Post by Sanjay Singh »

Hi Leigh,

After updating the component, PWM is working fine.

Kindly let me know how to enable RXINT, as the option is not there on the Interrupt macro or provide me any sample working FC program to receive UART data on interrupt.

Regards,
Sanjay

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Hi
Attached is an updated fcd with a UART interrupt for the 16F1508, place it in your Flowcode 6\FCD\PIC directory.
You will need to create, and specify in the interrupt enable, a new macro to run on interrupt.
This macro will then need to call ReceiveChar and place the character received into a buffer.
To help with that, there is a Circular Buffer component.
I don't have any samples, but a search on this forum will come up with a few, such as
http://www.matrixtsl.com/mmforums/viewtopic.php?p=33484

Leigh
Attachments
16F1508.fcdx
(15.55 KiB) Downloaded 298 times

Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: 16F1508 PWM Error

Post by Sanjay Singh »

Hi Leigh,

Thanks for the update. UART Int is working fine without any issues.
Kindly provide the PWM & UART updates for 16F1509.

Regards,
Sanjay

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Thanks for letting us know that it works.
Here is the 16F1509 fcd ...
Attachments
16F1509.fcdx
(15.55 KiB) Downloaded 264 times

Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: 16F1508 PWM Error

Post by Sanjay Singh »

Hi all,

I'm getting "error 1" message while compiling the attached program when SPI is on Channel 1.

The compiler message is like this,

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Target folder: H:\Clock\nRF
Source name: H:\Clock\nRF\16F1508_SPI_Test.fcfx
Title:
Description:
Device: PIC.16F.16F1508
Generated by: Flowcode v6.1.2.0
Date: Wednesday, June 01, 2016 07:10:22
Users: 1
Registered to: 30day_67332800
Licence key: U5VWEK
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files\Flowcode 6\compilers\pic\boostc\boostc_16F.exe -v -t PIC16F1508 "16F1508_SPI_Test.c"
Launching BoostC...
........................................................................................................................
Completed BoostC compilation, return = 1

C:\Program Files\Flowcode 6\compilers\pic\boostc\boostc_16F.exe reported error code 1


FINISHED

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

& the same program compiles OK when software SPI is selected.

The oscillator is set external @ 19.660MHz

Kindly help me to resolve this issue.....

Regards,
San
Attachments
16F1508_on Software SPI.fcfx
(14.29 KiB) Downloaded 185 times
16F1508_on Channel 1 SPI.fcfx
(14.29 KiB) Downloaded 181 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Looks like an error in Boostc header file
we don't normally edit their files, but here's a quick fix attached
drop in into
Flowcode6..... \compilers\pic\boostc\include
Attachments
PIC16F1508.h
(69.44 KiB) Downloaded 248 times

Sanjay Singh
Posts: 23
Joined: Fri Jun 08, 2012 10:54 am
Location: India
Has thanked: 10 times
Been thanked: 3 times
Contact:

Re: 16F1508 PWM Error

Post by Sanjay Singh »

Hello,

I'm getting "error 1" message while compiling the attached program with GPS Macro.
Kindly help.

San
Attachments
GPS.fcfx
(5.73 KiB) Downloaded 170 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: 16F1508 PWM Error

Post by LeighM »

Hi San,
Could you PM your compiler output please? (GPS.msg.txt)
As it works OK on my installation.

Thanks
Leigh

Post Reply