Using the
SSC (SPI) Interface in a Multimaster System
Semiconductor Group
2 of 40
AP1632 06.96
1
2
3
3.1
3.2
3.3
3.4
3.5
3.5.1 Send data .................................................................................................................9
3.5.2 Receive data...........................................................................................................10
3.6
Running LED light...................................................................................................11
3.7
SSC scan routine....................................................................................................12
3.8
Creating the microcontroller executable files..........................................................12
3.9
Know problems.......................................................................................................14
4
Source codes and compiling tools .....................................................................15
4.1
SSC demo software:
C code
.................................................................................15
4.1.1 Main program -
SSC.C
............................................................................................15
4.1.2 System initialization -
INIT_SYS.C
.......................................................................16
4.1.3 SSC initialization -
INIT_SSC.C18
4.1.4 Key interrupt service routine -
KEY_INT.C
............................................................19
4.1.5 Running LED light -
RUNLIGHT.C
..........................................................................22
4.1.6 SSC scan routine -
SSC_SCAN.C
...........................................................................23
4.1.7 SSC receive interrupt service routine -
RX_INT.C
.................................................24
4.1.8 SSC transmit routine -
TX_SSC.C
..........................................................................26
4.1.9 SSC transmit interrupt service routine -
TX_INT.C
................................................27
4.1.10 C header file -
SSC.H
.............................................................................................28
4.2
System register initialization, ASM code -
INIT_167.SRC
....................................29
4.3
Linker and locator control file -
SSC.ILO
...............................................................32
4.4
Locator output file -
SSC.MAP
.................................................................................33
4.5
Miscellaneous files for compiling............................................................................35
Introduction.............................................................................................................3
General operation and hardware environment for the SSC demo......................3
SSC demo software descrition..............................................................................5
Main program............................................................................................................5
System initialization..................................................................................................5
SSC initialization.......................................................................................................6
Key service routine...................................................................................................7
Routines for SSC data transmission.........................................................................8
5
LED display board - schematic............................................................................40
AP1632 ApNote - Revision History
Actual Revision : Rel.01 Previous Revison: none
Page of
actual Rel.
prev. Rel.
Page of
Subjects changes since last release)