Flowcode PIC16F88 & RS232 returns unable to compile.

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

Moderators: Benj, Mods

Post Reply
eric-decr
Posts: 2
Joined: Fri Feb 17, 2006 10:54 pm
Location: Belgium
Contact:

Flowcode PIC16F88 & RS232 returns unable to compile.

Post by eric-decr »

Hello,

I am a happy new user of Flowcode, USB-Multiprogrammer & Eblocks :D

But a problem arised writing a FC program for serial communication with the PIC16F88 :?

A simple Flowcode program using the RS232 component (only transmit one byte) for target PIC 16F88 returns error "Flowcode was unable to compile the Flowchart's C code due to following errors: <nothing listed>" :(

When an other target PIC (with USART on port C) is selected (16F876A or 16F877A) the compile to asm works fine :wink:

Is this a know limitation, a configuration issue or a bug in Flowcode or C2C :?:

My Flowcode version is 2.2PRO

Rgrds
Eric

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Hi Eric,

Sorry to here of your problem - it is not a known bug and should work fine. Can you please send the Flowcode fcf file and the C file it generates to the following address and we'll look into it:

support@matrixmultimedia.co.uk

pmcquail
Posts: 5
Joined: Thu Feb 16, 2006 11:44 am
Contact:

Post by pmcquail »

I have the same problem.

Compiles OK with the 16F73 chips

(file posted to support)

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

I've found the problem. It is because the defines for the RCSTA register are missing from the "p16f88.h" file in the C2C directory.

We'll hopefully issue a patch for this later today. In the meantime, you can either contact us and we'll send you the file, or you can update the header file by hand.

To update the file yourself, add the following lines into the "p16f88.h" file (and the "p16f87.h" file as well if you intend to use this device):

Code: Select all

//=============================================
// RCSTA Bits

#define         SPEN            0x0007
#define         RX9             0x0006
#define         RC9             0x0006
#define         NOT_RC8         0x0006
#define         RC8_9           0x0006
#define         SREN            0x0005
#define         CREN            0x0004
#define         ADDEN           0x0003
#define         FERR            0x0002
#define         OERR            0x0001
#define         RX9D            0x0000
#define         RCD8            0x0000


These file are located in the C2C folder within the FlowCode directory. By default, their location is as follows:

C:\Program Files\Matrix Multimedia\Flowcode\C2C\include

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

In addition, the "TXSTA" register defines are missing. This will not cause any problems with FlowCode at the moment, but it may be worth adding these to the 87 and 88 header files for completeness:

Code: Select all

//=============================================
// TXSTA Bits

#define         CSRC            0x0007
#define         TX9             0x0006
#define         NOT_TX8         0x0006
#define         TX8_9           0x0006
#define         TXEN            0x0005
#define         SYNC            0x0004
#define         BRGH            0x0002
#define         TRMT            0x0001
#define         TX9D            0x0000
#define         TXD8            0x0000


pmcquail
Posts: 5
Joined: Thu Feb 16, 2006 11:44 am
Contact:

Post by pmcquail »

All seems OK now

Many thanks

eric-decr
Posts: 2
Joined: Fri Feb 17, 2006 10:54 pm
Location: Belgium
Contact:

Post by eric-decr »

Hi,
Compiles fine now with the patched F87.h & F88.h files.
Thanks,
Eric

Post Reply