Professional Documents
Culture Documents
Serial Communications Interface
Serial Communications Interface
Serial Communications Interface
Interface
Introduction to Serial Communication
Using the serial communication
Asynchronous communication
Is a piece of computer hardware that translates between parallel bits of data and
serial bits.
A UART is usually an integrated circuit used for serial communications over a
computer or peripheral device serial port.
UARTs are now built into some microcontrollers. Some chips have both
synchronous and asynchronous modes. These are called USARTs (for "universal
synchronous asynchronous receiver-transmitters “)
Enabling Serial Communication
The size of this register is one byte (8 bits). TXEN: Transmit Enable bit
Here's a breakdown of the bit roles: 1 = Transmit enabled
0 = Transmit disabled
CSRC: Clock Source Select bit – this bit is
meaningful only in Synchronous communication SYNC: USART Mode Select bit
in Half-Duplex mode. It “determines” if the 1 = Synchronous mode
component is Master (transmitter) or Slave 0 = Asynchronous mode
(receiver). It does not matter in the case of Full-
Duplex mode. BRGH - High Baud Rate Select bit – setting this bit
“determines” the transmission speed (High /
Asynchronous mode: Low). The setting of this bit valid only for
Don’t care. asynchronous mode, and not used for
synchronous mode:
Synchronous mode:
1 = Master mode (clock generated internally from Asynchronous mode:
BRG) 1 = High speed
0 = Slave mode (clock from external source) TX9: 0 = Low speed
9-bit Transmit
Synchronous mode: Unused in this mode.
TX9: 9-bit Transmit Enable bit - this bit lets
select the transmitted frame size 8 or 9-bit TRMT - Transmit Shift Register Status bit
1 = Selects 9-bit transmission 1 = TSR empty
0 = Selects 8-bit transmission 0 = TSR full
Pin Description
Data byte is transferred bit-wise with the MSB as the first bit sent
A slave can force the master to wait by holding the clock line SCL
LOW
I2C Communication: Master Read Request
The write sequence is as follows: [7] Master Sets The Start Bit Low (+0v)
[1] Master Sets The Start Bit Low (+0v) [8] Master Acknowledges With One '0' Bit
[2] Master Write The Device ID + Read/Write Bit [9] Master Sends 8 data bits
[3] Slave Acknowledges With One '0' Bit [9] Slave writes the data to memory
[4] Master Writes The 8-bit Address To Read [10] Master Sets Not-Acknowledge Bit
[5] Slave Acknowledges With One '0' Bit (+5v)
[6] Master Sets The Stop Bit At 1 (+5v) [11] Master Sets The Stop Bit At 1 (+5v)
SMBus & PMBus
System Management Bus (SMBus)
Whereas I2C is wide open, SMBus strictly defines the data packets into a few
allowable protocols such as “Write Byte/Word”, “Block Write/Read” and so on.
SMBus also adds robustness to the basic I2C specification with the
introduction of a bus timeout and the optional Packet Error Checking (PEC)
protocol.
SMBus addresses follow the I2C format, however one address is reserved for
an SMBus protocol called Alert Response Address which allows the Master to
quickly find out which Slave signaled the SALERT# line.
Typically used for commanding and reporting the parameters such as (but not only) the
following: Output Current, Input Voltage,Input Current, Operating Temperatures,Time
(durations), Energy Storage Capacitor Voltage
Expresses numbers according to the formula X = Y.2 N, where Y is the mantissa and N is
the exponent. This is encoded within two bytes of data where the first 5 bits are the
exponent (N) and the remaining 11 bits are mantissa (Y)
Direct Data Format
DIRECT format data is a two byte, two’ s complement binary integer. DIRECT
format data may be used with any command that sends or reads a parametric
value. If a PMBus device uses DIRECT form data, this shall be clearly described in
the product literature.
PMBus Command: Read/Write Byte without PEC
PMBus Command: Read/Write Word without PEC
Common PMBus Commands: OPERATION Command
The OPERATION command is used to turn the unit on and off in conjunction with
the input from the CONTROL pin.
It is also used to cause the unit to set the output voltage to the upper or lower
MARGIN VOLTAGEs.
Examples:
FAN_CONFIG_1_2 Command
Example:
Common PMBus Commands: STATUS Command