Synchronous Serial Port (SSI)
14-4
Am186™CC/CH/CU Microcontrollers User’s Manual
14.5
OPERATION
14.5.1
Usage
Note: Before using the SSI port, ensure multiplexed pins are configured to reflect the use
of SSI and not other functionality (see Table 14-1 on page 14-2).
1. Set the ENHCTL bit in the SSSTAT register to 1 so that all bits in the SSCON register
are operational (unless Am186EM-backwards compatibility is required).
2. If using the SDEN signal, initialize the SSI port with the SSCON register: clock polarity
(CLKP bit), device polarity (DENP bit), transmit bit order—LSB or MSB first (MSBF bit),
and the CPU clock divisor (CLKEXP bit field).
If not using SDEN (but using a PIO output as an external enable), use the PIO Set and
PIO Clear registers to provide the external signal while using the DE1 bit of the SSCON
register to provide internal enable. Be sure the corresponding mask bit in the SHMASK
register is set to disable the interrupt.
3. Enable transmit or receive by setting the DE0 or DE1 bit in the SSCON register to 1.
4. Write data with the SSTXD1/SSTXD0 registers or read data with the SSRXD register
(this sets the Port Busy (PB) bit in the SSSTAT register to 1).
5. Wait for the DR/DT bit in the SSSTAT register to go to 0 to indicate the transmit or receive
has completed.
6. Disable the transmit or receive by clearing the DE0 or DE1 bit in the SSCON register to 0.
14.5.2
Master/Slave Configuration
Unlike the asynchronous serial ports described in Chapter 13, “Asynchronous Serial Ports
(UARTs),” the SSI port operates in a master/slave configuration, where the microcontroller
operates as the master port. All other devices that communicate with the microcontroller
through this interface are slave devices. The master initiates a transaction by transmitting
a single byte. This byte tells the slave device whether the transaction is a read or a write
and contains the device address. The microcontroller always drives the interface clock when
an active communication transaction is present on the interface. Slave devices cannot drive
this clock. Because PIOs can be used as external device enables, the microcontroller can
support a number of peripheral devices.
14.5.3
Signal Interface
The SSI port consists of three I/O signals: data (SDATA), clock (SCLK), and enable (SDEN).
The three SSI signals are multiplexed with three programmable I/O signals (PIO12–PIO10).
These pins are PIOs by default, and can be individually reconfigured as SSI pins with the
PIO Mode and PIO Direction registers.
14.5.3.1
SCLK
The SCLK output synchronizes transmit and receive operations between the master
(microcontroller) and slave (peripheral). Based on the selected polarity of the SCLK signal
in the SSCON register, SCLK is at a constant High (default) or Low (when inverted polarity
is selected) level when a transmit or receive operation is
not active on the interface. SCLK
derives from the internal CPU clock divided by 2, 4, 8, 16, 32, 64, 128, or 256. Software
specifies the divisor with the CLKEXP bit field of the SSCON register. When a transfer is
started, the microcontroller toggles this clock for the entire transaction. Each individual
transaction transfers eight data bits.
The clock edge on which data is transmitted and received is programmable with the CLKP
bit in the SSCON register. In the default condition, data is transmitted on the SDATA pin on
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...