Renesas RL78 - 0. Family Lineup and Features

Published


Hi! Welcome to CircuitBread! This time, we would like to introduce another microcontroller tutorial series, this time dedicated to the Renesas RL78 family. The goal of this tutorial series is not to replace the existing RL78 application notes and manuals but to provide additional references that will hopefully help you understand how the RL78 family operates and how you can use them in your projects. In this tutorial series, we expect to learn about RL78 devices and learn how to program its features such as I/O ports, timers, analog, communication, and other peripherals. So first, let’s check RL78 history, lineup, and features.

If you are not familiar with microcontroller architecture, memory types, registers, peripherals, etc., we recommend that you first check out our microcontroller basics tutorials for you to understand the different terms used in this tutorial series.

After NEC Electronics Corporation and Renesas Technology Corporation joined together to establish Renesas Electronics Corporation, the RL78 was the first microcontroller (MCU) family introduced by Renesas in 2010. It is the successor of the 78K0R Series, a variant of the 78K MCU family which was originally developed by NEC Electronics Corporation. The RL78 combines advanced features of the 78K (78K0, 78K0R) and R8C families which makes them ideal for battery-powered devices and household applications.

Perhaps you have never heard of this MCU family or even Renesas as a company since most hobbyists or makers are so focused on Arduino, Raspberry Pi, ESP32, and other open-source devices. But Renesas is one of the largest providers of MCUs in the world. Renesas ships more than 1 billion units of RL78 MCU per year and are very well known by professionals. However, we do believe that one of the reasons why RL78 and other MCUs from Renesas are not popular with hobbyists is the difficulty of using them compared to the devices supported by Arduino. While the RL78 MCU family may not be as easy to configure as an Arduino Uno, it offers a lot of features, especially low power consumption. That is why we want to evaluate the capabilities of this MCU family and at the same time create a tutorial series that we can share with you. We are not RL78 experts but we will try to make the tutorials as easy as possible.

RL78 Family Lineup and Features

The RL78 family consists of 8-bit and 16-bit microcontrollers. It is divided into different groups: (1) The RL78/G1x and RL78/G2x for General Purpose, (2) The RL78/L1x for LCD, (3) The RL78/I1x and RL78/H1D for ASSP (Application-Specific Standard Product), (4) and the RL78/F1x and RL78/D1x for Automotive Applications.

Renesas RL78 Family
Figure 1. RL78 Groups and Applications.

CPU Core

The RL78 family uses a 16-bit CISC Harvard Architecture CPU core. This CPU core employs a three-stage pipeline which increases the instruction throughput. In processing instructions using this pipeline technique, the execution of the different parts of several instructions are overlapped. It doesn’t decrease the amount of time needed to execute individual instructions, but the good thing is pipelining decreases the overall time needed to execute code.

Renesas RL78 Pipeline
Figure 2. RL78 Instruction Processing Pipeline Sequence.

Pin Count and Memory

As shown in figure 1 and 3, the RL78 MCUs are available in 10-pin to 144-pin packages. The RL78/G10 device has the lowest pin count which is good for small systems. Only the RL78/F15 is available in the 144-pin package but most of the RL78 devices are available at least in a 64-pin package in case you need a lot of I/O pins.

In microcontrollers, the read-only memory (ROM) is used to store the program or code and constant data. That is why it’s called program or code ROM. Since the type of ROM used is flash memory, we call it flash program memory.

In terms of flash program memory, most of the RL78 devices have a 64 or 128KB option. The highest flash program memory you can get is 768KB, but it is only available with the RL78/G23.

Random-access Memory (RAM) is used to store program variables. It is fast and can be freely rewritten. However, once power is removed, RAM loses its contents or data.

In regards to RAM, the lowest option is 128B which is under RL78/G10 while the highest is 48KB available in RL78/G14, RL78/G1H, and RL78/G23 devices.

Data Flash is similar to EEPROM in other microcontrollers. The difference between flash memory and EEPROM is that when you erase contents in flash memory, the whole device is erased while in EEPROM you can select the byte that you just want to erase. Renesas provides data flash and EEPROM emulation libraries to store and erase data on the data flash memory.

Another memory to check in RL78 is the data flash. The available options are 2KB, 4KB, 8KB, and 16KB but take note that some of the RL78 devices don’t have data flash memory. You can use the RL78 Parametric Search tool on the Renesas website to select the right RL78 device for you based on the pin count, program memory, RAM, and data flash memory that you need.

Renesas RL78 Pin Count and Flash Program Memory
Figure 3. RL78 Devices Pin Count and Flash Program Memory.

True Low Power

A popular feature of the RL78 family is their True Low Power. The RL78 MCUs offer three lower power modes: SNOOZE, HALT, and STOP. The SNOOZE mode reduces power consumption by over 30% while the HALT mode saves as much as 80% of total MCU current. You can get the lowest power consumption in STOP mode as more of the CPU functions are disabled in this mode. As far as we can tell, in full STOP mode, current demand drops around 99.5%, though we will be looking into this as we go through these tutorials.

