Remapped USART PIC18F47J53

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
DarkWolf
Posts: 15
Joined: 18 Jan 2019 11:38

Remapped USART PIC18F47J53

#1 Post by DarkWolf » 06 Mar 2019 09:27

Hi.

Tell me, I need to do remapped USART 1 and USART 2.
Usart 1 - RC0 (Rx), RC1 (Tx)
Usart 2 - RC5 (Rx), RC6 (Tx)

Can I do it? Or I need to use for USART RC6 (Tx) RC7 (Rx). If you can tell me a sample code.
Thanks in advance for your help!

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Remapped USART PIC18F47J53

#2 Post by jovana.medakovic » 07 Mar 2019 14:43

Hello,

If you open datasheet of your MCU, you can see that you cannot remap USART1, but you can remap USART2 (UART_Remappable)(Page 156, Table 10-13).
http://ww1.microchip.com/downloads/en/D ... 09964C.pdf

In this document on page 4, you can see that RC5 pins cannot be remapped.
Also, if you remap USART2 on RC6, you cannot use USART1 and USART2 at the same time, because USART1 uses RC6 pin for Tx.

In the attachment, you can see a simple example, where USART2 is remapped to D5 and D6 pins.

Kind regards,
Jovana
Attachments
UART.zip
(74.63 KiB) Downloaded 130 times

DarkWolf
Posts: 15
Joined: 18 Jan 2019 11:38

Re: Remapped USART PIC18F47J53

#3 Post by DarkWolf » 28 Mar 2019 09:52

Hello. Thanks for your help.
How to make remap USART2 I understand. It will work on pins RD4 and RD5. But I can't understand if I can remap USART1 and how to use it after that? After reading the first post moved new pins USART1 RB6,RC2. It is necessary to make remap USART1 and USART2.

User avatar
jovana.medakovic
mikroElektronika team
Posts: 986
Joined: 18 Dec 2018 10:36

Re: Remapped USART PIC18F47J53

#4 Post by jovana.medakovic » 28 Mar 2019 13:01

Hello,

As I said in my previous post, you cannot remap USART1. You have to use RC6 (Tx) and RC7 (Rx) if you want to use USART1.
You can read more about this in the datasheet on page 155, where also you can find this:
The MSSP1 and EUSART1 modules are not routed through the PPS module

Kind regards,
Jovana

Post Reply

Return to “mikroPascal PRO for PIC General”