Table of Contents
Chapter 1 Overview..................................................................................................................................................... 13
1.1 Overview........................................................................................................................................................... 14
1.2 Startup Program.................................................................................................................................................14
1.3 Register Setup of Each Function....................................................................................................................... 14
1.4 Sample Program 1............................................................................................................................................. 14
1.5 Sample Program 2............................................................................................................................................. 14
1.6 Appendix 1 / Appendix 2...................................................................................................................................14
1.7 Development Environment of Sample Program................................................................................................15
1.7.1 Development environment of sample program 1.......................................................................................15
1.7.2 Development environment of sample program 2.......................................................................................16
Chapter 2 Startup Program...........................................................................................................................................17
2.1 Overview........................................................................................................................................................... 18
2.2 Startup Processing............................................................................................................................................. 18
2.2.1. Memory area (Section)......................................................................................................................... 18
2.2.2 Declaration for section...............................................................................................................................19
2.2.3 Setting stack area....................................................................................................................................... 19
2.2.4 Clear area to be used to 0...........................................................................................................................19
2.2.5 Initializing static variables with initial values............................................................................................19
Chapter 3
Register Setup of Each Function
........................................................................................................................21
3.1 Description of C and Assembly Languages.......................................................................................................22
3.2 Operation mode/Initializing Peripherals............................................................................................................24
3.2.1 Memory control register.............................................................................................................................24
3.2.2 Expansion address control register.............................................................................................................25
3.2.3 Oscillation frequency register....................................................................................................................26
3.2.4 CPU mode control register.........................................................................................................................27
3.3 Memory, Initializing Peripheral.........................................................................................................................30
3.3.1 Address bank register.................................................................................................................................30
3.3.2 ROM correction register............................................................................................................................ 31
3.4 Operation State Transition, Initializing Peripherals...........................................................................................34
3.4.1 Oscillation stabilization wait control register.............................................................................................34
3.5 Interrupt, Initializing Peripherals.......................................................................................................................36
3.5.1 Interrupt control register............................................................................................................................ 36
3.5.2 Noise filter control register........................................................................................................................42
3.5.3 Both edges interrupt control register..........................................................................................................43
3.5.4 Key interrupt control register.....................................................................................................................44