1826j53 UART2 PROBLEM

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
ProtonLaser
Posts: 18
Joined: Wed Jan 23, 2013 7:07 pm
Has thanked: 6 times
Been thanked: 2 times

1826j53 UART2 PROBLEM

Post by ProtonLaser »

Hi i have a compiling error
CHIP: PIC18F26J53
FLOWCODE 5.0 VERSION 5.4.0.0
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(521): error: left operand must be l-value
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(521:13): error: failed to generate expression
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(522): error: left operand must be l-value
C:\Program Files (x86)\Flowcode\v5\CAL\PIC\PIC_CAL_UART.c(522:13): error: failed to generate expression
What should i do to fix this because i urgently need to use UART2?

I am also trying to use the Peripheral Pin Select feature

Thank you
Attachments
uart2.fcf
(21.46 KiB) Downloaded 269 times

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: 1826j53 UART2 PROBLEM

Post by Benj »

Hello,

What pins would you like the UART2 connected to and I will see if I can fix the file to route to these pins for you.

ProtonLaser
Posts: 18
Joined: Wed Jan 23, 2013 7:07 pm
Has thanked: 6 times
Been thanked: 2 times

Re: 1826j53 UART2 PROBLEM

Post by ProtonLaser »

Hi Ben
TX2 -> RP1(pin3)

Thanks

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: 1826j53 UART2 PROBLEM

Post by Benj »

Hello,

Can RX2 be anything for now or do you have a free I/O pin in mind I can assign it to?

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: 1826j53 UART2 PROBLEM

Post by Benj »

Hello,

I have re-routed TX2 to RP1 and RX2 to RP0 in this CAL file.
PIC_CAL_UART.c
(25.86 KiB) Downloaded 247 times
Copy the file to your "Flowcode/v5/CAL/PIC" folder and the compilation should then go through correctly.

Here are the lines of code that control the remapping, line number 525 in the C file.

Code: Select all

RPOR1 = 6;		//TX2 - RP1 - RA1
RPINR16 = 0;	//RX2 - RP0 - RA0

ProtonLaser
Posts: 18
Joined: Wed Jan 23, 2013 7:07 pm
Has thanked: 6 times
Been thanked: 2 times

Re: 1826j53 UART2 PROBLEM

Post by ProtonLaser »

Hi Ben

I have tryed what you said, copied the file into my folder, and compiled again using the second UART, and the same problem appears.

I have posted my program, to see if there is something i am doing wrong in my code.

Thanks.
Attachments
flow_CCP4_polling.fcf
(15.91 KiB) Downloaded 251 times

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: 1826j53 UART2 PROBLEM

Post by Benj »

Ah sorry about that, I had capitalised the register names and they should be in lower case,

This one should work correctly.
Attachments
PIC_CAL_UART.c
(25.86 KiB) Downloaded 267 times

ProtonLaser
Posts: 18
Joined: Wed Jan 23, 2013 7:07 pm
Has thanked: 6 times
Been thanked: 2 times

Re: 1826j53 UART2 PROBLEM

Post by ProtonLaser »

Great It worked.
Thanks Ben.

Post Reply