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 FPB-RL78L23 has 4 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 anaglogWriteFrequency() 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, 9, 10
-
2-4. Serial(UART)
The FPB-RL78L23 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
74
75
Connect to USB Type-C port via USB-to-Serial Converter when J23 is 1-2 shorts.
Serial1
1
0
-
Serial2
23
24
Connected to Pmod1 I/F.
2-5. Wire(I2C)
The FPB-RL78L23 has 2 wire (I2C) channels.
The pin assignments of the channels are as follows.
Channel
Data pin
Clock pin
memo
Wire
87(SDA)
86(SCL)
-
Wire1
38
37
Connected to Pmod2 I/F.
2-6. Interrupt
The FPB-RL78L23 has 8 external interrupt pins.
The correspondences between external interrupt numbers and pins are as follows.
Interrupt No.
Interrupt pin
memo
0
2
-
1
3
-
2
10
-
3
11
-
4
31(SW)
-
5
36
-
6
45
-
7
A0
-
2-7. Tone
The FPB-RL78L23 has 4 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, 9, 10
-
2-8. PulseIn
The FPB-RL78L23 has 80 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, 20-26, 31-40, 42-53, 57-93
-
2-9. PulseInLong
The FPB-RL78L23 has 80 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, 20-26, 31-40, 42-53, 57-93
-
2-10. ShiftIn
The FPB-RL78L23 has 76 clock output pins and 80 data input pins corresponding to shiftIn().
The pins corresponding to shiftIn() are as follows.
Clock pin
Data pin
memo
0-7, 9-13, 20-26, 32-35, 37-53, 57-85, 88-93
0-13, 20-26, 31-40, 42-53, 57-93
-
2-11. ShiftOut
The FPB-RL78L23 has 76 clock output pins and 76 data output pins corresponding to shiftOut() and shiftOutEx().
The pins corresponding to shiftOut() and shiftOutEx() are as follows.
Clock pin
Data pin
memo
0-7, 9-13, 20-26, 32-35, 37-53, 57-85, 88-93
0-7, 9-13, 20-26, 32-35, 37-85, 88-93
-
2-12. LED
The FPB-RL78L23 has two LEDs mounted on it.
The pins connected to the LEDs are as follows.
Name
pin
memo
LED1
34
-
LED2
35
-
2-13. User Switch
The FPB-RL78L23 has one user switch.
The pin connected to the user switch is as follows.