Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic18f46j50 two UART?

Status
Not open for further replies.

devil6600

Full Member level 5
Full Member level 5
Joined
Nov 15, 2008
Messages
250
Helped
7
Reputation
14
Reaction score
7
Trophy points
1,298
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.
 
thank you Brian
its really helpful. i'll read section 10
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top