|
|
View previous topic :: View next topic |
Author |
Message |
Steve_P
Joined: 05 Jun 2017 Posts: 6
|
PIC24FJ1024GA606 Problem with UART5 und UART6 pin select |
Posted: Tue Sep 12, 2017 10:24 am |
|
|
Hi, I want to use all HW-UART of the PIC24FJ1024GA606.
U1TX/RX to U4TX/RX works fine.
U5TX/RX and U6RX/TX are reported as unknown Pin ID.
Compiler Version 5.074
Code: |
#pin_select U1TX=PIN_B4
#pin_select U1RX=PIN_B2
#use rs232(UART1, baud=115200, errors, stream=RS485A)
#pin_select U2TX=PIN_G6
#pin_select U2RX=PIN_G8
#use rs232(UART2, baud=115200, errors, stream=RS485B)
#pin_select U3TX=PIN_B15
#pin_select U3RX=PIN_F5
#use rs232(UART3, baud=115200, errors, stream=RS485C)
#pin_select U4TX=PIN_F2
#pin_select U4RX=PIN_F3
#use rs232(UART4, baud=115200, errors, stream=USB)
#pin_select U5TX=PIN_D4
#pin_select U5RX=PIN_D5
#use rs232(UART5, baud=115200, errors, stream=FUNK)
#pin_select U6TX=PIN_D1
#pin_select U6RX=PIN_D2
#use rs232(UART6, baud=115200, errors, stream=NET)
|
How can I solve this problem ?
Thanks for your help!!
Steve |
|
|
gaugeguy
Joined: 05 Apr 2011 Posts: 303
|
|
Posted: Tue Sep 12, 2017 11:25 am |
|
|
UART5 and UART6 are not pin selectable. They are on fixed hardware pins. |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1348
|
Re: PIC24FJ1024GA606 Problem with UART5 und UART6 pin select |
Posted: Tue Sep 12, 2017 11:45 am |
|
|
Just to add to gaugeguy's response, the following should work (Assuming your other UARTS are correctly pin selected).
Code: |
#pin_select U1TX=PIN_B4
#pin_select U1RX=PIN_B2
#use rs232(UART1, baud=115200, errors, stream=RS485A)
#pin_select U2TX=PIN_G6
#pin_select U2RX=PIN_G8
#use rs232(UART2, baud=115200, errors, stream=RS485B)
#pin_select U3TX=PIN_B15
#pin_select U3RX=PIN_F5
#use rs232(UART3, baud=115200, errors, stream=RS485C)
#pin_select U4TX=PIN_F2
#pin_select U4RX=PIN_F3
#use rs232(UART4, baud=115200, errors, stream=USB)
#use rs232(UART5, baud=115200, errors, stream=FUNK)
#use rs232(UART6, baud=115200, errors, stream=NET)
|
|
|
|
gaugeguy
Joined: 05 Apr 2011 Posts: 303
|
|
Posted: Tue Sep 12, 2017 1:03 pm |
|
|
UART5 is on D1 & D6
UART6 is on B7 & B12
You will need to rethink your connection choices... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19510
|
|
Posted: Tue Sep 12, 2017 1:18 pm |
|
|
and this (of course) is why it is always vital at the start of the project to ensure you are using all 'fixed' peripherals in the right locations, before anything else. Reading the data sheet.... |
|
|
Steve_P
Joined: 05 Jun 2017 Posts: 6
|
|
Posted: Wed Sep 13, 2017 8:27 am |
|
|
Thank you!! Of course you are right.... |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|