forked from arduino/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 5
RL78G22 Fast Prototyping Board pin list
SuguruHarada64 edited this page May 15, 2023
·
8 revisions
- A pin list of the RL78/G22 Fast Prototyping Board is shown below.
RL78/G22 port Number | Pin Name | Arduino Pin Number(Digital IO) | Arduino Uno I/F | MCU header | Grove I/F | Analog IO | PWM | Serial | Wire | SPI | Interrupt | Tone | Pulse | ShiftIn/ShiftOut | LED | User Switch |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
P01 | IO0 | 0 | 〇 | - | - | - | - | RXD1 | - | - | - | - | - | 〇 | - | - |
P00 | IO1 | 1 | 〇 | - | - | - | - | TXD1 | - | - | - | - | - | 〇 | - | - |
P140 | IO2 | 2 | 〇 | - | - | - | - | - | - | - | 6 | - | - | 〇 | - | - |
P31 | IO3 | 3 | 〇 | - | - | - | 〇 | - | - | - | 4 | 〇 | 〇 | 〇 | - | - |
P120 | IO4 | 4 | 〇 | - | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P41 | IO5 | 5 | 〇 | - | - | - | 〇 | - | - | - | - | 〇 | 〇 | 〇 | - | - |
P10 | IO6 | 6 | 〇 | - | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P146 | IO7 | 7 | 〇 | - | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P30 | IO8 | 8 | 〇 | - | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P17 | IO9 | 9 | 〇 | - | - | - | - | - | - | - | - | 〇 | 〇 | 〇 | - | - |
P16 | IO10 | 10 | 〇 | - | - | - | 〇 | - | - | - | 5 | 〇 | 〇 | 〇 | - | - |
P13 | IO11 | 11 | 〇 | - | - | - | - | - | - | MOSI | - | - | - | 〇 | - | - |
P14 | IO12 | 12 | 〇 | - | - | - | - | - | - | MISO | - | - | - | 〇 | - | - |
P15 | IO13 | 13 | 〇 | - | - | - | - | - | - | SCK | - | - | - | 〇 | - | - |
P62 | - | 14 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | LED1 | - |
P63 | - | 15 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | LED2 | - |
P75 | - | 16 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P74 | - | 17 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P73 | - | 18 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P72 | - | 19 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P71 | - | 20 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P70 | - | 21 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P50 | - | 22 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P51 | - | 23 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P12 | - | 24 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P11 | - | 25 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P22 | - | 26 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P21 | - | 27 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P130 | - | 28 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P40 | - | 29 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P124 | - | 30 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P123 | - | 31 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P137 | - | 32 | - | 〇 | - | - | - | - | - | - | 0 | - | - | 〇 | - | 〇 |
P122 | - | 33 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P121 | - | 34 | - | 〇 | - | - | - | - | - | - | - | - | - | 〇 | - | - |
P60 | SCL | 35 | 〇 | - | 〇 | - | - | - | - | - | - | - | - | - | - | - |
P61 | SDA | 36 | 〇 | - | 〇 | - | - | - | - | - | - | - | - | - | - | - |
P147 | A0 | 37 | 〇 | - | - | A0 | - | - | - | - | - | - | - | 〇 | - | - |
P27 | A1 | 38 | 〇 | - | - | A1 | - | - | - | - | - | - | - | 〇 | - | - |
P26 | A2 | 39 | 〇 | - | - | A2 | - | - | - | - | - | - | - | 〇 | - | - |
P25 | A3 | 40 | 〇 | - | - | A3 | - | - | - | - | - | - | - | 〇 | - | - |
P24 | A4 | 41 | 〇 | - | - | A4 | - | - | - | - | - | - | - | 〇 | - | - |
P23 | A5 | 42 | 〇 | - | - | A5 | - | - | - | - | - | - | - | 〇 | - | - |
P20 | - | AREF | 〇(※1) | - | - | - | - | - | - | - | - | - | - | - | - | - |
VDD | - | IOREF | 〇 | - | 〇 | - | - | - | - | - | - | - | - | - | - | - |
RESET | - | RESET | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - |
- | - | 3V3 | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - |
- | - | 5V | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - |
GND | - | GND | 〇 | - | 〇 | - | - | - | - | - | - | - | - | - | - | - |
- | - | VIN | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - |
(※1) External reference voltage supply pin
- The functions of the RL78/G22 Fast Prototyping Board are listed below.
No. | Name | Function |
---|---|---|
1 | Digital IO | 14 Digital Input/output pins |
2 | Analog IO | 6 Analog Input pins |
3 | PWM | 3 PWM Output pins |
4 | Serial(UART) | 1 Serial(UART) channels(※1) |
5 | Wire(I2C) | 0 Wire(I2C) channels |
6 | Interrupt | 4 Interrupt pins |
7 | Tone | 4 Tone Output pins |
8 | Pulse | 4 Pulse Input/Output pins |
9 | ShiftIn/ShitOut | 40(20pair) shiftIn/ShiftOut pins |
10 | LED | 2 on Board LED (pin 14 and pin 15) |
11 | User Switch | 1 on Board User Switch (pin 2) |
- (※1) One serial channel (Serial) connects to a Micro-USB connector via a USB-serial converter.
- Refer to the following link for reference on the various functions.
- Arduino Reference - Arduino Reference
- The RL78/G22 Fast Prototyping Board has 14 digital inputs and outputs.
- In order to use digital I/O, it is necessary to first configure pin direction settings using
-
- Using pin3 as an input.
pinMode(3,INPUT);
val = digitalRead(3);
-
- Using pin4 as an output.
pinMode(4,OUTPUT);
digitailWrite(4,HIGH);
-
The pins corresponding to digital I/O are as follows.
Digital pin memo 0-13
- The RL78/G22 Fast Prototyping Board has 6 analog inputs and outputs.
- Analog input signals are A/D converted and the resulting digital values are returned.
- To use analog input, use analogRead() to specify the analog pin name and read the data.
- Use A0 pin
val =analogRead(A0);
- The pins corresponding to analog input are as follows.
analog input pin | memo |
---|---|
A0 | - |
A1 | - |
A2 | - |
A3 | - |
A4 | - |
A5 | - |
- The RL78/G22 Fast Prototyping Board has 3 PWM output pins.
- To use PWM output, use analogWrite() to specify the pin name and duty, and generate PWM output.
- To change the PWM output pulse frequency, use analogWritePinFrequency() to set the frequency, then use analogWrite() to generate PWM output.
- The pins corresponding to PWM output are as follows.
PWM output pin | memo |
---|---|
3, 5, 10 | - |
- The RL78/G22 Fast Prototyping Board has one serial (UART) channel.
- A serial channel (Serial) is connected to a Micro-USB connector via a USB-serial converter.
- The Serial1 channel and SPI channel cannot be used simultaneously.
- The pin assignments of the channels are as follows.
Channel | Transmit pin | Receive pin | memo |
---|---|---|---|
Serial1 | 1 | 0 | Serial1 cannot be used simultaneously with the SPI channel. |
- The RL78/G22 Fast Prototyping Board has 0 wire (I2C) channel.
- The pin assignments of the channels are as follows.
Channel | Data pin | Clock pin | memo |
---|---|---|---|
Wire | - | - | - |
- 4 channels have 4 external interrupt pins.
- The correspondences between external interrupt numbers and pins are as follows.
Interrupt No. | Interrupt pin | memo |
---|---|---|
0 | 32 | - |
4 | 3 | - |
5 | 5 | - |
6 | 1 | - |
- The RL78/G22 Fast Prototyping Board has 4 tone output pins.
- The correspondences between tone outputs and pins are as follows.
Tone output pin | memo |
---|---|
3 | - |
5 | - |
9 | - |
10 | - |
- The RL78/G22 Fast Prototyping Board has 4 pulse input/output pins.
- The correspondences between pulse inputs/outputs and pins are as follows.
Pulse input/output pin | memo |
---|---|
3 | - |
5 | - |
9 | - |
10 | - |
- The RL78/G22 Fast Prototyping Board has 40 shift input/output pins (20 pairs).
- The correspondences between shift inputs/outputs and pins are as follows.
Clock pin | Data pin | memo |
---|---|---|
0-34, 37-42 | 0-34, 37-42 |
- The RL78/G22 Fast Prototyping Board has two LEDs mounted on it.
- The pins connected to the LEDs are as follows.
Name | pin | memo |
---|---|---|
LED1 | 14 | - |
LED2 | 15 | - |
- TheRL78/G22 Fast Prototyping Board has one user switch.
- The pin connected to the user switch is as follows.
Name | pin | memo |
---|---|---|
SW1 | 32 | - |