DSP's TMS320F28335 study summary and notes (1)————Communication

F28335 study notes

1. Communication classification 

Between DSP controllers, DSP controllers and external devices exchange information and communication, there are two main types of communication methods that can be adopted: serial communication and parallel communication.

Parallel communication: generally includes multiple data lines, multiple control lines and status lines, transmission lines, fast transmission speed, multiple transmission lines, high hardware overhead, not suitable for long-distance transmission.

Generally used inside the system, such as XINTF interface or inside the controller such as DMA controller.

Serial communication: Both data information and contact control information are transmitted on the communication line. The hardware overhead is small and the transmission cost is low, but the transmission speed is slow, and the transceiver needs a communication protocol, which can be used for long-distance communication. Serial communication can be divided into two categories: synchronous communication and asynchronous communication.

Synchronous communication: The transmitter and receiver usually use the same clock source to synchronize. The method is to include a clock signal when the transmitter sends data, and the receiver uses the clock signal to receive. A typical example is I^{2}C、SPI。SPI.

Asynchronous communication: The clocks of the sender and receiver are not the same clock, and the data is sent and received by their respective clocks. However, both parties are required to use the same nominal frequency, allowing certain errors. Typically such as SCI.

1.1 Transmission mode of serial communication

There are 3 types of serial communication transmission methods:

  • Simplex
  • Half duplex
  • Full duplex

Simplex: The data transmission is one-way, one end is the sending end, and the other end is the receiving end. In this transmission mode, in addition to the ground wire, as long as there is a data wire. Cable broadcasting is simplex.

Half-duplex (Half-duplex): Data transmission is also bidirectional, but in this transmission mode, in addition to the ground wire, there is generally only one data wire. At any one time, only one party can send data, and the other party can receive data, and cannot send and receive data at the same time. I^{2}C、SPI。The communication transmission mode works in half-duplex.

Full-duplex: Data transmission is bidirectional, and data can be received and sent at the same time. In this transmission mode, in addition to the ground wire, two data wires are required. From the perspective of either end, one is the sending wire and the other is the receiving wire. Both SCI and SPI can work in full duplex mode.

2. SCI module of F28335

2.1 Introduction to SCI

SCI stands for Serial Communication Interface, serial communication interface, receiving and sending have separate signal lines, but not the same clock, so it is a serial asynchronous communication interface, which can generally be regarded as UART (Universal Asynchronous Receive/Send Device) , It is often connected with RS232 interface. Usually DSP pin input/output uses TTL level, and the characteristic voltages of TTL level "1" and "0" are 2.4V and 0.4V respectively, which are suitable for data transmission on the board. To convert between TTL level and RS232 level, it is necessary to use a serial port conversion chip, the commonly used one is MAX232. In order to make the signal transmission farther, the American Electronics Industry Association EIA formulated the serial physical interface standard RS-232C. RS-232C adopts negative logic, -3V~-15V is logic "1", +3V~+15V is logic "0". The maximum transmission distance of RS-232C is 30m, and the communication rate is generally lower than 20Kbit/s. The RS-232 interface, referred to as "serial port", is mainly used to connect devices with the same interface. The arrangement position of the 9-pin serial interface is given below, and the meaning of the corresponding pins is shown in the table below.

 

Pin number Features Pin number Features
1 Receive line signal detection (Carrier Detect DCD) 6 Data communication equipment is ready (DSR)
2 Receive data line (RXD) 7 Request to send (RTS)
3 Send data line (TXD) 8 Clear to send
4 Data terminal is ready (DTR) 9 Ring indicator
5 Signal Ground (SG)    

2.2 Features of SCI module

  1. 2 external pins: SCITXD is the SCI data transmission pin; SCIRXD is the SCI data reception pin. The two pins are multi-function multiplexing pins, if not used, they can be used as general digital I/O.
  2. Programmable communication rate, 64K communication rates can be set.
  3. Data format: a start bit, 1~8 bits of programmable data word length, select odd parity, even parity or invalid parity mode, 1 or 2 stop bits.
  4. 4 kinds of error detection flags: parity error, overrun error, frame error and intermittent detection.
  5. Two ways to wake up multiprocessors: Idle-line and Address Bit.
  6. Full-duplex or half-duplex communication mode.
  7. Double buffering receiving and sending function.
  8. Sending and receiving can adopt two ways: interrupt and status query.
  9. Independently send and receive interrupt enable control (except BRKDT).
  10. NRZ (non-return to zero) communication format.
  11. 13 SCI module control registers, the starting address is 7050H.
  12. Automatic communication rate detection (enhanced function relative to F140x).
  13. 16-level transmit/receive FIFO (enhanced function relative to F240x). 

Guess you like

Origin blog.csdn.net/weixin_38452841/article/details/108316810