In November 2019, the R5F117GC device (RL78/I1D) was certified by EEMBC ULPMark™-PP as the world's smallest power-consuming MCUs. It supports very low power operation, around 124uA at 1MHz. In 2021, on the 10th anniversary of the RL78 family, Renesas released the RL78/G23 which has the industry’s lowest power consumption. It has a 41uA/MHz CPU operation and only consumes 210nA at STOP mode. In terms of operating voltage, the majority in the RL78 family have a wide operating voltage range, from 1.6 to 5.5V.

Peripherals

While peripherals require additional power, it’s really helpful when a microcontroller has a lot of them.

  • 32MHz ±1% High-Precision On-chip Oscillator
  • On-chip Power-On Reset
  • Low-voltage Detection Circuit
  • Temperature Sensor
  • Data Flash Memory
  • Watchdog Timer
  • Multi Power Supply Interface Port

These are the built-in peripheral functions that I found on the Renesas website which I think are available in most RL78 devices (not all because the RL78/G10 doesn’t have data flash memory). These built-in peripheral functions help in reducing total system costs and if we focus on the RL78/G14 and RL78/G23 devices for a bit, we’ll find that there are even more peripherals that the RL78 family offers.

RL78/G14 Features and Peripherals
Figure 4. RL78/G14 100-pin Product Block Diagram.

Analog

When it comes to analog peripherals, both RL78/G14 and RL78/G23 have an analog-to-digital converter (ADC) with 8 to 20 input channels for the RL78/G14 and up to 26 input channels for the RL78/G23. The RL78/G14 ADC resolution can be set to 8-bit or 10-bit resolution while in RL78/G23, it can be set to 8-bit, 10-bit, or 12-bit resolution. Also, both RL78/G14 and RL78/G23 offer digital-to-analog converters (DAC). Their 8-bit resolution DAC has two channel outputs with 0V to VDD output voltage range. The RL78/G14 and RL78/G23 also have a 2-channel comparator which can be operated in high-speed, low-speed, or in window mode.

Timers

For timers, both of them at least have a 16-bit timer, a watchdog timer, and a real-time clock (RTC) that can count up to 99 years. The RL78/G14 also offers specialized timers, a high-resolution 3-phase complementary PWM mode which is ideal for driving DC brushless motors and also a timer with phase counting mode, which is ideal for counting with a 2-phase encoder.

Data Transfer Controller

Another peripheral which I think is useful, that both RL78/G14 and RL78/G23 offer, is a data transfer controller (DTC). The RL78 includes a unique DTC that transfers data from one memory location to another without using the CPU. This means that the RL78 DTC can operate in HALT or SNOOZE low power modes while doing data transfers which makes it very useful in low power operations.

RL78/G23 Features and Peripherals
Figure 5. RL78/G23 Product Block Diagram.

Communication

For communication, both RL78/G14 and RL78/G23 have serial array units (SAUs) which can be configured to work as one of several common communication protocols. Each single SAU can have up to 4 channels. Both devices have SAU0 and SAU1 but products with 64 pins and below only have 2 channels in SAU1. Only 80 pins and above have a 4-channel SAU1. These channels in an SAU can be used to support common protocols such as UART, simplified I2C, simplified CSI (SPI), and LIN. In addition to SAUs, both devices also have a separate serial interface IICA which can operate in operation stop mode, I2C bus mode (multimaster supported), and wakeup mode. The RL78/G23 also have a separate serial interface UARTA and a remote controller receiver.

Security

Pulling back and considering all of the RL78 family members again, RL78 MCUs in general (though not all because I think the RL78/G10 doesn’t have it) support a security function that prohibits unauthorized persons from changing the program written to the internal flash memory. The RL78 MCUs support security settings such as disabling block erase, disable write, and disabling rewriting boot cluster 0. The RL78/G23 even supports disabling the connection to the programmer and on-chip debugger and enabling programmer connection ID authentication. You can refer to the datasheet of the device for more information about these security settings. When it comes to reading the contents of the flash memory, flash read is disabled in RL78. So your program is safe from being copied. You can read the flash using a debugger but you need to know the 10 byte security ID (HEX) written in the flash memory. However, 10 bytes in HEX will be 16^20 combinations. So it will take years for someone to figure out the security ID.

Summary

I hope this short introduction of the RL78 family gives you an idea of what RL78 MCUs can do. While the RL78 offers a lot of features, I do believe that there are also disadvantages or missing features in the RL78 that we will discover later. Hopefully this overview has also shown why the RL78 series may not be particularly popular with makers but, with the greater security and top tier efficiency, is more focused on professional embedded system engineers. In our next RL78 tutorial, we will talk about the RL78 family development environment in which we will discuss the hardware and software that we need in order to program an RL78 device.

Make Bread with our CircuitBread Toaster!

Get the latest tools and tutorials, fresh from the toaster.

What are you looking for?