TKT-3500 Microcontroller systems
|
|
- Derek Porter
- 5 years ago
- Views:
Transcription
1 TKT-3500 Microcontroller systems Lec 3a Serial Input/output Ville Kaseva Department of Computer Systems Tampere University of Technology Fall 2010
2 Sources Original slides by Erno Salminen Robert Reese, Microprocessors: From Assembly to C with the PIC18Fxx2, Charles River Media, 2005 Tim Wilmshurst, Designing Embedded Systems with PIC Microcontrollers Principles and applications, Elsevier, Wikipedia #2/43
3 Topics Basics of communication channels USART Universal Sync/Async Rx/Tx RS-232 Recommended standard 232 (for serial communication) #3/43
4 Simplex, half-duplex, (full) duplex 3 basic types of communication channels #4/43
5 Channel control Only two communicating blocks in simplest case During transfer master initiates transfers slave accepts transfers and responds to them In some cases, a certain block can act both as master and slave Many buses are shared multimaster buses Arbitration mechanism decides which has the ownership #5/43
6 Bidirectional IO port Three-state buffer allows output ports to have a value of logical 0, 1, or Hi-Z (high-impedance) aka. tri-state, or 3-state logic In high-impedance state, the buffer s input is not connected to its output Output floats Other blocks can drive it Pull-up/down resistors are often used Buffer is stronger than pull-up Signal output_enable selects between conducting and Hi-Z states output_enable data_out data_in oe = 0 Hi-Z oe = 1 conduct Vdd R #6/43
7 Bidirectional IO port (2) Only 1 output can be driven at any time to avoid short-circuit! Bus protocol defines arbitration policy How to select current master (driver) block Note that here the tri-state enable TRISn is active low. #7/43
8 Open-collector as bidir IO port Open-collector is another choice BJT instead of FET Output transistors cannot drive output high (as they re open ) Again pull-up resistor guarantees correct operation Outputs are wired together aka. wired-and 1 only iff all blocks drive 1 Uses bipolar npn transistors c= collector current flows in e = emitter current flows out b = base - controls b data_in data_in data_in e c I GND GND GND Vdd R #8/43
9 Parallel channel vs. serial channel a) Parallel A group of data signals - High bandwidth b) Serial Data transferred one bit at a time - low bandwidth Note! Error in book s fig. #9/43 In both cases, new data is valid on every rising edge of clock
10 Parallel channel vs. serial channel (2) Compared to serial, parallel communication requires much wiring complicates PCB design, skew problems, not very practical for cables, crosstalk requires many pins increase the package price, increase chips footprint, complicate PCB design may use lower frequency to achieve the same bandwidth In both cases, data transfers are controlled with a clock or strobe signal Examples: a) Parallel: memory bus, PCI, AGP, ATA, IDE, SCSI... b) Serial: RS-232, U(S)ART, I2C, SPI, USB, Ethernet, SATA... #10/43
11 Par vs. ser (3) Assuming 10 MHz clock A 16-bit parallel channel, achieves bandwidth= 10 MHz * 16 bits = 160 Mbit/s Whereas serial, achieves only 10MHz * 1bit=10 Mbit/s It would require 160 MHz for the same performance Serial applicable only for low data rate communication High data rates (few Gb/s) are possible at short distances (few meters), e.g. USB 2.0 Parallel usually not applicable (practical) at long distances No practical communication scheme can achieve the theoretical channel limit, though #11/43
12 Clocking: synchronous vs. asynchronous a) Synchronous a common timing signal is established that dictates when individual bits can be transmitted i. Separate clock signal ii. Clocking is encoded into data iii. Receiver s clock is synchronized to the data stream All new high speed serial standards are synchronous, e.g. IEEE 1394 aka Firewire b) Asynchronous uses none of the above methods i-iii) sender and receiver agree on a common data rate Simple HW, but lower bandwidth #12/43
13 Synchronous serial IO i) i) Separate clock wire is intuitive but its propagation delay must be matched that of the data (complicated) Fig. 9.5 Wire delays complicate the sending of clk with data #13/43 data data A B A B clk clk
14 Synchronous serial IO ii) ii) Data strobe encoding Data line always contains the serial data, nothing special here Strobe encodes the clock, it has a pulse if data does not change -> Either Data or Strobe changes its logical value in one clock cycle, but never both #14/43 Fig. 9.5 Data strobe encoding
15 Synchronous serial IO iii) iii) Synchronization Even clocks have the same f, they might be out of phase as they are generated independently PLL modifies receiver s clock to macth the sender s the data line must have enough changes within a particular time interval (transition density) Otherwise, PLL does not work a b #15/43
16 Asynchronous serial IO Does not transmit the clock on a separate wire Does not guarantee a particular transition density the data line could remain in the same state, either 1 or 0 for the duration of the transmission after the initial state change indicating start of transmission Separate start and stop bits are sent They waste bandwidth Data is sent least significant bit (LSb) first #16/43
17 Asynchronous serial IO (2) Bit time denotes how long it takes to transfer one bit Before transmission, the line is in the idle or mark condition (logical 1 ) Start is signalled by moving into space condition (logical 0 ) Transmission ends with at least one stop bit Three common formats: #17/43
18 Parity bit Parity bit is an extra bit added to a data frame to detect a single bit error One bit of the frame was received incorrectly (read as 0 when should have been 1, or vice-versa) Not guaranteed to detect multi-bit errors a) Odd parity parity bit value makes the total number of 1 bits in the frame odd For 7-bit data value 0x56 ( ), odd parity bit = 1 b) Even parity parity bit value makes the total number of 1 bits in the frame even For 7-bit data value 0x56 ( ), even parity bit = 0 Very simple to implement #18/43
19 Parity bit (2) Example of correct transfers (4 1 -bits) Example of detection of single bit error 1 0 Aaargh! Mein Gott! #19/43
20 Baud Rate vs Bits Per Second Baud rate is the rate at which signaling events are sent Bits per second (bps) is the number of bits transferred per second (any type of bits, data or overhead bits) If only a 1 or 0 is sent for each signaling event, then baud rate = bps (typical case) However, could use a signaling protocol that transfers multiple bits per signaling event e.g. 4 different voltage levels sends two bits per signaling event ( 00 = -15v, 01 = -5v, 10 =+5v, 11 = +15v). In this case, bit rate will be double the baud rate The effective data rate is the rate at which data is transferred, minus the overhead bits (ie. start, stop,and parity bits) Could be also called payload data rate #20/43
21 Receiver sampling Used when receiver s frequency is high Example shows receiver freq = 16x the baud rate Usually integer multiple, 32x, 64x etc. At start bit, internal 4-bit counter set to 0 (ratio is 16=2 4 ) Sample always at mid-point of bit time for glitch rejection Some receivers sample at cycles 7,8 and 9 and only accept bit if all values are the same Serial data input Receiver s clk #21/43
22 Receiver sampling (2) Receiver and transmitter sychronize at start bit Receiver/Transmitter clocks not perfectly matched E.g. tx clk is few % faster After long series of bits (frame), receiver may read wrong bit value Miss one or read one bit twice In prev. example, tolerance is ½ bit time (50%, 8 cycles) spread over entire frame Assuming a 10 bit frame, maximum allowed mismatch between Rx/Tx clocks is 50%/10 = 5% #22/43
23 Example: SW-based asynch. serial data link void putch (unsigned char c) { } unsigned char i=0; RB2 = 0; /* start bit*/ delay_1bit(); for(i=0,i<8;i++){ } if (bittst(c,0)) {RB2=1;} else { RB2=0;} delay_1bit(), c = c >> 1; RB2=1; /* stop bit*/ delay_1bit(); unsigned char getch (void) { } unsigned char i=0; unsigned char c=0; while(rb3){} /*wait start*/ delay_onehalf_bit(); for(i=0,i<8;i++){ } delay_1bit(); if (RB3) {c = c 0x80} if (i!=7) {c = c >> 1} delay_1bit(); /* discard stop bit */ return(c); #23/43
24 Example: SW-based asynch. serial... (2) Sender s putch() assumes that output RB2 is already in idle state, i.e. 1 Then it sends, start bit, 8 data bits, and stop bit Receiver s getch() waits for start bit, i.e. until RB3 goes low Then it waits for the middle point bit time After 1 bit time, it starts sampling After 8 bits, wait that stop bit has gone but do not check anything Finally, 8-bit char is returned Max. performance is limited by the accuracy of delay functions CPU is either transmitting or receiving - half-duplex #24/43
25 Double buffering Allows concurrent computation and communication Allocate two buffers and simultaneously fill one with new data process the data that already exists in the other buffer Switch buffers when both operations completed Buffer filling with DMA (direct-memory access) and ISR or ISR only Use interrupt service routine to notice that a buffer has been filled CPU processed data Memory buf1 data source new data buf0 #25/43
26 Universal Synchronous/Asynchrono us Receiver/Transmitter (USART)
27 Universal Synch/Asynch Rx/Tx (USART) HW sub-system that implements serial data communication Handles start and stop bits and data serialparallel conversion for data CPU can do processing at the same time HW allows higher data rates than SW Not available in all PICs Controlled and monitored with special function registers UART module can handle async-only communication #27/43
28 USART registers Data registers Tx rx Control tx rx baud rate io pins #28/43
29 USART transmitter interrupt enable bit Control signals are bits from SFR TXSTAx Sent data is placed into TXREG if it is empty (TXIF= 1 ) Some processors have a FIFO instead of single data register interrupt flag bit tx completed sent data TSR empty serial port enable (in RCSTATx) transmit enable enable 9th bit sending multipurpose pin #29/43 Serial Port 9th data bit or parity
30 UASRT receiver Control signals are bits of SFR RXSTATx continuous reception enable overrun error - FIFO and RSR are full when new bits come framing error wrong stop bit rx shift reg Select 8 or 9 bits multipurpose pin received data (2-word FIFO) #30/43 serial port enable interrupt enable interrupt flag rx completed
31 putch() + getch() with USART putch() clears watchdog timer while waiting that tx buffer becomes free getch() checks rx interrupt flag to see if data is available clear watchdog similarly to putch() Error checks are omitted... Both functions actively poll the interrupt flags #31/43
32 Baud rate generator The BRG is a dedicated 8-bit or 16-bit clock generator (counter) supports both the Asynchronous and Synchronous modes controlled with 8-bit SFR SPBRG The SPBRGHx:SPBRGx register pair controls the period of a free running timer Then baud rate R baud = (9.2) where f is the oscillator clk frequency S is either 16 or 64 (high-speed, low-speed) speed S is defined with bit BRGH, i.e. TXSTA[2] SPBRG is counter s period (num of cycles) f (S * (SPBRG+1)) #32/43
33 Controlling baud rate Given the desired baud rate and f, the nearest integer value for the period SPBRG can be calculated Writing a new value to SPBRG causes the BRG timer to be reset (or cleared) This ensures the BRG does not wait for a timer overflow before outputting the new baud rate. From 9.2, period SPBRG= f (9.3) where denote rounding to nearest integer Rounding causes error in actual baud rate! Depends on the utilized frequency f S * R baud -1 #33/43
34 Controlling baud rate (2) Frequency MHz is integer-multiple of common baud rates No rounding errors! (as if magic...) #34/43
35 RS-232
36 RS-232 Recommended Standard 232 is a an EIA standard for serial binary data signals connecting between 1. DTE (Data Terminal Equipment) e.g. terminal software on PC usually a male connector and 2. DCE (Data Circuit-terminating Equipment) e.g. modem or PIC usually a female connector PC s serial port Full-duplex #36/43
37 RS-232 (2) Defines Electrical signal characteristics such as voltage levels, signaling rate, timing, and maximum load capacitance. Mechanical connectors and pin identification Functions of each circuit in the interface connector Standard subsets for selected telecom applications. The standard does not define such elements as character encoding (ASCII, Baudot code or EBCDIC) the framing of characters in the data stream (bits per character, start/stop bits, parity) data compression or error detection protocols bit rates for transmission power supply to external devices These are defined by the utilized UART device #37/43
38 RS-232 (3) Connector is either a) 9-pin (DB9) as in personal computers b) 25-pin (DB25) Connection is possible with only 2 or 3 pins also (TX/RX and GND) Voltage levels logical 0 is [3,15] Volts and logical 1 is [-15, -3] Volts counterintuitively Voltages near zero are not valid devices must withstand short circuit to ground or to voltages up to +/-25 volts Oscilloscope trace of voltage levels for an uppercase ASCII "K" character (0x4b) with 1 start bit, 8 data bits, 1 stop bit #38/43
39 RS-232 Voltage translation Voltages levels are too high for most ICs Convert to so called TTL (transistor-transistor logic) levels With a standard 5-volt power supply "low" means [0, 0.8] Volts and "high" [2.2, 5] Volts Separate IC can do voltage conversion Note the minimal 3-wire connection in fig #39/43
40 connection setup hand-shake mandatory RS-232 DB9 signals Name Symbol DB-9 pin Common ground G 5 - Transmitted Data TxD 3 DTE Received Data RxD 2 DCE Src DTE, i.e. PC DCD RxD GND DSR CTS RI TxD DTR RTS DCE, i.e. modem Request To Send RTS 7 DTE Clear To Send CTS 8 DCE Data Terminal Ready DTR 4 DTE Data Set Ready DSR 6 DCE Carrier Detect DCD 1 DCE Ring Indicator RI 9 DCE PC (DTE) Null modem another PC (DTE) #40/43 Copyright Tampere University of Technology Department of Computer Systems
41 PC s serial interface Terminal program, such as HyperTerminal Exercise platform is programmed via USB but printf() should be forwarded to PC s terminal via serial interface Being superseded in personal computers by USB USB-to-serial adapters are available for the newer PCs that omit serial Fig. HyperTerminal configuration and terminal window. port #41/43 Copyright Tampere University of Technology Department of Computer Systems
42 Serial port debugging Most common mistakes is swapping TX and RX pins or incorrectly identifying them on DB9 conncetor wrong baud rate wrong settings for 7/8 bits, or stop and parity bits signal levels: PIC [0,5] V vs. PC [-10, +10] V no common ground potential Book provides step-by-step debug instructions #42/43 Copyright Tampere University of Technology Department of Computer Systems
43 Conclusions Basic properties of communication channels Simplex, half-duplex, duplex Serial, parallel Synchronous, asynchronous Serial and parallel communication channels have different usage scenarios Both are commonly utilized in the same system Parity bit provides simple single-bit error detection capability USART HW can handle serial communication instead of CPU #43/43 Copyright Tampere University of Technology Department of Computer Systems
Parallel IO. Serial IO. Parallel vs. Serial IO. simplex vs half-duplex vs full-duplex. Wires: Full Duplex. Wires: Simplex, Half-duplex.
Parallel IO Parallel IO data sent over a group of parallel wires. Typically, a clock is used for synchronization. D[15:0] clk Serial IO Serial IO data sent one bit at a time, over a single wire. A clock
More informationELE492 Embedded System Design
Overview ELE9 Embedded System Design Examples of Human I/O Interfaces Types of System Interfaces Use of standards RS Serial Communication Overview of SPI, I C, L, and CAN Class //0 Eugene Chabot Examples
More informationSender Receiver Sender
EEE 410 Microprocessors I Spring 04/05 Lecture Notes # 19 Outline of the Lecture Interfacing the Serial Port Basics of Serial Communication Asynchronous Data Communication and Data Framing RS232 and other
More informationSerial Communication. Spring, 2018 Prof. Jungkeun Park
Serial Communication Spring, 2018 Prof. Jungkeun Park Serial Communication Serial communication Transfer of data over a single wire for each direction (send / receive) Process of sending data one bit at
More informationSerial Communication Prof. James L. Frankel Harvard University. Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved.
Serial Communication Prof. James L. Frankel Harvard University Version of 2:30 PM 6-Oct-2015 Copyright 2015 James L. Frankel. All rights reserved. Overview of the Serial Protocol Simple protocol for communicating
More informationSerial Interfacing. Asynchronous Frame
Serial Interfacing Serial Data Transfer used by keyboards, plotters, modems and other peripherals with low data transfer rates (low bandwidth) 2 Types: Asynchronous CPU and device are not using a common
More information8051SERIAL PORT PROGRAMMING
8051SERIAL PORT PROGRAMMING Basics of Serial Communication Computers transfer data in two ways: Parallel Often 8 or more lines (wire conductors) are used to transfer data to a device that is only a few
More informationEmbedded Systems and Software. Serial Communication
Embedded Systems and Software Serial Communication Slide 1 Using RESET Pin on AVRs Normally RESET, but can be configured via fuse setting to be general-purpose I/O Slide 2 Disabling RESET Pin on AVRs Normally
More informationEECS 373 Design of Microprocessor-Based Systems
EECS 7 Design of Microprocessor-Based Systems Matt Smith University of Michigan Serial buses, digital design Material taken from Brehob, Dutta, Le, Ramadas, Tikhonov & Mahal 1 Timer Program //Setup Timer
More informationEmbedded Systems and Software
Embedded Systems and Software Serial Communication Serial Communication, Slide 1 Lab 5 Administrative Students should start working on this LCD issues Caution on using Reset Line on AVR Project Posted
More informationEECS 373 Design of Microprocessor-Based Systems
EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Timers Material taken from Dreslinski, Dutta, Le, Ramadas, Smith, Tikhonov & Mahal 1 Agenda A bit on timers Project overview
More informationMCS-51 Serial Port A T 8 9 C 5 2 1
MCS-51 Serial Port AT89C52 1 Introduction to Serial Communications Serial vs. Parallel transfer of data Simplex, Duplex and half-duplex modes Synchronous, Asynchronous UART Universal Asynchronous Receiver/Transmitter.
More informationEET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing
EET203 MICROCONTROLLER SYSTEMS DESIGN Serial Port Interfacing Objectives Explain serial communication protocol Describe data transfer rate and bps rate Describe the main registers used by serial communication
More informationSerial Interfaces Part 1. ECE 153B Sensor & Peripheral Interface Design Winter 2016
Serial Interfaces Part 1 ECE 153B Sensor & Peripheral Interface Design Serial Interfaces Simple Serial Interfaces RS-232C (UART) Provides for point to point communications, primarily Among the simplest
More informationSerial Communication. Simplex Half-Duplex Duplex
1.5. I/O 135 Serial Communication Simplex Half-Duplex Duplex 136 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave
More informatione-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Communication Module No: CS/ES/11 Quadrant 1 e-text
e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: Serial Port Communication Module No: CS/ES/11 Quadrant 1 e-text In this lecture, serial port communication will be discussed in
More informationHierarchy of I/O Control Devices
Hierarchy of I/O Control Devices 8155 I/O + Timer 2 Port (A,B), No Bidirectional HS mode (C) 4 mode timer 8253/54 Timer 6 mode timer 8255 I/O 2 Port (A,B) A is Bidirectional HS mode (C) Extra controls
More informationAmarjeet Singh. January 30, 2012
Amarjeet Singh January 30, 2012 Website updated - https://sites.google.com/a/iiitd.ac.in/emsys2012/ Lecture slides, audio from last class Assignment-2 How many of you have already finished it? Final deadline
More informationEECS 373 Design of Microprocessor-Based Systems
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses October 2, 2014 Some material from: Brehob, Le, Ramadas, Tikhonov & Mahal 1 Announcements Special
More informationChapter 10 Sections 1,2,9,10 Dr. Iyad Jafar
Starting with Serial Chapter 10 Sections 1,2,9,10 Dr. Iyad Jafar Outline Introduction Synchronous Serial Communication Asynchronous Serial Communication Physical Limitations Overview of PIC 16 Series The
More informationBasics of UART Communication
Basics of UART Communication From: Circuit Basics UART stands for Universal Asynchronous Receiver/Transmitter. It s not a communication protocol like SPI and I2C, but a physical circuit in a microcontroller,
More informationLearn how to communicate
USART 1 Learn how to communicate Programmed I/O (Software Polling) Interrupt Driven I/O Direct Memory Access (DMA) 2 Programmed I/O (Polling) Processor must read and check I/O ready bits for proper value
More informationAsynchronous Transmission. Asynchronous Serial Communications & UARTS
Asynchronous Transmission Asynchronous Serial Communications & UARTS 55:036 Embedded Systems and Systems Software asynchronous: transmitter and receiver do not share a common clock or explicitly coordinate
More informationReal-Time Embedded Systems. CpE-450 Spring 06
Real-Time Embedded Systems CpE-450 Spring 06 Class 5 Bruce McNair bmcnair@stevens.edu 5-1/42 Interfacing to Embedded Systems Distance 100 m 10 m 1 m 100 cm 10 cm "Transmission line" capacitance ( C) Distance
More informationSerial Communications
April 2014 7 Serial Communications Objectives - To be familiar with the USART (RS-232) protocol. - To be able to transfer data from PIC-PC, PC-PIC and PIC-PIC. - To test serial communications with virtual
More informationChapter 11: Input/Output Organisation. Lesson 05: Asynchronous RS232C Serial Port data transfer
Chapter 11: Input/Output Organisation Lesson 05: Asynchronous RS232C Serial Port data transfer Objective Understand the RS232C asynchronous data transfer and signals Learn the RS232C serial port communication
More informationSerial Communications
1 Serial Interfaces 2 Embedded systems often use a serial interface to communicate with other devices. Serial Communications Serial implies that it sends or receives one bit at a time. Serial Interfaces
More informationDesign and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso
Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,
More informationSerial Communication. Simplex Half-Duplex Duplex
1.5. I/O 128 Serial Communication Simplex Half-Duplex Duplex 129 Serial Communication Master-Slave Master Master-Multi-Slave Master Slave Slave Slave (Multi-)Master Multi-Slave Master Slave Slave Slave
More information4.3 Digital Communication
Data Acquisition & Computer Control 11 4.3 Digital Communication Why digital communication (often termed digital input/output, or DIO)? Because the language of computers (and many peripheral devices) is
More informationSerial Communication
Serial Communication What is serial communication? Basic Serial port operation. Classification of serial communication. (UART,SPI,I2C) Serial port module in PIC16F887 IR Remote Controller Prepared By-
More informationSerial communication
Serial communication CSCI 255: Introduction to Embedded Systems Keith Vertanen Copyright 2011 Serial communication Terminology RS-232 protocol Baud rates Flow control Example Overview Develop functions
More information19.1. Unit 19. Serial Communications
9. Unit 9 Serial Communications 9.2 Serial Interfaces Embedded systems often use a serial interface to communicate with other devices. Serial implies that it sends or receives one bit at a time. µc Device
More informationHello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features
Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features of this USART interface, which is widely used for serial
More information8051 Serial Communication
8051 Serial Communication Basics of serial communication Parallel: transfers eight bits of data simultaneously over eight data lines expensive - short distance fast Serial : one bit at a time is transferred
More informationSerial Interfacing. Pulse width of 1 bit
١ ٢ Asynchronous Frame 10 bits 7E1 (7 data bits, even parity, 1 stop bit) Serial Data Transfer used by keyboards, plotters, modems and other peripherals with low data transfer rates (low bandwidth) * *
More information8051 Timers and Serial Port
8051 Timers and Serial Port EE4380 Fall 2001 Class 10 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Timer: Mode 1 Operation (recap) 16 bit counter. Load the
More informationInformatics for industrial applications
Informatics for industrial applications Lecture 5 - Peripherals: USART and DMA Martino Migliavacca martino.migliavacca@gmail.com October 20, 2011 Outline 1 Introduction to USART Introduction Synchronous
More informationUniversität Dortmund. IO and Peripheral Interfaces
IO and Peripheral Interfaces Microcontroller System Architecture Each MCU (micro-controller unit) is characterized by: Microprocessor 8,16,32 bit architecture Usually simple in-order microarchitecture,
More informationMicrocontroller basics
FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In
More informationEZL-200F Application Notes (003) Serial Interface (RS232/RS422/RS485)
Application Notes (003) Serial Interface (RS232/RS422/RS485) Version 2.0 Sollae Systems Co., Ltd. 1. Overview supports three serial interfaces: RS232, RS422, and RS485. You can select the interface you
More information18-349: Introduction to Embedded Real-Time Systems
18-349: Introduction to Embedded Real-Time Systems Embedded Real-Time Systems Lecture 5: Serial Buses Anthony Rowe Electrical and Computer Engineering Carnegie Mellon University Last Lecture ARM ASM Part
More informationRS-232 DATA COMMUNICATIONS WITH THE TANDY COLOR COMPUTER
By Tom Gunnison 1998 DISCLAIMER These plans and software are provided "as is" with no guarantee of fitness for the purpose either explicit or implied. I disclaim any responsibility for losses incurred
More informationSchool of Computer Science Faculty of Engineering and Computer Science Student ID Number. Lab Cover Page. Lab Date and Time:
Student Information First Name School of Computer Science Faculty of Engineering and Computer Science Last Name Student ID Number Lab Cover Page Please complete all fields: Course Name: Structure and Application
More informationInfineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an
Microcontroller Basics MP2-1 week lecture topics 2 Microcontroller basics - Clock generation, PLL - Address space, addressing modes - Central Processing Unit (CPU) - General Purpose Input/Output (GPIO)
More informationIntroduction to I2C & SPI. Chapter 22
Introduction to I2C & SPI Chapter 22 Issues with Asynch. Communication Protocols Asynchronous Communications Devices must agree ahead of time on a data rate The two devices must also have clocks that are
More informationECE251: Thursday November 8
ECE251: Thursday November 8 Universal Asynchronous Receiver & Transmitter Text Chapter 22, Sections 22.1.1-22.1.4-read carefully TM4C Data Sheet Section 14-no need to read this A key topic but not a lab
More informationSerial I-O for Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai (version 14/10/07)
Serial I-O for 8051 Dinesh K. Sharma Electrical Engineering Department I.I.T. Bombay Mumbai 400 076 (version 14/10/07) 1 Motivation Serial communications means sending data a single bit at a time. But
More informationSection 21. Addressable USART
21 Section 21. Addressable USART Addressable USART HIGHLIGHTS This section of the manual contains the following major topics: 21.1 Introduction... 21-2 21.2 Control Registers... 21-3 21.3 USART Baud Rate
More informationAdvanced Electronic Communications Systems Wayne Tomasi Sixth Edition
Advanced Electronic Communications Systems Wayne Tomasi Sixth Edition Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE England and Associated Companies throughout the world Visit us on the
More informationNS9750B-0. Use in conjunction with: Errata , Rev G. Release date: May Phone: Web:
NS9750B-0 Errata 90000530, Rev G Release date: May 2006 Use in conjunction with: NS9750 Hardware Reference, Rev. E Part number: 90000624_E Released: April 2006 SPI slave data output high impedance control
More informationCHAPTER 4 DATA COMMUNICATION MODES
USER S MANUAL CHAPTER DATA COMMUNICATION MODES. INTRODUCTION The SCC provides two independent, full-duplex channels programmable for use in any common asynchronous or synchronous data communication protocol.
More informationConcepts of Serial Communication
Section 6. Serial Communication Communication Using Serial Interfaces: UART and SPI Concepts of Serial Communication Limitations of Parallel Bus Clock skew becomes a serious issue for high speed and long
More informationMore on IO: The Universal Serial Bus (USB)
ecture 37 Computer Science 61C Spring 2017 April 21st, 2017 More on IO: The Universal Serial Bus (USB) 1 Administrivia Project 5 is: USB Programming (read from a mouse) Optional (helps you to catch up
More informationSerial Communications
Serial Communications p. 1/2 Serial Communications CSEE W4840 Prof. Stephen A. Edwards Columbia University Early Serial Communication Serial Communications p. 2/2 Data Terminal Equipment Serial Communications
More informationUnit 19 - Serial Communications 19.1
Unit 19 - Serial Communications 19.1 19.2 Serial Interfaces Embedded systems often use a serial interface to communicate with other devices. Serial implies that it sends or receives one bit at a time.
More informationELEG3923 Microprocessor Ch.10 Serial Port Programming
Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch.10 Serial Port Programming Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Basics of Serial Communication Serial port programming
More informationUART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n
October 2012 Reference Design RD1138 Introduction The Universal Asynchronous Receiver/Transmitter (UART) performs serial-to-parallel conversion on data characters received from a peripheral device or a
More informationUSART. USART stands for Universal Synchronous Asynchronous Receiver Transmitter. Full-duplex NRZ asynchronous serial data transmission
USART 1 USART USART stands for Universal Synchronous Asynchronous Receiver Transmitter Full-duplex NRZ asynchronous serial data transmission Offer wide ranges of baud rate 2 Serial communication Can support
More informationSerial I/O. 4: Serial I/O. CET360 Microprocessor Engineering. J. Sumey
4: Serial I/O CET360 Microprocessor Engineering J. Sumey Introduction serial, i.e. bit-at-a-time, interfacing techniques are useful when parallel interfacing limitations become problematic distance limitations
More informationUniversal Asynchronous Receiver Transmitter Communication
Universal Asynchronous Receiver Transmitter Communication 13 October 2011 Synchronous Serial Standard SPI I 2 C Asynchronous Serial Standard UART Asynchronous Resynchronization Asynchronous Data Transmission
More informationMaxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465
Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465 Keywords: MAXQ, MAXQ610, UART, USART, serial, serial port APPLICATION NOTE 4465 Using the Serial Port on the
More informationDariusz Makowski Department of Microelectronics and Computer Science tel
Dariusz Makowski Department of Microelectronics and Computer Science tel. 631 2720 dmakow@dmcs.pl http://fiona.dmcs.pl/es 1 Lecture Agenda Microprocessor Systems, ARM Processors Family Peripheral Devices
More informationLecture-65 SERIAL DATA COMMMUNICATION The data bus of a microcomputer system is designed to transfer data to and from I/O device in parallel - all
Lecture-65 SERIAL DATA COMMMUNICATION The data bus of a microcomputer system is designed to transfer data to and from I/O device in parallel - all bits of a data word are transformed simultaneously. This
More informationTo be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).
Lab # 6 Serial communications & EEPROM Objectives To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM). Serial Communications Serial
More informationEmulating an asynchronous serial interface (ASC0) via software routines
Microcontrollers ApNote AP165001 or æ additional file AP165001.EXE available Emulating an asynchronous serial interface (ASC0) via software routines Abstract: The solution presented in this paper and in
More informationConfigurable UART with FIFO ver 2.20
D16550 Configurable UART with FIFO ver 2.20 OVERVIEW The D16550 is a soft Core of a Universal Asynchronous Receiver/Transmitter (UART) functionally identical to the TL16C550A. The D16550 allows serial
More informationSerial Communication with PIC16F877A
Serial Communication with PIC16F877A In this tutorial we are going to discuss the serial/uart communication using PIC16F877A. PIC16F877A comes with inbuilt USART which can be used for Synchronous/Asynchronous
More informationInterfacing Techniques in Embedded Systems
Interfacing Techniques in Embedded Systems Hassan M. Bayram Training & Development Department training@uruktech.com www.uruktech.com Introduction Serial and Parallel Communication Serial Vs. Parallel Asynchronous
More informationICP PANEL-TEC PEX3000 II
ICP PANEL-TEC PEX3000 II MODBUS PORT EXPANDER INSTALLATION AND OPERATION GUIDE REVISION HISTORY Revision Date Author Comments 000 29 Aug 2008 Keira Majors Initial release. 001 16 Sep 2008 David Walker
More informationHi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan
PIC18 Serial Port Hi Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan chanhl@mail.cgu.edu.twcgu Serial vs. parallel data transfer 2 Simplex, half-, and full-duplex transfers 3
More informationHello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of
Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of this interface, which is widely used for serial communications.
More informationEmbedded Systems Programming and Architectures
Embedded Systems Programming and Architectures Lecture No 10 : Data acquisition and data transfer Dr John Kalomiros Assis. Professor Department of Post Graduate studies in Communications and Informatics
More informationIntegrity Instruments Application Notes. Release 1
Integrity Instruments Application Notes Release 1 What is EIA/TIA/RS-485 What is EIA/TIA/RS-422 Half Duplex and Full Duplex Communication Asynchronous Communicatin Grounding EIA/TIA/RS-485/422 Shielding
More informationCoE3DJ4 Digital Systems Design. Chapter 5: Serial Port Operation
CoE3DJ4 Digital Systems Design Chapter 5: Serial Port Operation Serial port 8051 includes an on-chip serial port Hardware access to the port is through TXD and RXD (Port 3 bits 1 and 0) Serial port is
More informationSyncLink GT2E/GT4E Serial Adapter
SyncLink GT2E/GT4E Serial Adapter Hardware User s Manual MicroGate Systems, Ltd http://www.microgate.com MicroGate and SyncLink are registered trademarks of MicroGate Systems, Ltd. Copyright 2008-2017
More informationDual Serial Shield User Manual
Dual Serial Shield User Manual PN: 2050 Berkshire Products, Inc. Phone: 770-271-0088 http://www.bkp-store.com/ Rev: 1.00 Copyright 2013 Table of Contents 1 Introduction... 2 1.1 XB compatibility... 2 2
More informationPD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems
PD215 Mechatronics Week 3/4 Interfacing Hardware and Communication Systems Interfacing with the physical world A compute device (microprocessor) in mechatronic system needs to accept input information
More informationAddressing scheme to address a specific devices on a multi device bus Enable unaddressed devices to automatically ignore all frames
23. USART 23.1 Features Full-duplex operation Asynchronous or synchronous operation Synchronous clock rates up to 1/2 of the device clock frequency Asynchronous clock rates up to 1/8 of the device clock
More informationDevice: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017
Device: MOD-1025 This document Version: 1.0 Matches module version: v3 [29 June 2016] Date: 23 October 2017 Description: UART (async serial) to I2C adapter module MOD-1025 v3 datasheet Page 2 Contents
More information8. I/O Buses and Interfaces
8. I/O Buses and Interfaces Section 7.5 & Chapter & 8 Some Review Remember CPU-memory-I/O architecture CPU-Memory-I/O Architecture Memory CPU I/O module I/O device CPU bus or System bus Bus interface I/O
More informationSerial Communications
Serial Communications p. 1/2 Serial Communications Prof. Stephen A. Edwards sedwards@cs.columbia.edu Columbia University Spring 2007 Early Serial Communication Serial Communications p. 2/2 Data Terminal
More informationSPART. SPART Design. A Special Purpose Asynchronous Receiver/Transmitter. The objectives of this miniproject are to:
SPART A Special Purpose Asynchronous Receiver/Transmitter Introduction In this miniproject you are to implement a Special Purpose Asynchronous Receiver/Transmitter (SPART). The SPART can be integrated
More informationUnit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION
Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION Introduction A general purpose computer should have the ability to exchange information with a wide range of devices in varying environments. Computers
More informationInterrupts and Serial Communication on the PIC18F8520
Interrupts and Serial Communication on the PIC18F8520 Kyle Persohn COEN 4720 Fall 2011 Marquette University 6 October 2011 Outline 1 Background Serial Communication PIC18 Interrupt System 2 Customizing
More informationData Communications & Computer Networks. Digital Data Communications Techniques
Data Communications & Computer Networks Chapter 6 Digital Data Communications Techniques Fall 2008 Agenda Preface Asynchronous & Synchronous transmission Error Detection & Correction Line configurations
More informationModule Introduction. PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor.
Module Introduction PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor. OBJECTIVES: - Describe the features and functions of
More informationApplication Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers
Application Note, V1.0, Jul. 2006 AP16095 XC16x Interfacing the XC16x Microcontroller to a Serial SPI EEPROM Microcontrollers Edition 2006-07-10 Published by Infineon Technologies AG 81726 München, Germany
More informationOutline GPIO SPI UART. Ref. PIC Family Reference Manual:
PIC32&I/O& E155& Outline GPIO SPI UART Ref. PIC Family Reference Manual: http://www.microchip.com/wwwproducts/devices.aspx?ddocname=en545644 2 GPIO PIC32 organizes groups of GPIOs into ports that are read
More informationTypical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.
Modular PCI Range of Cards Summary features Modular Architecture Interface compatible with PCI Local bus Specification, revision 2.1, June 1995 2 or 4 Module General Purpose Carrier Cards 8 Channels per
More informationAN_2901_005 JULY The Teridian 73M2901CE single chip modem implements the V.23 standard according the ITU V.23 recommendation.
73M2901CE V.22 bis Single Chip Modem A Maxim Integrated Products Brand APPLICATION NOTE AN_2901_005 JULY 2005 1 ITU V.23 Recommendation The Teridian 73M2901CE single chip modem implements the V.23 standard
More informationATmega128. Serial Communication (RS-232C)
ATmega128 Serial Communication (RS-232C) RS-232C EIA (Electronics Industries Association) DTE (Data Terminal Equipment) DCE (Data Communication Equipment) RS-232C Signals 핀번호 (Pin No.) 명칭 (Signal Name)
More informationPCI Host Controller 14a Hardware Reference Release 1.2 (October 16, 2017)
PCI Host Controller 14a Hardware Reference 1 PCI Host Controller 14a Hardware Reference Release 1.2 (October 16, 2017) Purpose: Host Controller to support the PCI bus according to the PCI/104 specification.
More informationGalep-Adapter DIL-40 => ISP-ASYNC/SYNC Article-No.:
1 of 10 -- English -- Adapter for MCU s, which are in system programmable. -- Deutsch -- Adapter für MCU s, die im System programmiert werden können. Illustration 1: ISP-ASYNC/SYNC-adapter 210915 Illustration
More informationOUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples
SERIAL PERIPHERAL INTERFACE (SPI) George E Hadley, Timothy Rogers, and David G Meyer 2018, Images Property of their Respective Owners OUTLINE SPI Theory SPI Implementation STM32F0 SPI Resources System
More informationThe Analyst. RS422/RS232 Tester. (Standard Model) User Manual
12843 Foothill Blvd., Suite D Sylmar, CA 91342 818 898 3380 voice 818 898 3360 fax www.dnfcontrolscom The Analyst RS422/RS232 Tester (Standard Model) User Manual Manual Revision 102506 Table of Contents
More informationor between microcontrollers)
: Communication Interfaces in Embedded Systems (e.g., to interface with sensors and actuators or between microcontrollers) Spring 2016 : Communication Interfaces in Embedded Systems Spring (e.g., 2016
More informationRS 232 Interface. RS 232 is the Serial interface on the PC. Three major wires for the Serial interface: Transmit Pin 2 Receive Pin 3
RS 232 Interface RS 232 is the Serial interface on the PC Three major wires for the Serial interface: Transmit Pin 2 Receive Pin 3 Note: SR510 switches pins 2,3 internally HP Func. Gen. Requires a null
More informationUniversal Asynchronous Receiver / Transmitter (UART)
Universal Asynchronous Receiver / Transmitter (UART) MSP432 UART 2 tj MSP432 UART ARM (AMBA Compliant) Asynchronous operation 7/8 bit transmission Master/Slave LSB/MSB first Separate RX/TX registers 4
More informationI/O Organization John D. Carpinelli, All Rights Reserved 1
I/O Organization 1997 John D. Carpinelli, All Rights Reserved 1 Outline I/O interfacing Asynchronous data transfer Interrupt driven I/O DMA transfers I/O processors Serial communications 1997 John D. Carpinelli,
More information