Skip to content

RL78G23 64pin Fast Prototyping Board

SuguruHarada edited this page May 30, 2025 · 16 revisions

RL78/G23-64p Fast Prototyping Board

Description

  • The RL78/G23-64p Fast Prototyping Board is provided with interface pins for Arduino Uno conversion.

1. pinlist

  • A pin list of the RL78/G23-64p Fast Prototyping Board is shown below.
RL78/G23 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 PulseIn ShiftIn ShiftOut Servo Stepper LED User Switch
P03 IO0 0 - - - - RxD1 - - - - - -
P02 IO1 1 - - - - TxD1 - - - - - -
P43 IO2 2 - - - - - - - - - - -
P42 IO3 3 - - - - - - - - -
P77 IO4 4 - - - - - - - 0 - - -
P41 IO5 5 - - - - - - - - -
P31 IO6 6 - - - - - - 1 - -
P76 IO7 7 - - - - - - - 2 - - -
P73 IO8 8 - - - - - - - - - - -
P06 IO9 9 - - - - - - - - -
P05 IO10 10 - - - - - SS - - -
P51 IO11 11 - - - - - MOSI 3 - -
P50 IO12 12 - - - - - - MISO 4 - - -
P30 IO13 13 - - - - - - SCK 5 - - -
P40 - 14 - - - - - - - - - - - - - - - -
P52 - 15 - - - - - - - - - LED2 -
P53 - 16 - - - - - - - - - LED1 -
P54 - 17 - - - - - - - - - - -
P55 - 18 - - - - - - - - - - -
P70 - 19 - - - - - - - - - - -
P71 - 20 - - - - - - - - - - -
P72 - 21 - - - - - - - - - - -
P74 - 22 - - - - - - - - - - -
P75 - 23 - - - - - - - - - - -
P121 - 24 - - - - - - - - - - -
P122 - 25 - - - - - - - - - - -
P137(※3) - 26 - - - - - - - 6 - - - - - SW1
P123 - 27 - - - - - - - - - - - - - - - -
P124 - 28 - - - - - - - - - - - - - - - -
P120 - 29 - - - - - - - - - - -
P04 - 30 - - - - - - - - - - -
P17 - 31 - - - - - - - - - - -
P16 - 32 - - - - - - - - - - -
P15 - 33 - - - - - - - - - - -
P14 - 34 - - - - RxD2 - - - - - -
P13 - 35 - - - - TxD2 - - - - - -
P12 - 36 - - - - TxD0 - - - - - -
P11 - 37 - - - - RxD0 - - - - - -
P10 - 38 - - - - - - - - - - -
P146 - 39 - - - - - - - - - - -
P147 - 40 - - - - - - - - - - -
P21 - 41 - - - - - - - - - - - - - - - -
P130(※2) - 42 - - - - - - - - - - - - -
P01 - 43 - - - - - - - - - - -
P00 - 44 - - - - - - - - - - -
P141 - 45 - - - - - - - - - - -
P140 - 46 - - - - - - - - - - -
P60 SCL 47 - - - - - SCL0 - - - - - - - -
P61 SDA 48 - - - - - SDA0 - - - - - - - -
P62 - 49 - - - - - SCL1 - - - - - - - -
P63 - 50 - - - - - SDA1 - - - - - - - -
P22 A0 51 - - A0 - - - - - - - -
P23 A1 52 - - A1 - - - - - - - -
P24 A2 53 - - A2 - - - - - - - -
P25 A3 54 - - A3 - - - - - - - -
P26 A4 55 - - A4 - - - - - - - -
P27 A5 56 - - A5 - - - - - - - -
- EVDD(IOREF) - - - - - - - - - - - - - - -
- RESET - - - - - - - - - - - - - - - - -
- 3V3 - - - - - - - - - - - - - - - - -
- 5V - - - - - - - - - - - - - - - - -
- GND - - - - - - - - - - - - - - -
- VIN - - - - - - - - - - - - - - - - -
P20(※1) AREF - - - - - - - - - - - - - - - - -
  • (※1) External reference voltage supply pin.
  • (※2) Pin 42 (P130) is an output-only port, so the INPUT setting cannot be used.
  • (※3) Pin 26 (P137) is an input-only port, so the OUTPUT setting cannot be used.

2. Functions

  • The functions of the RL78/G23-64p Fast Prototyping Board are listed below.
