RL78
RL78 Family is a 16-bit CPU core for embedded microcontrollers of Renesas Electronics introduced in 2010.
Architecture
The RL78 family is an accumulator-based register-bank CISC instruction set architecture. Although it has eight 8-bit registers or four 16-bit register pairs, essentially all arithmetic operations are performed on a single accumulator. Its basic ISA is succeeded from 78K0R, which has 75 same instructions out of 80. It has a 20-bit address space.Special-purpose registers consist of:
- 20-bit program counter PC
- 16-bit stack pointer SP. This is always 2-byte aligned.
- 8-bit program status word PSW. This includes a carry flag, auxiliary carry flag and zero flag, but not a negative flag or overflow flag. The former is unnecessary, as it is possible to branch on the most significant bit of the accumulator directly, but the lack of the latter makes signed comparisons awkward. The PSW also includes an interrupt enable bit which controls whether interrupts are enabled or disabled, with the exception of NMI.
- Two 4-bit segment registers, describes below.
The basic 2-operand ALU operations come in the following forms:
- A, #immediate
- A, register
- register, A
- A, addr8
- A, addr16
- A,
- A,
- A,
- A,
The architecture is consistently little-endian, with all multi-bytes values appearing least significant byte.
Microarchitectures
RL78 family processors have 3-stage instruction pipelining. Most models have four register banks which may be selected quickly.RL78 has three microarchitecture variants as follows.
| μ-Arch | ALU | Registers | Instructions | Pipeline | Remark | Documents |
| RL78-S3 | 16-bit | 8× 8-bit ×4 banks | 81 | 3-stage | μ-arch variants | |
| RL78-S2 | 16-bit | 8× 8-bit ×4 banks | 75 | 3-stage | μ-arch variants | |
| RL78-S1 | 8-bit | 8× 8-bit | 74 | 3-stage | μ-arch variants | |
| 78K0R | 16-bit | 8× 8-bit ×4 banks | 80 | 3-stage | Direct predecessor Extended 78K/0 | |
| 78K0S | 8-bit | 8× 8-bit | 47 | none | Simplified 78K/0 | |
| 78K0 | 8-bit | 8× 8-bit ×4 banks | 48 | none | Basic 78K/0 core | Renesas official: |
Applications
RL78 covers wide range of application area for mechanical system controls and for user interfaces.Grouping
RL78 Family is divided into some groups, those have unique naming rules.- G1x: For general purpose use
- L1x: For segment LCD controls
- I1x: Mainly for industrial use
- F1x: For automotive use
- D1x: Specially designed for automotive customers only
Application examples
RL78 is suitable for consumer electronics, such as major appliances, small appliances, and medical devices. It is also used for factory automation infrastructure,and energy conservation.
For automotive industry, low-power and size constrained applications are ideally suited to RL78's automotive dedicated communication interfaces, such as CAN, LIN, and IEBus,
Renesas official:
and brushless DC electric motor solutions.
Three special grade of maximum ambient temperature,,, and, are available for some products.
Renesas official:
History
RL78 was the first new MCU to emerge from the new Renesas Electronics company from the merger of NEC Electronics and Renesas Technology and incorporated the features of the NEC 78K0R and Renesas Technology R8C microcontrollers. The RL78 core variants include the S1, S2, and S3 type cores which evolved from the NEC 78K0R core. The basic S1 core support 74 instructions, the S2 core adds register banking and supports 75 instructions, while the S3 core adds an on-chip multiplier / divider / multiple-accumulate and supports 81 instructions.The RL78 was developed to address extremely low power but highly integrated microcontroller applications, to this end the core offered a novel low power mode of operation called “snooze mode” where the ADC or serial interface can be programmed to meet specific conditions to wake the device from the extreme low power STOP mode of 0.52uA.
Software and development tools
RL78 Family is supported with a various range of hardware and softwareCompilers and IDEs
The GNU Compiler Collection,Renesas CS+,
Renesas e2studio,
and IAR Systems' compiler and development environment
are available.
The Renesas CS+ IDE is free for debug-only use and supports standard ELF executable files. The RL78 ABI defined by Renesas is compatible with IAR's V2 and higher compilers.
Real-time operating systems
Regarding real-time operating systems, CMX Systems, Inc.'s CMX-RTX, Micrium, Inc.'s μC/OS-II and MicroC/OS-III, Segger Microcontroller Systems' embOS, FreeRTOS, and ChibiOS/RT are supported.Code generating tools
Renesas provides a free code generating tool named APPLIcation LEading Tool .Flash ROM programming libraries
Renesas provides free self-programming libraries; Code Flash Librariesand Data Flash Libraries .
A EEPROM Emulation Library is also available for the data-flash to add wear leveling and robustness. Different classes of DFL and EEL are available to match application needs including the standard T01 type, "Tiny" T02 type, and "Pico" T04 type.
In-circuit emulators
Several companies provide on-chip debuggers and full-spec in-circuit emulators. Renesas makes on-chip debuggersas well as third-parties, such as Lauterbach and iSystems.
Renesas
and iSystems
supply full-spec in-circuit emulators.
On-chip device programming tools
Device programming can be achieved by using the on-chip debug port or by using the special serial programming mode of the devices. Renesas supports the serial programming mode with debug tools via the Renesas Flash Programmerand the stand-alone programmers; PG-FP5
and PG-FP6,
while several third-parties support RL78 with their own device programmers.
Variants
RL78 Family has a range of devices from 20pin with 16K Byte flash memory to 128pin with 512K Byte flash memory.RL78/G13
RL78/G13 integrates a +/- 1% accuracy on-chip oscillator, watch dog timer, RTC, power-on reset, low voltage detection, 26 channels of 10bit ADC, 16x16 Multiplier, 32/32 Divider, I2C, CSI/SPI, UART, LIN, multi-function timer array and also built-in IEC 60730 safety support in hardware.This combination of elements enables the system designer to achieve high performance systems operating at very low power levels and at low cost due to the high level of integration in the microcontroller.
RL78/G12
G12 is a smaller version of G13 introduced in 2012. . Introduced with 20, 24, and 30-pin packages with 2 KB to 16 KB small size flash memory although providing the G13 functionality with integrated +/- 1% 24 MHz oscillator, reset circuit, a low voltage detection circuit, watchdog timer, data flash with background operation, and including functional safety, on-chip with A/D converter testing function.This small device is designated for use as a sub-microcontroller suitable for use as in small home appliances and general consumer electronic devices.
RL78/G14
In 2012 an addition to the RL78 family was introduced called the .This device offers higher levels of integration with the inclusion of additional multiply and divide and multiply-accumulate instructions capable of faster processing than the RL78/G13, 2 Channel 8-bit D/A, 2 Channel comparator, and timer array making it suitable for motor control applications.
- Multi-function Timer Array Unit :
- Timer array with encoder function
- Timer array unit
- Interval timer
- Watchdog timer
- Full real time calendar function
- Motor control timer
- Phase timer
- I/O timer
RL78/I1A
An application specific version of the RL78 core was introduced in 2012 for controlling lighting systems, this device was named the RL78/I1A. Specific features of the device such as special PWM timers enable fine dimming, lighting sequence and colour temperature control with power factor correction of the power supply. In addition integrated communication functions for DALI, DMX512 and multiple sensor & user interface controls are provided.Applications for the RL78/I1A include: building automation, LED drivers, lighting controls, fluorescent ballasts, emergency lighting, HID ballasts, digital power supplies, low-cost inverter controls.
RL78/L12
Microcontroller series with LCD DriveEntering mass production at the beginning of 2013, the includes integrated LCD drive capability for 35 segments x 8 or 39 segments x 4. Three alternative LCD drive methods mat be enabled: split capacitor, capacitive charge pump or external split resistor. With the split capacitor method a low power LCD drive of 0.6uA at 3V can be achieved. Selectable functions for every segment pin, and drive for both glass and panel.
RL78/F1x
Automotive MicrocontrollersThe RL78,,, & devices replaced the original devices with many updates including die shrink, faster core speed, improved on-chip debug capability, new peripherals, safety features, and expanded package and memory options. The application note can be used as a guide when migrating from 78K0R/Fx3 to RL78/F1x.