Specifications
V850E2/MN4 UARTJ Control
R01AN0926EJ0100 Rev.1.00 Page 12 of 30
Feb 07, 2012
4.2 Register Setup
This section explains how to set up the relevant registers according to the flow charts shown in section 4.1. The
registers described below must be configured to control the UARTJ.
4.2.1 Port Setup
The program described in this application note executes serial transmission/reception by using two macros, the
UARTJ1 and the UARTJ3. The relevant ports must be set up so that the pins for the UARTJ1 and the UARTJ3 are
enabled.
The LEDs are connected to port 13. The P13_7 pin is used for LED1. The P13_6 pin is used for LED2.
Macro Pin PMC PFCE PFC PM Corresponding Function
TXD1F 1 0 1 0 Alternative mode 2, output UARTJ1
RXD1F 1 0 1 1 Alternative mode 2, input
TXD3F 1 0 1 0 Alternative mode 2, output UARTJ3
RXD3F 1 0 1 1 Alternative mode 2, input
P13_6 0 0 0 0 Port mode, output PORT
P13_7 0 0 0 0 Port mode, output
Setting examples
/* P4_6: URTJTA3RXD; alternative mode 2; input*/
/* P4_7: URTJTA3TXD; alternative mode 2; output*/
PFCE4 = 0x0000;
PFC4 = 0x00C0;
PMC4 = 0x00C0;
PM4 = 0x0040;
/* P13_6,7:LEDs; port mode; output*/
/* P13_5:URTJTA1RXD; alternative mode 2; input*/
/* P13_4:URTJTA1TXD; alternative mode 2; output*/
PFCE13 = 0x0000;
PFC13 = 0x0030;
PMC13 = 0x0030;
PM13 = 0x0020;