No. Name Function
1 Digital IO 52 Digital input pins / 41 Digital input_pullup pins / 48 Digital output pins
2 Analog IO 6 Analog input pins
3 PWM 6 PWM output pins(※3)
4 Serial(UART) 3 Serial(UART) channels(※1)(※2)
5 SoftwareSerial 7 RX pins / 48 TX pins
6 Wire(I2C) 2 Wire(I2C) channels
7 SPI 1 SPI channel(※2)
8 Interrupt 7 Interrupt pins
9 Tone 6 Tone output pins(※3)
10 PulseIn 52 Pulse input pins
11 PulseInLong 52 Pulse input pins
12 ShiftIn 48 Clock output pins / 52 Data input pins
13 ShiftOut 48 Clock output pins / 48 Data output pins
14 Servo 48 Servo output pins(※3)
15 Stepper 48 Stepper output pins
16 LED 2 on Board LED (pin 15 and pin 16)(※4)
17 User Switch 1 on Board User Switch (pin 26)(※5)
  • (※1) Serial(RxD0, TxD0) connects to a Micro-USB connector via a USB-serial converter.

  • (※2) Serial1 cannot be used simultaneously with the SPI channel.

  • (※3) PWM and Tone and Servo cannot be used simultaneously.

  • (※4) LED1 (pin 16) and LED2 (pin 15) are pulled up on the circuit.

  • (※5) User Switch (pin 26) is pulled up on the circuit.

  • Maximum number of functions that can be registered with attachCyclicHandler() is 8.

  • RTC and snooze mode cannot be used simultaneously.

  • The combination of reset factors and return values obtained by getResetFlag() are as follows.

    Reset factor Rutern value memo
    External reset or Power on reset 0x00 -
    Low voltage detection 0x01 The voltage detection level is 1.65 V on the falling edge and 1.69 V on the rising edge.
    Illegal instruction 0x80 -
  • Refer to the following link for reference on the various functions.

  • Arduino Reference - Arduino Reference

2-1. Digital IO

  • The RL78/G23-64p Fast Prototyping Board has 52 Digital input pins and 41 Digital input_pullup pins and 48 Digital output pins.
  • When using digital IO, pinMode() must first be called to set the specified pin to operate as an input or output.

    1. Using pin 2 as an input.
   pinMode(2,INPUT);
   val = digitalRead(2);
    1. Using pin 3 as an input_pullup.
   pinMode(3,INPUT_PULLUP);
   val = digitalRead(3);
    1. 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-13, 15-26, 29-40, 43-56 0-13, 15-25, 29-40, 43-46 0-13, 15-25, 29-40, 42-46, 51-56 -

2-2. Analog IO(Analog Input)

  • The RL78/G23-64p 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).
  • analogReference(EXTERNAL) is not supported.

  • 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/G23-64p Fast Prototyping Board has 6 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 range of frequencies that can be set with analogWriteFrequency() is 500 Hz to 8 MHz, and analogWrite() cannot control the duty ratio in detail at high frequencies.
  • The pins corresponding to PWM output are as follows.
PWM output pin memo
3, 5, 6, 9-11 -

2-4. Serial(UART)

  • The RL78/G23-64p 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 36 37 Connect to Micro USB port via USB-Serial Converter when J13 is open-circuit
Serial1 1 0 Serial1 cannot be used simultaneously with the SPI channel.
Serial2 35 34 -

2-5. SoftwareSerial

  • The RL78/G23-64p Fast Prototyping Board has 7 RX pins and 48 TX pins for SoftwareSerial.
  • The receive buffer size is 256 bytes.
  • The baud rates that can be set are 4800, 9600, 19200, 38400, 57600, and 115200 bps.
  • The pins corresponding to SoftwareSerial are listed below.
RX pin TX pin memo
4, 6, 7, 11-13, 26 0-13, 15-25, 29-40, 42-46, 51-56 -

2-6. Wire(I2C)

  • The RL78/G23-64p Fast Prototyping Board has 2 wire (I2C) channels.
  • The pin assignments of the channels are as follows.
Channel Data pin Clock pin memo
Wire 48(SDA) 47(SCL) -
Wire1 50 49 Connected to Grove I/F.

2-7. SPI

  • The RL78/G23-64p Fast Prototyping Board has 1 SPI channel.
  • The configurable clock frequency range is 125 kHz to 8 MHz.
  • 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 Serial1 cannot be used simultaneously with the SPI channel.

