1. Overview ............................................................................................................................ 8
1.1
Purpose ...................................................................................................................................................... 8
1.2
Features ..................................................................................................................................................... 8
2. Introduction ........................................................................................................................ 9
3.1
Introduction .............................................................................................................................................. 10
3.2
Creating the Project ................................................................................................................................. 10
4.1
Introduction .............................................................................................................................................. 13
4.2
4.3
The 'Board' tabbed page .......................................................................................................................... 15
4.3.1
Board configuration page ............................................................................................................... 15
4.4
The 'Clocks' tabbed page ........................................................................................................................ 16
4.4.1
Clocks configuration ....................................................................................................................... 16
4.5
The 'Components' tabbed page ............................................................................................................... 17
4.5.1
4.5.2
Compare Match Timer .................................................................................................................... 18
4.5.3
Interrupt Controller ......................................................................................................................... 21
4.5.4
Ports ............................................................................................................................................... 23
4.5.5
SCI/SCIF Asynchronous Mode ...................................................................................................... 27
4.5.6
SPI Clock Synchronous Mode ....................................................................................................... 30
4.5.7
Single Scan Mode S12AD .............................................................................................................. 33
4.6
The 'Pins' tabbed page ............................................................................................................................ 36
4.6.1
4.7
Building the Project .................................................................................................................................. 39
5. User Code Integration ...................................................................................................... 40
5.1
Project Settings ........................................................................................................................................ 40
5.2
LCD Code Integration .............................................................................................................................. 41
5.2.1
SPI Code ........................................................................................................................................ 43
5.2.2
CMT Code ...................................................................................................................................... 44
5.3
Additional include paths ........................................................................................................................... 45
5.4
Switch Code Integration ........................................................................................................................... 46
5.4.1
Interrupt Code ................................................................................................................................ 46
5.4.2
De-bounce Timer Code .................................................................................................................. 48
5.4.3
Main Switch and ADC Code ........................................................................................................... 49
5.5
Debug Code Integration ........................................................................................................................... 52
5.6
UART Code Integration ............................................................................................................................ 53
5.6.1
SCI Code ........................................................................................................................................ 53
5.6.2
Main UART code ............................................................................................................................ 55
5.7
LED Code Integration .............................................................................................................................. 57
6. Debugging the Project ..................................................................................................... 59
7. Additional Information ...................................................................................................... 61
Table of Contents
2
studio ......................................................................................... 10
2
studio ........................................................................... 13