ht82j30r Holtek Semiconductor Inc., ht82j30r Datasheet - Page 37

no-image

ht82j30r

Manufacturer Part Number
ht82j30r
Description
Ht82j30r/ht82j30a -- 16 Channel A/d Mcu With Spi Interface
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT82J30R
Manufacturer:
HOLTEK
Quantity:
155
After Power on, the contents of the SBDR register will be
in an unknown condition while the SBCR register will de-
fault to the condition below:
Note that data written to the SBDR register will only be
written to the TXRX buffer, whereas data read from the
SBDR register will actual be read from the register.
SPI Bus Enable/Disable
To enable the SPI bus, CSEN should be set high, then
SCK, SDI, SDO and SCS lines should all be zero, then
wait for data to be written to the SBDR (TXRX buffer)
register. For the Master Mode, after data has been writ-
ten to the SBDR (TXRX buffer) register then transmis-
sion or reception will start automatically. When all the
data has been transferred the TRF bit should be set. For
the Slave Mode, when clock pulses are received on
SCK, data in the TXRX buffer will be shifted out or data
on SDI will be shifted in.
Rev. 1.10
CKS M1 M0 SBEN MLS CSEN WCOL TRF
0
1
1
0
0
0
SPI Interface Control Register
0
SPI Bus Timing
0
37
To Disable the SPI bus SCK, SDI, SDO, SCS should be
floating.
SPI Operation
All communication is carried out using the 4-line inter-
face for both Master or Slave Mode. The timing diagram
shows the basic operation of the bus.
The CSEN bit in the SBCR register controls the overall
function of the SPI interface. Setting this bit high, will en-
able the SPI interface by allowing the SCS line to be ac-
tive, which can then be used to control the SPI inteface.
If the CSEN bit is low, the SPI interface will be disabled
and the SCS line will be in a floating condition and can
therefore not be used for control of the SPI interface.
The SBEN bit in the SBCR register must also be high
which will place the SDI line in a floating condition and
the SDO line high. If in the Master Mode the SCK line will
be either high or low depending upon the clock polarity
configuration option. If in the Slave Mode the SCK line
will be in a floating condition. If SBEN is low then the bus
will be disabled and SCS, SDI, SDO and SCK will all be
in a floating condition.
HT82J30R/HT82J30A
March 13, 2008

Related parts for ht82j30r