Contents
Contents
1
2
3
4
5
General Description.................................................................................................. 1
Features ..................................................................................................................... 1
Pin Assignment ......................................................................................................... 2
Pin Description.......................................................................................................... 3
Function Description ................................................................................................ 4
5.1 Operational Registers.........................................................................................4
5.1.1 R0 (Indirect Address Register)............................................................................4
5.1.2 R1 (TCC).............................................................................................................4
5.1.3 R2 (Program Counter) & Stack ...........................................................................4
5.1.4 R3 (Status Register)............................................................................................6
5.1.5 R4 (RAM Select Register)...................................................................................6
5.1.6 R5~R8 (Port 5 ~ Port 8) ......................................................................................6
5.1.7 R9 (Port9)............................................................................................................7
5.1.8 RA (SPIRB: SPI Read Buffer) .............................................................................8
5.1.9 RB (SPIWB: SPI Write Buffer).............................................................................8
5.1.10 RC (SPIS: SPI Status Register) ..........................................................................8
5.1.11 RD (SPIC: SPI Control Register) ........................................................................9
5.1.12 RE (TMR1: Timer 1 Register)..............................................................................9
5.1.13 RF (PWP: Pulse Width Preset Register)...........................................................10
5.1.14 R20~R3E (General-purpose Register)..............................................................10
5.1.15 R3F (Interrupt Status Register) .........................................................................10
5.2 Special Purpose Registers ............................................................................... 11
5.2.1 A (Accumulator).................................................................................................11
5.2.2 CONT (Control Register)...................................................................................11
5.2.3 IOC5 ~ IOC9 (I/O Port Control Register) ..........................................................11
5.2.4 IOCC (T1CON: Timer 1 Control Register).........................................................11
5.2.5 IOCD (Pull-high Control Register).....................................................................12
5.2.6 IOCE (WDT Control Register)...........................................................................12
5.2.7 IOCF (Interrupt Mask Register).........................................................................13
5.3 TCC/WDT Presacler.........................................................................................15
5.4 I/O Ports ...........................................................................................................15
5.5 Serial Peripheral Interface Mode......................................................................17
5.5.1 Overview & Features.........................................................................................17
5.5.2 SPI Function Description...................................................................................19
5.5.3 SPI Signal & Pin Description.............................................................................21
5.5.4 Programmed the Related Registers..................................................................22
5.5.5 SPI Mode Timing...............................................................................................25
5.5.6 Software Application of SPI...............................................................................26
Product Specification (V1.0) 10.18.2007
• iii