Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 23, 2024, 04:35:12 16:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: PIC24FJ1024GB606, six UART support issue CCS v5.091 [Solved]  (Read 5382 times)
0 Members and 1 Guest are viewing this topic.
jartur
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 1
-Receive: 0


« on: September 05, 2020, 10:10:39 22:10 »

Hello all, thanks for any incoming help and have a good day.

I found some issue with the CCS and the PIC24FJ1024GB606, I need to use six UART port at the same time, but the CCS only can handle 4 UART at the same time, I checked the Header of this device and only show U1RX, U2RX, U3RX, U4RX, then I try to also use U5RX and U6RX I got errors in compilation because these are invalid pins ID not exist.

I use CCS v5.091 with MPLAB X ide v5.30 but with the CCS ide also I got the same errors.
« Last Edit: September 06, 2020, 02:07:39 14:07 by jartur » Logged
jartur
Inactive

Offline Offline

Posts: 5

Thank You
-Given: 1
-Receive: 0


« Reply #1 on: September 06, 2020, 02:07:09 14:07 »

Thanks a lot, the problem was solved in other forum and I want to share, the solution is U5 and U6 are "hard pinned" and not support PPS, we need use directly the "use rs232". With this now I can make tests with the six UART port, I only made some change in the assignation pins and for now, I donīt see problems, thanks and have a good day

Example code

Code:
#include <24FJ1024GB606.h>
#use delay(clock=32MHz)


#pin_select U1TX = PIN_F4
#pin_select U1RX = PIN_F5
#use rs232(UART1,BAUD=115200, PARITY=N, BITS=8, STOP=1, RESTART_WDT, ERRORS , STREAM=UART1_STREAM)

#pin_select U2TX = PIN_D4
#pin_select U2RX = PIN_C14
#use rs232(UART2,BAUD=115200, PARITY=N, BITS=8, STOP=1, RESTART_WDT, ERRORS , STREAM=UART2_STREAM)

#pin_select U3TX = PIN_G9
#pin_select U3RX = PIN_D1
#use rs232(UART3,BAUD=115200, PARITY=N, BITS=8, STOP=1, RESTART_WDT, ERRORS , STREAM=UART3_STREAM)

#pin_select U4TX = PIN_B2
#pin_select U4RX = PIN_B4
#use rs232(UART4,BAUD=115200, PARITY=N, BITS=8, STOP=1, RESTART_WDT, ERRORS , STREAM=UART4_STREAM)

// For UART5 and UART6 use hard pinned by datasheet (We can't move these pins)

// TX UART5 = RD1
// RX UART5 = RD6
#use rs232(UART5,BAUD=115200, PARITY=N, BITS=8, STOP=1, RESTART_WDT, ERRORS , STREAM=UART5_STREAM)
// TX UART6 = RB7
// RX UART6 = RB12
#use rs232(UART6,BAUD=115200, PARITY=N, BITS=8, STOP=1, RESTART_WDT, ERRORS , STREAM=UART6_STREAM)


void main() {
   
   while(TRUE);
}
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright Đ 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC