Page 1 of 1

UART bug or not in 18F67J60 ?

Posted: Sat Dec 07, 2013 9:10 pm
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

Re: UART bug or not in 18F67J60 ?

Posted: Sun Dec 08, 2013 12:37 am
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.

Re: UART bug or not in 18F67J60 ?

Posted: Sun Dec 08, 2013 2:21 am
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.

Re: UART bug or not in 18F67J60 ?

Posted: Sun Dec 08, 2013 10:01 am
by cubitus54
Hello,

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

thank you

Re: UART bug or not in 18F67J60 ?

Posted: Tue Dec 10, 2013 11:54 pm
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.