Electronics and Networks: Dumb things with Wires Week 2: Serial Overview Jonah Brucker-Cohen Matthew Karau Monday 10am - 12pm Trinity College Dublin MSc.

Slides:



Advertisements
Similar presentations
Serial Interface Dr. Esam Al_Qaralleh CE Department
Advertisements

DATA COMMUNICATIONS Some organisations concerned with standards: EIA - Electroonic Industries Association (RS standards including RS-232) IEEE - Institute.
1 Fall 2005 Local Serial Asynchronous Communication Qutaibah Malluhi Computer Science and Engineering Qatar University.
Chapter 2 Data Communication Concepts Code Transmission Signal Modulation Service.
Eng. Husam Alzaq The Islamic Uni. Of Gaza
CSCI 4550/8556 Computer Networks Comer, Chapter 5: Local Asynchronous Communication (RS-232)
Electronics and Networks: Week 9: Dumb things without Wires RF / IR Communication Jonah Brucker-Cohen Matthew Karau Monday 10am - 12pm Trinity College.
COMP3221: Microprocessors and Embedded Systems
EET Advanced Digital Chapter 21 Serial Ports.
Input/Output and Communication
1 The 9-Pin Connector Pin abbreviations (numbers in parentheses are the 25D pin numbers): 1. CD (8) 2. RD (Rx) (3) 3. TD (Tx) (2) 4. DTR (20) 5. SG (Ground)
Serial Communications Standards (Partly Excerpted from Simpl Primer) Cabling Configuration Protocol.
ECE 371- Unit 11 Introduction to Serial I/O. TWO MAJOR CLASSES OF SERIAL DATA INTERFACES ASYNCHRONOUS SERIAL I/O - USES “FRAMING BITS” (START BIT AND.
Local Asynchronous Communication
12 - Winter 2006 ECE ECE 766 Computer Interfacing and Protocols 1 Interfaces Transmission of data from the source to a device or from a device to the destination.
Local Asynchronous Communications. Bit-wise data transmission Data transmission requires: Encoding bits as energy Transmitting energy through medium Decoding.
Embedded Systems Design
University of Tehran 1 Interface Design Serial Communications Omid Fatemi.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Serial Communication ETEC 6416.
Transmission Modes Serial Transmission  One bit is transmitted on a circuit at a time  Usually there is one transmit circuit and one receive circuit.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
Ports, connectors, and cables
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
3.1 Basic concepts of data communications and networking
Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),
Modems Chapter 17. Basic Knowledge  Modems are little devices to use the telephone to talk to other computers.  Modem is an abbreviation for Modulator/
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
1 Microprocessor-based Systems Course 9 Design of the input/output interfaces (continue)
Line Coding, Modem, RS232 interfacing sequences.
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
Serial Communications
Advanced Embedded Systems Design Lecture 8 Serial I/O BAE Fall 2004 Instructor: Marvin Stone Biosystems and Agricultural Engineering Oklahoma.
Chapter 5: Local Asynchronous Communication 1. Bit-wise data transmission 2. Asynchronous communication 3. Sending bits with electric current 4. Standard.
Day 7 Connections. Standards Unless we had connection standards nothing would be interchangeable. –There would be different printers for Macs and Windows.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
Universal Asynchronous Receiver/Transmitter (UART)
Interfaces and Synchronization Martin Weiss. EIA 232D Interface Standard u Synonymous with ITU V.24 u Asynchronous interface u Up to 19.2kbps u 50 foot.
2/26: Wide World of Modems Roll call. Video: modem Lecture: step- by-step
1 Transmission of Digital Data : Interface and Modems.
AS Computing Data transmission. Basic data transmission Baud The rate that the voltage changes is called the Baud. If the voltage changes 10 times every.
Digital Interfaces An interface links two devices Interface Standards define: – mechanical specifications - how many wires & connector type –electrical.
Modems How They Work. Modem A device used by a PC to communicate over a phone line or cable A device used by a PC to communicate over a phone line or.
FUNDAMENTALS OF NETWORKING
Unit 1 Lecture 4.
1 Chapter Overview Modems The Internet and Web Browsers.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Serial Communication RS-232. In order to make two devices communicate, whether they are desktop computers, microcontrollers, or any other form of integrated.
BASICS OF SERIAL COMMUNICATIONS BIRLA VISHWKARMA MAHAVIDYALAYA ELECTRONICS & TELECOMMUNICATION DEPARTMENT PRESENTING BY: ABHISHEK SINGH AMANDEEP.
NARNARAYAN SHASTRI INSTITUTE OF TECHNOLOGY Prepared by: Wasu Ichcha kaur H Bhalani Nidhi M Dhakate Megha D MICROCONTROLLER.
Jeremy Sandoval University of Washington May 14, 2013
RS-232 Communications.
CS-401 Computer Architecture & Assembly Language Programming
6.1 Communication Methods
Input/Output and Communication
Operating Systems (CS 340 D)
SERIAL PORT PROGRAMMING
RS-232 Communications.
Serial Communication: RS-232 (IEEE Standard)
Programming Boe-Bots (Part 1)
Serial Communication Interface: Using 8251
Serial Communication Interface
Преглед Начин функционисања Имплементације
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Chapter 6 Transmission of Digital Data Interfaces and Modems
Chapter 9 Transmission Modes
PIC Serial Port Interfacing
PIC Serial Port Interfacing
Presentation transcript:

