Specifications
V850E2/MN4 CSIH Control
R01AN0924EJ0100 Rev.1.00 Page 16 of 40
Feb 10, 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 CSIH.
4.2.1 Port Setup
The program described in this application note executes serial transmission/reception by using two macros, the CSIH0
and the CSIH3. The relevant ports must be set up so that the pins for the CSIH0 and the CSIH3 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
SO0F 1 1 1 0 Alternative mode 4, output
SI0F 1 1 1 1 Alternative mode 4, input
CSIH0
SCK0F 1 1 1 0 Alternative mode 4, output
SO3F 1 1 1 0 Alternative mode 4, output
SI3F 1 1 1 1 Alternative mode 4, input
CSIH3
SCK3F 1 1 1 1 Alternative mode 4, input
P13_6 0 0 0 0 Port mode, output PORT
P13_7 0 0 0 0 Port mode, output
Setting examples
/* alternative mode 4 in that csih
CSIH0:Master Mode,transmission
P4_12: CSIHTA0SO
P4_13: CSIHTA0SI
P4_11: CSIHTA0SCO
CSIH3:Slave Mode,receptiom
P4_3: CSIHTA3SO
P4_6: CSIHTA3SI
P4_7: CSIHTA3SCI */
PFCE4 = 0x38c8;
PFC4 = 0x38c8;
PMC4 = 0x38c8;
PM4 = 0x20c0;
/* P13_6,7: LEDs,IO,OUTPUT */
PFCE13 = 0x0000;
PFC13 = 0x0000;
PMC13 = 0x0000;
PM13 = 0x0000;