2-8. Interrupt

  • The RL78/G23-64p 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 4 -
1 6 -
2 7 -
3 11 -
4 12 -
5 13 -
6 26(SW) -

2-9. Tone

  • The RL78/G23-64p Fast Prototyping Board has 6 tone output pins.
  • The range of frequencies that can be set with Tone() is from 500 Hz to 65535 Hz.
  • The correspondences between tone outputs and pins are as follows.
Tone output pin memo
3, 5, 6, 9-11 -

2-10. PulseIn

  • The RL78/G23-64p Fast Prototyping Board has 52 pulse input pins corresponding to pulseIn().
  • The default time until timeout is 1 second and can be set in the range of unsigned long type.
  • If measurement is made while using functions with interrupts such as HardwareSerial, the error with the actual pulse width may be large.
  • The pins corresponding to pulseIn() are as follows.
Pulse input pin memo
0-13, 15-26, 29-40, 43-56 -

2-11. PulseInLong

  • The RL78/G23-64p Fast Prototyping Board has 52 pulse input pins corresponding to pulseInLong().
  • The time until timeout is set to 1 second by default, within the range of unsigned long type.
  • Pulse measurement is not available when interrupt processing is disabled.
  • The pins corresponding to pulseInLong() are as follows.
Pulse input pin memo
0-13, 15-26, 29-40, 43-56 -

2-12. ShiftIn

  • The RL78/G23-64p Fast Prototyping Board has 48 clock output pins and 52 data input pins corresponding to shiftIn().
  • The pins corresponding to shiftIn() are as follows.
Clock pin Data pin memo
0-13, 15-25, 29-40, 42-46, 51-56 0-13, 15-26, 29-40, 43-56 -

2-13. ShiftOut

  • The RL78/G23-64p Fast Prototyping Board has 48 clock output pins and 48 data output pins corresponding to shiftOut() and shiftOutEx().
  • The pins corresponding to shiftOut() and shiftOutEx() are as follows.
Clock pin Data pin memo
0-13, 15-25, 29-40, 42-46, 51-56 0-13, 15-25, 29-40, 42-46, 51-56 -

2-14. Servo

  • The RL78/G23-64p Fast Prototyping Board has 48 Servo output pins.
  • The number of pins that can be used simultaneously is limited to 36.
  • The correspondences between Servo output pins are as follows.
Servo output pin memo
0-13, 15-25, 29-40, 42-46, 51-56 -

2-15. Stepper

  • The RL78/G23-64p Fast Prototyping Board has 48 Stepper output pins.
  • The correspondences between Stepper output pins are as follows.
Stepper output pin memo
0-13, 15-25, 29-40, 42-46, 51-56 -

2-16. LED

  • The RL78/G23-64p Fast Prototyping Board has two LEDs mounted on it.
  • The pins connected to the LEDs are as follows.
Name pin memo
LED1 16 -
LED2 15 -

2-17. User Switch

  • The RL78/G23-64p Fast Prototyping Board has one user switch.
  • The pin connected to the user switch is as follows.
Name pin memo
SW1 26 -

3. Macros

3-1. Macro definitions for Digital Port

3-1-1. digitalPinToPort(pin)

  • 57 pins can be specified in this macro.
  • The pins supporting to this macro are shown below.
pin number memo
0-56 Returns 255 if a value other than the left one is specified.

3-1-2. digitalPinToBitMask(pin)

  • 57 pins can be specified in this macro.
  • The pins supporting to this macro are shown below.
pin number memo
0-56 Returns 255 if a value other than the left one is specified.

3-1-3. portOutputRegister(port)

  • 16 ports can be specified in this macro.
  • The port numbers that can be specified for this macro are shown below.
port number memo
0-15 Returns NULL if a value other than the left one is specified.

3-1-4. portInputRegister(port)

  • 16 ports can be specified in this macro.
  • The port numbers that can be specified for this macro are shown below.
port number memo
0-15 Returns NULL if a value other than the left one is specified.

3-1-5. portModeRegister(port)

  • 15 ports can be specified in this macro.
  • The port numbers that can be specified for this macro are shown below.
port number memo
0-12, 14, 15 Returns NULL if a value other than the left one is specified.
Clone this wiki locally