forked from arduino/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 5
RL78G16 Fast Prototyping Board pin list
SuguruHarada64 edited this page Jun 26, 2023
·
7 revisions
- A pin list of the RL78/G16 Fast Prototyping Board is shown below.
RL78/G16 port Number | 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 | SD Card | Servo Motor | Stepper |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
P04 | 0 | 〇 | J2-23 | - | - | - | SoftRXD | - | - | 0 | - | - | 〇 | - | - | - | - | - |
P03 | 1 | 〇 | J2-22 | - | - | - | SoftTXD | - | - | - | - | - | 〇 | - | - | - | - | - |
P11 | 2 | 〇 | J1-12 | - | - | - | - | - | - | 1 | - | - | 〇 | - | - | - | - | - |
P10 | 3 | 〇 | J1-11 | - | - | 〇 | - | - | - | 2 | 〇 | 〇 | 〇 | - | - | - | - | - |
P14 | 4 | 〇 | J1-15 | - | - | - | - | - | - | 3 | - | - | 〇 | - | - | - | - | - |
P16 | 5 | 〇 | J2-20 | - | - | - | - | - | - | - | - | - | 〇 | - | - | - | - | - |
P17 | 6 | 〇 | J2-21 | - | - | 〇 | - | - | - | - | 〇 | 〇 | 〇 | - | - | - | - | - |
P43 | 8 | 〇 | J1-1 | - | - | - | - | - | - | - | - | - | 〇 | - | - | - | - | - |
P21 | 11 | 〇 | J2-29 | - | - | - | - | - | - | - | 〇 | - | 〇 | - | - | - | - | - |
P20 | 12 | 〇 | J2-30 | - | - | - | - | - | - | - | - | - | 〇 | - | - | - | - | - |
P41 | 13 | 〇 | J2-32 | - | - | - | - | - | - | - | - | - | 〇 | - | - | - | - | - |
P40 | 14 | - | J1-2 | - | - | - | - | - | - | - | - | - | 〇 | - | - | - | - | - |
P137 | 15 | - | J1-4 | - | - | - | - | - | - | 4 | - | - | 〇 | - | SW2 | - | - | - |
P12 | 16 | - | J1-13 | - | - | - | - | - | - | - | - | - | 〇 | LED1 | - | - | - | - |
P13 | 17 | - | J1-14 | - | - | - | - | - | - | 5 | - | - | 〇 | - | - | - | - | - |
P15 | 18 | - | J1-16 | - | - | - | - | - | - | - | - | - | 〇 | LED2 | - | - | - | - |
P00 | 19 | - | J2-17 | - | - | - | TXD0 | - | - | - | - | - | 〇 | - | - | - | - | - |
P01 | 20 | - | J2-18 | - | - | - | RXD0 | - | - | - | - | - | 〇 | - | - | - | - | - |
P60 | 21 | 〇 | J1-9 | 〇 | - | - | - | SCL0 | - | - | - | - | 〇 | - | - | - | - | - |
P61 | 22 | 〇 | J-10 | 〇 | - | - | - | SDA0 | - | - | - | - | 〇 | - | - | - | - | - |
P05 | 23 | 〇 | J2-24 | - | A0 | - | - | - | - | 6 | - | - | 〇 | - | - | - | - | - |
- | IOREF | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
P125 | RESET | 〇 | J1-3 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
- | 3V3 | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
VDD | 5V | 〇 | J1-8 | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
GND | GND | 〇 | J1-7 | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
- | VIN | 〇 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
- The functions of the RL78/G16 Fast Prototyping Board are listed below.
No. | Name | Function |
---|---|---|
1 | Digital IO | 21 Digital Input/output pins |
2 | Analog IO | 1 Analog Input pins |
3 | PWM | 2 PWM Output pins |
4 | Serial(UART) | 1 Serial(UART) channels(※1) |
5 | Wire(I2C) | 1 Wire(I2C) channels |
6 | Interrupt | 7 Interrupt pins |
7 | Tone | 3 Tone Output pins |
8 | Pulse | 2 Pulse Input/Output pins |
9 | ShiftIn/ShitOut | 10(5pair) shiftIn/ShiftOut pins |
10 | LED | 2 on Board LED (pin 16 and pin 18) |
11 | User Switch | 1 on Board User Switch (pin 15) |
- (※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/G16 Fast Prototyping Board has 29 digital inputs and outputs.
- In order to use digital I/O, it is necessary to first configure pin direction settings using
-
- Using pin15 as an input.
pinMode(15,INPUT);
val = digitalRead(15);
-
- Using pin18 as an output.
pinMode(18,OUTPUT);
digitailWrite(18,HIGH);
-
The pins corresponding to digital I/O are as follows.
Digital pin memo 0-28
- The RL78/G16 Fast Prototyping Board has 1 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 | - |
- The RL78/G16 Fast Prototyping Board has 2 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, 6 | - |
- The RL78/G16 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 |
---|---|---|---|
Serial | 19 | 20 | Connect to Micro USB port via USB-Serial Converter. |
- The RL78/G16 Fast Prototyping Board has 1 wire (I2C) channel.
- The pin assignments of the channels are as follows.
Channel | Data pin | Clock pin | memo |
---|---|---|---|
Wire | 21 | 22 | - |
- The RL78/G16 Fast Prototyping Board has 7 external interrupt pins.
- The correspondences between external interrupt numbers and pins are as follows.
Interrupt No. | Interrupt pin | memo |
---|---|---|
0 | 0 | - |
1 | 2 | - |
2 | 3 | - |
3 | 4 | - |
4 | 15 | - |
5 | 17 | - |
6 | 23 | - |
- The RL78/G16 Fast Prototyping Board has 3 tone output pins.
- The correspondences between tone outputs and pins are as follows.
Tone output pin | memo |
---|---|
3 | - |
6 | - |
11 | - |
- The RL78/G16 Fast Prototyping Board has 2 pulse input/output pins.
- The correspondences between pulse inputs/outputs and pins are as follows.
Pulse input/output pin | memo |
---|---|
3 | - |
6 | - |
- The RL78/G16 Fast Prototyping Board has 21 shift input/output pins (10 pairs).
- The correspondences between shift inputs/outputs and pins are as follows.
Clock pin | Data pin | memo |
---|---|---|
0~6, 8, 11-23 | 0~6 , 8, 11-23 | Pin15 can only be used for ShiftIn Data Pin. |
- The RL78/G16 Fast Prototyping Board has two LEDs mounted on it.
- The pins connected to the LEDs are as follows.
Name | pin | memo |
---|---|---|
LED1 | 16 | - |
LED2 | 18 | - |
- TheRL78/G16 Fast Prototyping Board has one user switch.
- The pin connected to the user switch is as follows.
Name | pin | memo |
---|---|---|
SW1 | 15 | - |