메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

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

Latest Updated:04/01/2006

Question:

I want to use the 78K0 develop a program in C for the first time, but I don't understand well 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 processing.

(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
  • 이 기사가 도움이 되셨나요?