UART bug or not in 18F67J60 ?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times

UART bug or not in 18F67J60 ?

Post by cubitus54 »

Hello,

I'm testing with PIC 18F67j60.
I have a problem with UART.
The UART software works well.
In hardware I have a compilation error.

Code: Select all

C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:27): error: unknown identifier 'TXIF'
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:27): error: invalid operand 'TXIF'
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:22): error: failed to generate expression
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:22): error: invalid operand '<<'
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:17): error: failed to generate expression
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:17): error: invalid operand '& '
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:35): error: failed to generate expression
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(617:2): error: error in 'while' loop statement
rs232.c success
failure
Where is the problem?

thank you
Attachments
rs232.fcf
(6.5 KiB) Downloaded 287 times
Flowcode V6.1.2.0(11 05 2015)

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times

Re: UART bug or not in 18F67J60 ?

Post by Kenrix2 »

This might cause more problems than it fixes because of the Ethernet but, here is a possible band aid.
Add the following to the top box in the supplementary code window:

#define TXIF TX1IF

The real solution will probably have to be done by Matrix Multimedia unless someone else has any ideas on how to fix this.
Good luck.

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times

Re: UART bug or not in 18F67J60 ?

Post by Kenrix2 »

I have another idea to solve this. The problem is the name of the register bit TXIF. The Ethernet uses that bit name on this chip and the UART uses TX1IF. The file PIC_CAL_UART.c uses the bit name TXIF for the UART which works for all the micros except for this one it seems. So instead of using the name of the bit we could change it to use the bit position (which is 4). So you could find and replace TXIF with pir1.4 in that file. However, if there are any micros where TXIF is not in position bit 4 then it would fail and not even give you an error message and I don't have the data sheets on all the micros to check for this. At least doing it this way you can still use the Ethernet if you want. If you try this method, do not use the #define suggested in the above post.

User avatar
cubitus54
Flowcode v5 User
Posts: 110
Joined: Wed Jun 19, 2013 7:18 am
Has thanked: 7 times
Been thanked: 32 times

Re: UART bug or not in 18F67J60 ?

Post by cubitus54 »

Hello,

With the proposed change there is no compilation error. But I have no signal on TXD ...

thank you
Flowcode V6.1.2.0(11 05 2015)

User avatar
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: UART bug or not in 18F67J60 ?

Post by Benj »

Hello,

There is no config data embedded into the program you posted above. Are you using an external application to setup the config? If your not setting up the config then the device will probably not run. There shouldn't be anything causing the UART to fail on this device but I could be missing something.

Post Reply