Page 5 - Programming Microcontrollers in C
P. 5
6 Large Microcontrollers ..................................................... 287
The MC68HC16 .................................................................................. 288
System Integration Module ( SIM)....................................................... 296
A Pulse Width Modulation Program .................................................... 299
Cosmic MC68HC16 Compiler ............................................................. 305
Table Look- Up.................................................................................... 319
Digital Signal Processor Operations ................................................... 326
Other MC68HC16 Considerations ...................................................... 345
7 Advanced Topics in Programming Embedded
Systems ( M68HC12) ............................................................ 347
Numeric Encoding............................................................................... 352
Numeric Decoding............................................................................... 354
Coding the alpha data ......................................................................... 356
The Monitor Program .......................................................................... 370
The SAVEIT() Routine ........................................................................ 376
The printout() and the printafter() Functions ....................................... 378
Reset................................................................................................... 381
Input/ Output Functions....................................................................... 382
Putting It All Together.......................................................................... 386
Summary............................................................................................. 391
8 MCORE, a RISC Machine .................................................. 393
Delay Routine...................................................................................... 395
Delays Revisited ................................................................................. 401
Serial Input/ Output ............................................................................. 404
Handling Interrupts .............................................................................. 413
A Clock Program................................................................................. 419
Keyboard............................................................................................. 432
Integrating Keyboard and Clock.......................................................... 440
Adding a Display ................................................................................. 442
Summary............................................................................................. 446
Index ...................................................................................... 447