SN8F2280 Series
USB 2.0 Full-Speed 8-Bit Micro-Controller
13.7 Master Mode Operation
Master mode of MSP operation from a START signal and end by STOP signal.
The START (S) and STOP (P) bit are clear when reset or MSP function disabled.
In Master mode the SCL and SDA line are controlled by MSP hardware.
Following events will set MSP interrupt request (MSPIRQ), if MSPIEN set, interrupt occurs.
z
z
z
z
z
START condition.
STOP condition.
Data byte transmitted or received.
Acknowledge Transmit.
Repeat START.
13.7.1 Master Mode Support
Master mode enable when MSPC and MSPENB bit set. Once the Master mode enabled, the user had following six
options.
z
z
z
z
z
z
Send a START signal on SCL and SDA line.
Send a Repeat START signal on SCL and SDA line.
Write to MSPBUF register for Data or Address byte transmission.
Send a STOP signal on SCL and SDA line.
Configuration MSP port for receive data.
Send an Acknowledge at the end of a received byte of data.
13.7.2 MSP Rate Generator (MRG)
In MSP Mode, the MSP rate generator’s reload value is located in the lower 7 bit of MSPADR register. When MRG is
loaded with the register, the MRG count down to 0 and stop until another reload has taken place. In MSP mater mode
MRG reload from MSPADR automatically. If Clock Arbitration occur for instance (SCL pin keep low by Slave device),
the MRG will reload when SCL pin is detected High.
SCL clock rate = Fcpu/(MSPADR)*2
For example, if we want to set 400Khz in 4Mhz Fcpu, the MSPADR have to set 0x05h.
MSPADR=4Mhz/400Khz*2=5
MSP Rate Generator Block Diagram
SONiX TECHNOLOGY CO., LTD
Page 142
Version 1.1