Functional Description
Question 1
What is the working mode for the HT82J30R SPI?
Answer
The HT82J30R SPI can work either in the Master or Slave mode. Under these two modes, either a 3-wire (SCK, SDI and SDO) or 4-wire (SCSB, SCK, SDI and SDO) working mode can be chosen. The CLK can be chosen to have a positive or negative edge and the data can chose either LSB priority or MSB priority.
Question 2
What is the PWM frequency for the HT82J30R?
Answer
The HT82J30R only has a 6+2 Mode PWM, therefore the PWM frequency is equal to Fsys/2e+6, when compared with the 8-bit Mode, gives a frequency increase of four times. The 7+1 Mode PWM is not provided.
Question 3
How is the frequency setup on the HT82J30R SPI Interface?
Answer
The HT82J30R SPI Interface frequency is setup via the 5th and 6th bits in the SBCR register.
With bit 6 and 5 equal to zero, the frequency is fSIO, with fSIO equal to the SPI source clock.
With bit 6 low and bit 5 high, the frequency is equal to fSIO/4
With bit 6 high and bit 5 low, the frequency is equal to fSIO/16
Question 4
How is the Master Mode or Slave Mode selected for the SPI Serial Interface?
Answer
Bits 5 and 6 of the SBCR register are used to select the SPI Master or Slave Mode. When both bits are high, the SPI will be in the Slave Mode, otherwise the Master Mode will be selected.
Question 5
What the SPI clock source options?
Answer
When the SPI is selected as Master Mode, then when bit 7 of the SBCR register is set to 0, the SPI clock source will be fsys/4, where fsys is the system frequency.
Question 6
How is the full-duplex SPI interface used in the HT82J30R?
Answer
The SPI communication system includes a master and a slave. For communication between these two the SDI an SDO lines are transposed. For the master, to write data to the SBDR register, the data will be saved into the TXRX buffer. The master first outputs an SCSB (chip select) signal and then an SCK (clock) signal. On the SCK low or high edge (determined by an option), the data can be transmitted bit by bit from the SDO line MSB first or LSB first (determined by the MLS bit in the SBCR register). When the master determines that the SDI pin has data for reception, it will clock the data into the TXRX buffer on the high or low going SCK edge. For the slave device, its data transmission which is received by the master, is synchronous. After the slave receives an effective master chip select and clock signal, then the SCK signal falling or rising edge will clock out the presently stored SBDR register data via the TXRX buffer onto the SDO pin. Also the SCK signal rising or falling edge, will clock in the data on the SDI pin into the TXRX buffer. With 8 clock pulses, the master and slave can implement an 8-bit buffer data interchange and accomplish full duplex communication. When data transmission and reception is completed, the data in the TXRX buffer will be loaded into the SBDR register and the TRF bit will be set.
Application Description
Question 1
How can the MCU be placed into a situation of minimum power consumption?
Answer
To ensure that the MCU, when entering the Power Down mode, is using a minimum of power, the following points must be noted:
1. Any unused I/O pins should be setup as outputs and set to a low output value.
2. Any lines setup as inputs, if there is no external current sink I/O, then they should be setup as outputs and set to a low output value.
3. If the A/D function is not used, then the A/D should be switched off and only switched on again when required.
4. If the SPI function is used, then the SCK and SDI lines on the SCI bus should be pulled low with a 100Kohm resistor, to prevent these two lines from being in a floating condition when the SPI is disabled.
Points to Note
Question 1
In the configuration options, as there is an option to select the SPI voltage to be either 5V or 3.3V, what is the voltage of the IC.
Answer
In the configuration options, the SPI voltage option is only provided for the ICE, to enable convenient interfacing to external hardware such as RF ICs. As far as the IC is concerned, there is no such option, as the IC power supply voltage will be the same as the SPI voltages.
|