跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

Can you explain the flow of processing in 78K0 to develop a program in C?

Last Updated:11/14/2017

Question:

I want to use the 78K0 develop a program in C for the first time, but I don't understand the flow of processing from starting by reset to executing the process (main function) that I want the program to do.

Answer:

The processing in question is performed by a start-up routine.

An application program of a microcontroller is ultimately written to internal ROM (mask ROM or flash memory) and is embedded into an application system.
In addition, the initial settings of the internal peripheral I/O functions of the microcontroller must be set in advance.
Moreover, setting to use the standard functions and run-time library of C must be made.
To perform this processing, the start-up routine is executed immediately after the system is started after reset.
The start-up routine performs the following process:

(1) Preprocessing - Performs processing necessary for using the standard library.
(2) Initial setting of hardware - Set the Initial settings of the internal peripheral I/O functions of the microcontroller. Define the actual processing as a hdwinit function.
(3) ROMization processing - Copies the default value with a default value from ROM to an actual variable area (RAM).
(4) Starting main function - Calls the main function and executes the actual program.

Of the above processing, the hdwinit function must be actually created for initial settings of hardware in (2) above.
Describe the setting in accordance with the internal peripheral I/O to be used to the hdwinit function.
Suitable Products
RL78 Family
78K Family