The RL78/G24 Fast Prototyping Board has 53 Digital input pins and 44 Digital input_pullup pins and 51 Digital output pins.
When using digital IO, pinMode() must first be called to set the specified pin to operate as an input or output.
Using pin 2 as an input.
pinMode(2,INPUT);
val=digitalRead(2);
Using pin 3 as an input_pullup.
pinMode(3,INPUT_PULLUP);
val=digitalRead(3);
Using pin 4 as an output.
pinMode(4,OUTPUT);
digitailWrite(4,HIGH);
The pins corresponding to digital I/O are as follows.
Digital input pin
Digital input_pullup pin
Digital output pin
memo
0-17, 20-44, 47-50, 52-57
0-17, 21-40, 47, 48, 52, 55-57
0-17, 21-44, 46-48, 52-57
-
2-2. Analog IO(Analog Input)
The RL78/G24 Fast Prototyping Board has 6 analog input pins.
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.
The reference voltage used for analog input is 5V by default. When analogReference(INTERNAL) is called, the reference voltage is the internal reference voltage (1.48V).
Use A0 pin
val=analogRead(A0);
The pins corresponding to analog input are as follows.
analog input pin
memo
A0-A5
-
2-3. PWM
The RL78/G24 Fast Prototyping Board has 8 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 analogWriteFrequency() 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, 6, 9-13
-
2-4. Serial(UART)
The RL78/G24 Fast Prototyping Board has 3 serial (UART) channels.
The default transmit buffer size when using each channel is 256 bytes.
The default receive buffer size when using each channel is 256 bytes.
The pin assignments of the channels are as follows.
Channel
Transmit pin
Receive pin
memo
Serial
35
34
Connect to Micro USB port via USB-Serial Converter when J14 is open-circuit
Serial1
1
0
Serial1 cannot be used simultaneously with the SPI, SPI1, and Wire3 channel.
Serial2
24
25
Serial2 cannot be used simultaneously with the Wire2 channel.
2-5. SoftwareSerial
The RL78/G24 Fast Prototyping Board has 14 RX pins and 51 TX pins for SoftwareSerial.
The pins corresponding to SoftwareSerial are listed below.
RX pin
TX pin
memo
2, 4, 5, 7, 14, 15, 20, 24, 25, 36-39, 48
0-17, 21-44, 46-48, 52-57
-
2-6. Wire(I2C)
The RL78/G24 Fast Prototyping Board has 4 wire (I2C) channels.
The pin assignments of the channels are as follows.
Channel
Data pin
Clock pin
memo
Wire
50(SDA)
49(SCL)
Wire1
27(SDA)
26(SCL)
Wire1 cannot be used simultaneously with the Serial channel.
Wire2
30(SDA)
31(SCL)
Wire2 cannot be used simultaneously with the Serial2 channel.
Wire3
12(SDA)
13(SCL)
Wire3 cannot be used simultaneously with the Serial1, and SPI channel.
2-7. SPI
The RL78/G24 Fast Prototyping Board has 2 SPI channels.
The pin assignment of the channel is as follows.
Channel
Chip Select pin
Data out pin
Data in pin
Clock pin
memo
SPI
10
11
12
13
SPI cannot be used simultaneously with the Selial1,and Wire3 channel.
SPI1
24
1
0
47
SPI1 cannot be used simultaneously with the Selial1 channel.
2-8. Interrupt
The RL78/G24 Fast Prototyping Board has 14 external interrupt pins.
The correspondences between external interrupt numbers and pins are as follows.
Interrupt No.
Interrupt pin
memo
0
2
-
1
4
-
2
5
-
3
7
-
4
14
-
5
15
-
6
20(SW)
-
7
24
-
8
25
-
9
36
-
10
37
-
11
38
-
12
39
-
13
48
-
2-9. Tone
The RL78/G24 Fast Prototyping Board has 8 tone output pins.
The correspondences between tone outputs and pins are as follows.
Tone output pin
memo
3, 5, 6, 9-13
-
2-10. PulseIn
The RL78/G24 Fast Prototyping Board has 53 pulse input pins corresponding to pulseIn().
The pins corresponding to pulseIn() are as follows.
Pulse input pin
memo
0-17, 20-44, 47-50, 52-57
-
2-11. ShiftIn
The RL78/G24 Fast Prototyping Board has 51 clock output pins and 53 data input pins corresponding to shiftIn().
The pins corresponding to shiftIn() are as follows.
Clock pin
Data pin
memo
0-17, 21-44, 46-48, 52-57
0-17, 20-44, 47-50, 52-57
-
2-12. ShiftOut
The RL78/G24 Fast Prototyping Board has 51 clock output pins and 51 data output pins corresponding to shiftOut().
The pins corresponding to shiftOut() are as follows.
Clock pin
Data pin
memo
0-17, 21-44, 46-48, 52-57
0-17, 21-44, 46-48, 52-57
-
2-13. Servo
The RL78/G24 Fast Prototyping Board has 51 Servo output pins.
The correspondences between Servo output pins are as follows.
Servo output pin
memo
0-17, 21-44, 46-48, 52-57
-
2-14. Stepper
The RL78/G24 Fast Prototyping Board has 51 Stepper output pins.
The correspondences between Stepper output pins are as follows.
Stepper output pin
memo
0-17, 21-44, 46-48, 52-57
-
2-15. LED
The RL78/G24 Fast Prototyping Board has two LEDs mounted on it.
The pins connected to the LEDs are as follows.
Name
pin
memo
LED1
21
-
LED2
22
-
2-16. User Switch
The RL78/G24 Fast Prototyping Board has one user switch.
The pin connected to the user switch is as follows.