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.

Using 2 Independant UARTS on a PIC

Status
Not open for further replies.

ste2006

Advanced Member level 4
Joined
May 1, 2012
Messages
118
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
2,226
Hopefully a simple one that i cant seem to work out,

I am using a PIC18F26J13 which has 2 EUARTs built into it. I want to connect one to a PC and the second to a GSM Module. I am using Pins RC6 & RC7 for EUART 1 but what pins can i use for UART2??

It seems a simple question but one i cant find the answer too,

Any thoughts would be great,

Thanks,
 

See section 10.7 of the data sheet "Peripheral Pin Select".

The second EUART isn't natively connected to any pins but you can internally map it to any of the 'RP' pins you like. It's a two stage process, you have to map the peripheral to the output pin and also the input pin to the peripheral. The process is protected for safety, you have to go through a simple unlocking procedure before you can map the pins. It's all in the data sheet.

Brian.
 
Hi, you should use PPS peripheral pin select to use UART2 using:

RPINR16: PERIPHERAL PIN SELECT INPUT REGISTER 16
RX2DT2R<4:0>: EUSART2 Synchronous/Asynchronous Receive (RX2/DT2) to the Corresponding RPn Pin bits

RPINR15: PERIPHERAL PIN SELECT INPUT REGISTER 15
T5CKR<4:0>: Timer5 External Clock Input (T5CKI) to the Corresponding RPn Pin bits

you can use any of RPn pin as remapped pin for UART2
 
Thanks Guys,

Have never used PPS before so i guess thats why i missed out on it,

Appreciate the advice though,

Stephen
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top