pic18f46j50 two UART?

Status
Not open for further replies.

devil6600

Full Member level 5
Joined
Nov 15, 2008
Messages
250
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
Visit site
Activity points
2,931
hi,
microchip pic product page for pic18f46j50 states that this chip has 2-A/E/USART ports. i checked datasheet but it doesn't mention about second uart pin. can anyone tell me where is the second uart located? i wanted to use 2 rx/tx serial port in my application
thanks
 

You decide which pins you want to use for RX and/or TX. This device has remappable pins so you can internally route the serial signals to the second UART by selecting the RPxx pins you want.

Brian.
 
You decide which pins you want to use for RX and/or TX. This device has remappable pins so you can internally route the serial signals to the second UART by selecting the RPxx pins you want.

Brian.

thanks for your reply
i am using picbasic compiler. please see this thread:18F25J11 RTCC & remappable pin options
the guy have used this configuration to remap PWM
RPOR0 = 14 ' RA0, RP0 = P1A output
RPOR15 = 14 ' RC4. RP15 = P1A output
RPOR14 = 14 ' RC3, RP14 = P1A output
so can you please tell me how to remap uart, i need second uart at RD6/PMD6/RP23(RX) and RD7/PMD7/RP24(TX)
i would really appreciate your help

thank you
 

It's all in section 10 of the data sheet.

Basically, you will notice some pins of the IC have RP numbers, these are the Remappable Pins.

For inputs to the IC, use RPINRxx = RP number. For example the RPINR for the second USART (RX) is RPINR16 and you want it mapped to pin RP23 so use RPINR16=23.
For outputs from the IC use RPORxx = function number, where xx is the RP number and the function number comes from table 10.14 in the data sheet. So you would use RPOR24=05.

It makes sense when you read section 10.

Note that the remapping registers are protected so you must follow the procedure shown in example 10.7 to unlock them before they can be assigned and then re-lock them again afterwards.

Brian.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…