Hello,
I am a happy new user of Flowcode, USB-Multiprogrammer & Eblocks
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
Is this a know limitation, a configuration issue or a bug in Flowcode or C2C
My Flowcode version is 2.2PRO
Rgrds
Eric
Flowcode PIC16F88 & RS232 returns unable to compile.
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
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
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
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
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):
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
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
C:\Program Files\Matrix Multimedia\Flowcode\C2C\include
- Steve
- Matrix Staff
- Posts: 3418
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
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