1 / 7

Digital Electronics and Computer Interfacing

Digital Electronics and Computer Interfacing. Tim Mewes 7 . Computer Interfacing – Serial communication. 7 Serial communication. In serial communication data is send one bit at a time Advantages compared to parallel communication : less cables required

stuart
Download Presentation

Digital Electronics and Computer Interfacing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Electronics and Computer Interfacing Tim Mewes 7. Computer Interfacing – Serial communication

  2. 7 Serial communication In serial communication data is send one bit at a time Advantages compared to parallel communication: • less cables required • Signal delay between cables not an issue • crosstalk between cables not an issue Main disadvantages: • Speed • Getting it to work… Digital Electronics and Computer Interfacing

  3. 7.1 Serial communication via RS-232 RS-232 (recommended standard 232) 1969: defines • signal levels (up to 25V) • signal rate (Baud or bits/s) • connectors DB-25 (recommended) however DE-9 is most common • Does not define: • Character encoding (ASCII) • actual transmission rate • start/stop bits, data bits, parity Digital Electronics and Computer Interfacing

  4. 7.1 Serial communication via RS-232 Communication: Here: • 1 start bit (signals the receiver that data follows) • 8 data bits • no parity bit (used to check for incorrect transmission, could be even or odd) • 1 stop bit (indicates that data transmission is over) if no further data follows line remains high Digital Electronics and Computer Interfacing

  5. 7.1 Serial communication via RS-232 Thus before communication can take place sender and receiver need to “decide” on: • Transmission speed (baud rate) • Number of data bits typically 8 • Parity (none, even or odd) • Number of stop bits (1 or 2) • Flow control “handshaking” (none, hardware, software (XON/XOFF)) • Check the manual of the device! Digital Electronics and Computer Interfacing

  6. 7.1 Serial communication in LabVIEW Write command Check manual Wait – if needed • Configure port first • VISA resource name: COM1/COM2 • baud rate (9600 or 2400, 4800, 7200 etc.) • data bits (8 or 7 are most common) • parity (none most common) • stop bits (1, 1.5 or 2) • flow control (none most common) Read response Check manualwhat to expect End session Cleanup! Digital Electronics and Computer Interfacing

  7. 7.2 Serial communication problems • Check that LabVIEW settings match those in manual • flow control is often source of problems in particular hardware flow control – it is just not implemented reliably in many devices • PIN assignment differs between DTE (Data Terminal Equipment) and DCE (Data Circuit-terminating Equipment) • PIN assignment Minimal 3-wire connection Minimal 5-wire connection with flow control Digital Electronics and Computer Interfacing

More Related