Electronics and Networks: Dumb things with Wires Week 2: Serial Overview Jonah Brucker-Cohen Matthew Karau Monday 10am - 12pm Trinity College Dublin MSc. Multimedia Systems Spring 2003

Serial Overview What is Serial Communication and why do we care? Specifics of Serial Protocol Synchronous Serial Asynchronous Serial Things that “talk” Serial Director Movie + Code Basic Stamp Code Serial Schematics for BS2

What is Serial Communication and why do we care? Serial Communication is a communications protocol defined in the RS232-C Standard Serial sends one bit at a time on a physical channel Serial allows us to connect microcontrollers (like BS2, PIC, BX24, etc..) to computers Serial exists both wired (cable) or wireless (sent over radio transmission - FM/AM) Allows for screen to physical interaction with a PC - incoming data can be connected to online inputs/outputs (servers, HTML pages, scripting languages (CGI, ASP, PHP) ) Simple to implement with many benefits

Specifics of Serial Protocol Baud Rate - this is the speed of the transmission and is measured in Bits Per Second (BPS) Start bit - first bit sent as “attention” bit. This helps the receiver to know which is the first bit to receive. Data bits - Directly following the start bit, the data bits are sent. A bit value 1 causes the line to go in marking state, the bit value 0 is represented by a space. The least significant bit is always the first bit sent. Parity bit - Used for error detecting purposes, it is possible to add an extra bit to the data word automatically. The transmitter calculates the value of the bit depending on the information sent. The receiver performs the same calculation and checks if the actual parity bit value corresponds to the calculated value. Stop bits - closes the frame with the startbit to make sure the packet is sent correctly. Example: Director talks to the BS2 at 9600bps, 8 data bits, 1 stop bit, 0 Parity

Synchronous Serial A clock or trigger signal must be present which indicates the beginning of each transfer Allows for time-sensitive transfer between devices Two devices initially synchronize themselves to each other, and then continually send characters to stay in sync (even if the data is filler) Faster than Asynchronous - because header/footer bits are not required Example: One controller BS2 sends commands to several slave BS2 - all the commands are sent out synchronously to ensure that all BS2s react at the same time and timings

Asynchronous Serial Does not require sending idle characters Beginning and end of each packet of data much have start and stop bits Slower, but less processor intensive than synchronous serial All PC Serial ports are asynchronous Example: Most applications use asynchronous serial - used when each device keeps their own time and exchange data at a certain rate

Serial Port 9 Pin Connector Male RS232 DB9 Pin Descriptions Direction of signal: 1 - Carrier Detect (CD) (from DCE) Incoming signal 2 - Received Data (RD) 3 - Transmitted Data (TD) 4 -Data Terminal Ready (DTR 5 - Signal Ground Common reference voltage 6 - Data Set Ready (DSR) 7 - Request To Send (RTS) 8 - Clear To Send (CTS) 9 - Ring Indicator (RI) (from DCE)

Things that “talk” Serial Computers (Macintosh and PC) - all major programming languages (Lingo, C, C++, Java, VB, C#, etc..) Microcontrollers (BS2, PIC, BX24, etc..) Serial RF modules (send serial over radio waves) Motor Controllers (motormind B, Stepper motors, servo controllers) LCD screens Serial mice, tablets USB to Serial Converters Printers (older models), fax machines GPS modules, Bluetooth Palm Pilot, PocketPC, Mobile Phones, etc..

Director Movie + Lingo Breakdown of Lingo Code: Serial Handlers configure This is called in the startmovie and executes once Initializes the SerialXtra.x32 by making an instance(or object) of the port which can then be sent commands in Lingo Example: openXlib "SerialXtra.32" --opens the Xtra set serialobj= new(xtra "SerialXtra", ("COM2")) --initialize the Xtra as port 2 --standard Serial communication parameters SetBaudRate(serialObj,9600) SetDataBits(serialObj,8) SetStopBits(serialObj, 1) SetBufferSize serialObj, 0 checkserial This is called in the exitframe and executes every frame Checks to see what is coming in the serial port from the BS2 send This is called when you want to send a value out the serial port Can be a number, character, or string killport This is called when you stop the movie and kills the instance of the Xtra Open Demo Movie

Basic Stamp Code 'Code Example for BS2 Serial Communication 'this program sends and receives a byte of serial data from Director when you press a physical button on pin 9 it sends the state of the pin to Director which then does something and sends back a 1 or 0 'if a 1 comes back, the BS2 then turns on a motor input 9 'make input and variable declarations incoming var byte main: serout 10, 16468, [in9] 'send out the state of the button serin 11, 16468, [incoming] 'check for serial input debug ?incoming 'check in the debug window for incoming value if incoming = 1 then motoron 'if the value is 1, turn on motor goto main motoron: high 6 'turn on a motor on pin 6 goto main

Serial Schematics - BS2 Serial Schematic For Basic Stamp 2 To PC: This schematic has an LED - pin 8 Serin -pin 6 Serout- pin 7