RL78G23 64ピン Fast Prototyping Board - renesas/Arduino GitHub Wiki

RL78/G23-64p Fast Prototyping Board

Description

  • RL78/G23-64p Fast Prototyping BoardはArduino-Uno互換のインターフェースピンを持つボードである。

1. pinlist

  • RL78/G23-64p Fast Prototyping Boardのピンリストを以下に示す。
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) 外部リファレンス電圧供給端子
  • (※2) 42番ピン(P130)は出力専用ポートのためINPUT設定の使用不可
  • (※3) 26番ピン(P137)は入力専用ポートのためOUTPUT設定の使用不可

2. Functions

  • RL78/G23-64p Fast Prototyping Boardの機能一覧を以下に示す。
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 ShiftIn 48 Clock output pins / 52 Data input pins
12 ShiftOut 48 Clock output pins / 48 Data output pins
13 Servo 48 Servo output pins(※3)
14 Stepper 48 Stepper output pins
15 LED 2 on Board LED (pin 15 and pin 16)(※4)
16 User Switch 1 on Board User Switch (pin 26)(※5)
  • (※1) Serial(RxD0, TxD0)はUSB-シリアル変換器を介してMicro-USBコネクタに接続

  • (※2) Serial1とSPIは同時使用不可

  • (※3) PWMとToneとServoは同時使用不可

  • (※4) LED1 (pin 16) and LED2 (pin 15) は回路上でプルアップされている。

  • (※5) User Switch (pin 26) は回路上でプルアップされている。

  • 各機能のリファレンスは以下を参照のこと。

  • Arduino Reference - Arduino Reference

  • Arduino 日本語リファレンス (musashinodenpa.com)

2-1. Digital IO

  • RL78/G23-64p Fast Prototyping Boardはデジタル入力ピンを52本、デジタルプルアップ入力ピンを41本、デジタル出力ピンを48本持つ。
  • デジタルIOを使用する場合、初めにpinMode()を呼び出して、指定したピンを入力または出力として動作するように設定する必要がある。

    1. 2番ピンを入力として使用する
   pinMode(2,INPUT);
   val = digitalRead(2);
    1. 3番ピンをプルアップ入力として使用する
   pinMode(3,INPUT_PULLUP);
   val = digitalRead(3);
    1. 4番ピンを出力として使用する
   pinMode(4,OUTPUT);
   digitailWrite(4,HIGH);
  • デジタル入出力に対応するピンを以下に示す。
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)

  • RL78/G23-64p Fast Prototyping Boardは6本のアナログ入力ピンを持つ。
  • 入力されたアナログ信号をAD変換し結果としてデジタル値を返す。
  • アナログ入力を使用する場合analogRead()でアナログピン名を指定しデータを読み取る。
  • アナログ入力に使用される参照電圧はデフォルトで5Vである。analogReference(INTERNAL)を呼び出すと参照電圧は内部基準電圧(1.48V)となる。

  • A0ピンを使用する
val =analogRead(A0);
  • アナログ入力に対応するピンを以下に示す。
Analog input pin memo
A0-A5 -

2-3. PWM

  • RL78/G23-64p Fast Prototyping Boardは6本のPWM出力ピンを持つ。
  • PWM出力を使用する場合analogWrite()でピン名、デューティを指定しPWM出力を行う。
  • PWM出力パルスの周波数を変更する場合はanaglogWriteFrequency()で周波数を設定した後、analogWrite()でPWM出力を行う。
  • PWM出力に対応するピンを以下に示す。
PWM output pin memo
3, 5, 6, 9-11 -

2-4. Serial(UART)

  • RL78/G23-64p Fast Prototyping BoardはSerial(UART)を3チャネル持つ。
  • 各チャネルを使用する場合のデフォルトの送信バッファサイズは256バイトである。
  • 各チャネルを使用する場合のデフォルトの受信バッファサイズは256バイトである。
  • 各チャネルのピン割り当てを以下に示す。
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

  • RL78/G23-64p Fast Prototyping BoardはSoftwareSerialのRX pinを7本、TX pin を48本持つ。
  • SoftwareSerialに対応するピンを以下に示す。
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)

  • RL78/G23-64p Fast Prototyping BoardはWire(I2C)を2チャネル持つ。
  • 各チャネルのピン割り当てを以下に示す。
Channel Data pin Clock pin memo
Wire 48(SDA) 47(SCL) -
Wire1 50 49 Connected to Grove I/F.

2-7. SPI

  • RL78/G23-64p Fast Prototyping BoardはSPIを1チャネル持つ。
  • 各チャネルのピン割り当てを以下に示す。
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

  • RL78/G23-64p Fast Prototyping Boardは外部割込みピンを7本持つ。
  • 外部割込み番号とピンの対応を以下に示す。
Interrupt No. Interrupt pin memo
0 4 -
1 6 -
2 7 -
3 11 -
4 12 -
5 13 -
6 26(SW) -

2-9. Tone

  • RL78/G23-64p Fast Prototyping Boardはtone出力ピンを6本持つ。
  • Tone出力に対応するピンを以下に示す。
Tone output pin memo
3, 5, 6, 9-11 -

2-10. PulseIn

  • RL78/G23-64p Fast Prototyping BoardはpulseIn()に対応するPulse入力ピンを52本持つ。
  • pulseIn()に対応するピンを以下に示す。
Pulse input pin memo
0-13, 15-26, 29-40, 43-56 -

2-11. ShiftIn

  • RL78/G23-64p Fast Prototyping BoardはshiftIn()に対応するクロック出力ピンを48本、データ入力ピンを52本持つ。
  • shiftIn()に対応するピンを以下に示す。
Clock pin Data pin memo
0-13, 15-25, 29-40, 42-46, 51-56 0-13, 15-26, 29-40, 43-56 -

2-12. ShiftOut

  • RL78/G23-64p Fast Prototyping BoardはshiftOut()に対応するクロック出力ピンを48本、データ出力ピンを48本持つ。
  • shiftOut()に対応するピンを以下に示す。
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-13. Servo

  • RL78/G23-64p Fast Prototyping BoardはServo出力ピンを48本持つ。
  • Servo出力に対応するピンを以下に示す。
Servo output pin memo
0-13, 15-25, 29-40, 42-46, 51-56 -

2-14. Stepper

  • RL78/G23-64p Fast Prototyping BoardはStepper出力ピンを48本持つ。
  • Stepper出力に対応するピンを以下に示す。
Stepper output pin memo
0-13, 15-25, 29-40, 42-46, 51-56 -

2-15. LED

  • RL78/G23-64p Fast Prototyping Boardは2つのLEDが実装されている。
  • LEDに接続するピンを以下に示す。
Name pin memo
LED1 16 -
LED2 15 -

2-16. User Switch

  • RL78/G23-64p Fast Prototyping Boardは1つのユーザスイッチが実装されている。
  • ユーザスイッチに接続するピンを以下に示す。
Name pin memo
SW1 26 -
⚠️ **GitHub.com Fallback** ⚠️