EE 3170 Microcontroller Applications
|
|
- Scott Gardner
- 6 years ago
- Views:
Transcription
1 Block Diagram of 68HC11A8 EE 3170 Microcontroller Applications Lecture 14: Advanced 68HC11 Hardware- Part II: Serial Communications Interfacing - Miller 7.10 Interrupt control Clock Mode control A/D ref. voltage COP Real-Time Interrupt ROM RAM Microprocessor Timer & Pulse Accumulator SCI SPI Port A Port B Port C Strobe Port D Based on slides for ECE3170 by Profs. Davis, Kieckhafer, Tan, and Cischke Chip power EEPROM A/D converter Port E EE3170/CC/Lecture#14-PartII 1 EE3170/CC/Lecture#14-PartII 2 68HC11A8 Components Memory RAM ROM Programmable Timer & Pulse Accumulator Port A EEPROM Parallel Input/Output Port B Port C Strobe STRA STRB SCI (SPI) Serial Communications (Peripheral) Interface Port D Analog-to-Digital Converter Port E EE3170/CC/Lecture#14-PartII 3 EE3170/CC/Lecture#14-PartII 4
2 Serial I/O Overview Parallel vs. Serial Ports Simplex vs. Duplex Communication Error Control, and Parity Signaling Standards Data Formatting Message Synchronization Message Errors Parallel I/O Ports I/O Ports so far have been parallel Xmits/Receives multiple bits at once one pin per bit one wire per bit Control = strobe signals, e.g. Data valid (ready) Data received (acknowledge) 8 EE3170/CC/Lecture#14-PartII 5 EE3170/CC/Lecture#14-PartII 6 Parallel I/O Ports Advantages maximum throughput (bits in parallel) good for short range high data rate busses e.g. disk or printer interface Disadvantages Need many wires (one per bit + strobes) Cabling gets expensive Cabling gets clumsy (e.g. ribbon cable) Some long-distance media are inherently single-line phone-lines or wireless frequencies What are the Advantages of Serial Communication? As little as one wire between xmitter and receiver cabling is cheaper and more flexible appropriate for inherently serial media Good for longer range and/or lower data rate communications e.g. remote terminal or modem EE3170/CC/Lecture#14-PartII 7 EE3170/CC/Lecture#14-PartII 8
3 What are the Disadvantages of Serial Communication? Serial I/O Format Reduced throughput relative to parallel only one bit a time Added complexity of self-synchronizing protocol Length of Bit Time Data Bits : Number of Data bits per Character Frame Parity : Even, Odd, None Stop Bits : 1, 1.5, 2 EE3170/CC/Lecture#14-PartII 9 EE3170/CC/Lecture#14-PartII 10 Serial I/O Protocol Examples 9600 N Baud : No Parity : 8 data bits : 1 Stop bit (9600 bits / second) / ( bits/frame) = 960 frames / sec = 960 Bytes / sec Efficiency = 8/(1+8+1) = E Baud : Even Parity : 7 data bits : 2 Stop bit (38400 bits / second) / ( bits/frame) = 3490 frames / sec * 7 bits / frame = 3053 Bytes / sec Efficiency = 7/( ) = 0.64 Simplex/Duplex Definitions Simplex = one direction comm. needs only one data channel e.g. keyboard-to-computer, computer-to-monitor Duplex = two direction comm. Half-Duplex = only one direction at a time needs only one data channel Xmit privilege must be time-shared Full-Duplex = both directions in parallel needs two data channels Both ends can xmit at once EE3170/CC/Lecture#14-PartII 11 EE3170/CC/Lecture#14-PartII 12
4 Collision and Error Detection Note: Half-Duplex needs collision detection Both ends could start transmitting at once. Neither message will get through. Both ends must detect the collision and back-off. Errors from noise and interference faster bit rates are more vulnerable to noise longer distances are more vulnerable to noise Receiver should detect or correct errors: EDC = Error Detection Code Most common is a single parity bit ECC = Error Correction Code Many exist. Parity EDC Count the number of ones in data bits. Add a parity bit to each word. to guarantee that whole word has either Even Parity make the total number of ones even Odd Parity make the total number of ones odd Parity is easy to calculate at transmitter P = (d N xor d N-1 xor xor d 0 ) xor (ODD/EVEN) Parity is easy to check at the receiver ERR = [P xor (d N xor d N-1 xor xor d 0 ) xor (ODD/EVEN) ] EE3170/CC/Lecture#14-PartII 13 EE3170/CC/Lecture#14-PartII 14 Bit-Serial Parity Checker Calculates parity on-the-fly running XOR useful in both xmitter and receiver Parity Example (Odd) Transmitter Forces Odd Parity Transmitter forces number of ones to be odd: [ ] parity bit = 1 xmit [ ] Receiver expects Odd parity Next bit Bit clock D Ck Clr Q Initialize If no errors en route, then receiver gets [ ] number of 1 s is odd no error Assume bit d 0 is flipped en-route, then receiver gets: [ ] number of 1 s is even error EE3170/CC/Lecture#14-PartII 15 EE3170/CC/Lecture#14-PartII 16
5 Parity Exercise Rework the preceding example for even parity. Parity Coverage Parity is Single-Error Detecting code guaranteed to detect all single-bit errors in reality will detect any odd number of bit errors Parity is not an error correcting code can t tell which bit is in error knows only an error occurred somewhere Usual response to a parity error is to request retransmission of data EE3170/CC/Lecture#14-PartII 17 EE3170/CC/Lecture#14-PartII 18 A Few Signaling Standards RS-232 (Conventional Serial I/O) Copper cable Actually does have some control lines Receiver Logic Levels: 1 = -3V -25V 0 = +3V +25 V Xmitter Logic levels typically: 1 = -12V & 0 = +12 V very robust, cheap hardware A Few Signaling Standards Telephone modem modulates outgoing signal into acoustic tone demodulates incoming tones into logic levels can get full-duplex by frequency multiplexing, e.g. One end: 1 = 1275 Hz & 0 = 1075 Hz Other end: 1 = 2225 Hz & 0 = 2025 Hz EE3170/CC/Lecture#14-PartII 19 EE3170/CC/Lecture#14-PartII 20
6 Data Formatting Xmitter and receiver must agree on Bit-clock period τ Endian ordering of the data Number of bits per word Parity Mode Framing bits to identify start of a data word start-bit = 1 stop-bit(s) = 0 Idle or quiescent state of the line Data Formatting Start Bit Resting state = 1 Need to ID start of a word to the receiver Start bit must be a 0 receiver looks for first 1 0 edge 1 0 EE3170/CC/Lecture#14-PartII 21 EE3170/CC/Lecture#14-PartII 22 Data Formatting Stop Bit(s) Must return to rest state at end guarantees receiver can re-sync on next start bit Last bit(s) of message must be a 1 receiver can looks for first 1 0 edge for next word 1 Data Formatting 1-Byte Data Ordering Low-Order bits first Last bit transmitted is the parity bit (if any) allows transmitter to generate parity on-the-fly 1 XMIT = % EE3170/CC/Lecture#14-PartII 23 EE3170/CC/Lecture#14-PartII 24
7 Message Synchronization Message Errors Xmitter and receiver internal clocks don t operate at the same frequency. Receiver must detect the start-bit (1st falling edge). Receiver samples much faster than the bit-rate. Typically 16x bit rate Allows accurate detection of the falling edge Once start-bit is detected Receiver samples middle of each bit allows for maximum skew between clock frequencies typically does > 1 sample for noise immunity Timing Error occurs if the clock frequencies are too far out of sync sample point drifts away from center of bit results in erroneous samples fortunately crystal clocks are very accurate Framing Error occurs if receiver gets confused on start of message interprets some zero data value as start bit if the expected stop bit is a zero then it recognizes the framing error EE3170/CC/Lecture#14-PartII 25 EE3170/CC/Lecture#14-PartII 26 Timing Error Framing Error occurs if the clock frequencies are too far out of sync. sample point drifts from center of bit results in erroneous samples fortunately crystal clocks are very accurate Start and stop bits do not properly frame the character. Received character doesn t end with stop bit. occurs if receiver gets confused on start of message interprets some zero data value as start bit if the expected start bit is a zero detected when receiver can t find stop bit either in this character or in following character EE3170/CC/Lecture#14-PartII 27 EE3170/CC/Lecture#14-PartII 28
8 68HC11 SCI Port Basic Transmission Operations Provides standard Serial Comm Port Removes details of operation from the software bit-by-bit output real-time bit rate management Provides a variety of interrupts Various transmit and receive conditions Allows continuous transmission and reception buffer registers serial I/O shift registers Program stores to Xmit Data Register Xmit Data Register moves data to Xmit Shift Register program can then store next word in Xmit Data Register Xmit Shift Register shifts data out through Pin PD1 at preset baud rate lsb first Data Bus Xmit Data Reg Xmit Shift Reg TxD Pin PD1 EE3170/CC/Lecture#14-PartII 29 EE3170/CC/Lecture#14-PartII 30 Basic Receive Operations Receiver Shift Register shifts data in through PD0 at preset baud rate into most significant bit getting least significant bit first Receiver Shift Register moves data to Receiver Data Register Program loads from Receiver Data Register RxD Data Bus Rcvr Data Reg Rcvr Shift Reg Pin PD0 Ports COP PULSE ACCUMULATOR MODA/ LIR MODE CONTROL TIMER SYSTEM PORT A MODB/ V STBY PERIODIC INTERRUPT PA7/PAI/OC1 PA6/OC2/OC1 PA5/OC3/OC1 PA4/OC4/OC1 PA3/OC5/OC1 PA2/IC1 PA1/IC2 PA0/IC3 XTAL EXTAL OSCILLATOR CLOCK LOGIC PORT B E BUS EXPANSION ADDRESS PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 CPU IRQ/ XIRQ STROBE AND HANDSHAKE PARALLEL I/O SINGLE CHIP MODE INTERRUPT LOGIC ADDRESS/DATA CONTROL PORT C RESET R/W AS PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 STRB STRA A15 A14 A13 A12 A11 A10 A9 A8 A7/D7 A6/D6 A5/D5 A4/D4 A3/D3 A2/D2 A1/D1 A0/D0 R/W AS SS SCK SPI MOSI MISO PD5/SS PD4/SCK PD3/MOSI PD2/MISO 8 KBYTES ROM 512 BYTES EEPROM 256 BYTES RAM CONTROL PORT D SCI TxD RxD PD1/TxD PD0/RxD A/D CONVERTER PORT E PE7/AN7 PE6/AN6 PE5/AN5 PE4/AN4 PE3/AN3 PE2/AN2 PE1/AN1 PE0/AN0 V DD V SS V RH V RL 1 EXPANDED MODE CIRCUITRY ENCLOSED BY DOTTED LINE IS EQUIVALENT TO MC68HC24. EE3170/CC/Lecture#14-PartII 31 EE3170/CC/Lecture#14-PartII Figure 1-1 Block Diagram 32
9 Port D Data Register Operations PD5/SS PD4/SCK PD3/MOSI PD2/MISO PD1/TxD PD0/RxD PE7/AN7 PE6/AN6 PE5/AN5 PE4/AN4 PE3/AN3 PE2/AN2 PE1/AN1 PE0/AN0 CONTROL PORT D PORT E SS SCK MOSI MISO TxD RxD SPI SCI A/D CONVERTER 256 BYTES RAM V RH V RL 512 BYTES EEPROM V DD V SS 8 KBYTES ROM Xmit Data Register and Rcvr Data Register are two physical registers that share the same address! Name = SCDR = Serial Comm. Data Reg. Address = $102F Operation: staa $102F: stores a byte from accumulator A to Xmit Data Register ldaa $102F: loads a byte from Rcvr Data Register to accumulator A EE3170/CC/Lecture#14-PartII 33 EE3170/CC/Lecture#14-PartII 34 Controlling the SCI SCI registers Must set the bit rate Need flags to show states of Data Registers and Shift Registers When outgoing data has been shifted from Xmit Data Register to Xmit Shift Register When new incoming data is available in Rcvr Data Register from Rcvr Shift Register Need flags to show state of the I/O port idle line Errors Must generate interrupts for these flags EE3170/CC/Lecture#14-PartII 35 EE3170/CC/Lecture#14-PartII 36
10 Bit Rate Control SCI hardware transfers bits at preset bit rate Programmable Frequency Dividers set bit rate Crystal sets base freq (usually 8MHz) E-Clock = Xtal freq / 4 Prescalar divides E-clock by 1, 3, 4, or 13 divisor set by bits SCP1 & SCP0 in BAUD register Rate Control Unit divides prescalar output by 1, 2, 4, 8, 16, 32, 64, or 128 divisor set by bits SCR2, SCR1, and SCR0 in BAUD register Bit Rate Control Rate Control Unit output = 16 x Bit rate This signal is used as the sampling clock A fixed divide-by-16 unit generates the final bit rate Using multiple dividers allows flexibility different crystal frequencies wide range of rates EE3170/CC/Lecture#14-PartII 37 EE3170/CC/Lecture#14-PartII 38 BAUD Register Allows the BAUD rated (bits/second) to be specified. TCLR : Clear Baud Rate Counter Bit (Test) RCKB : SCI Baud Rate Clock Check Bit (Test) 6811 Baud Rate Selection (replaced) BAUD Bit Rate (bits per second) $ $ $ $ (Read pages ) EE3170/CC/Lecture#14-PartII 40
11 SCI Flags Two Receiver Data Flags in SCSR $102E RDRF = Receiver Data Register Full set on data move from Rcvr Shift Register to Rcvr Data Register tells program that next byte has arrived IDLE = Input Line is Idle set when line = 1 for one full character time program can use IDLE for port control To clear these flags, program must load from $102E load from $102F EE3170/CC/Lecture#14-PartII 41 SCI Flags Three Receiver Error Flags in SCSR $102E OR = Overrun Flag Set when complete character is received and RDRF flag is still set Shows program hasn t loaded previous character NF = Noise Flag Rcvr takes 3 samples near center of each bit NF is set if the 3 samples do not all agree FE = framing error flag set if the character Stop bit 1 To Clear these flags (same as Rcvr Data Flags) EE3170/CC/Lecture#14-PartII 42 SCI Flags SCSR Register Two Transmitter Data Flags in SCSR $102E TDRE = Transmitter Data Register Empty Flag Set when outgoing data moved to Xmit Shift Register Program should check it before storing next outgoing byte TC = Transmission Complete Flag Set when entire byte has been transmitted I.e. when Xmit Shift Register is emptied To clear these flags, program must load from $102E store to $102F SCSR $102E EE3170/CC/Lecture#14-PartII 43 EE3170/CC/Lecture#14-PartII 44
12 SCI Interrupts Interrupt Enable Flags in SCCR2 $102D Interrupts do not map 1:1 to flags TIE = TDRF Flag interrupt enable TCIE = TC interrupt enable RIE = Receiver Interrupt Enable shared by RDRF and OR flags ILIE = IDLE flag interrupt enable SCCR2 $102D TIE TCIE RIE ILIE EE3170/CC/Lecture#14-PartII 45 SCI Interrupts NF and FE flags can t cause interrupts. Program must read the flag bits. Program must look for noise and framing errors so it can find them. SCI has only one interrupt FFD6:FFD7 One Vector means ISR must poll the Flags in SCSR Time consuming, but not a problem SCI is very slow SCI interrupt has the lowest priority interrupt of all Again, not a problem because SCI is so slow EE3170/CC/Lecture#14-PartII 46 Setting Character Length Data can be characters or numbers. ASCII = 7-bit code can use the 8th bit for parity only need an 8-bit word Numbers are multiples of 8-bits. For parity protection, we need a nine-bit word allows selecting an 8 or 9 bit SCI word. a bit for length a bit for the ninth data bit (bit 8) Setting Character Length Length data is kept in SCCR1 $102C. M bit determines word length. 0 = 8-bits, 1 = 9-bits R8 bit holds the extra bit for incoming data. T8 bit holds the extra bit for outgoing data. Program must explicitly load or store R8 or T8. SCCR1 $102C EE3170/CC/Lecture#14-PartII 47 EE3170/CC/Lecture#14-PartII 48
13 Waking Up the SCI Port Program can tell the SCI port to sleep. Sleeping port still monitors the incoming line. sets no flag and causes no interrupts. SCI port can be awakened by Receive line idle for one full character Idle character is a space between messages. allows port to ignore rest of the current message Or a 1 in the leading bit of an incoming character embedded in a message header byte Waking Up the SCI Port Port put to sleep by setting RWU bit in SCCR2 0 = stay awake, 1 = go to sleep SCCR2 $102D Wake-up Condition set by WAKE bit in SCCR1 0 = IDLE, 1 = leading-one SCCR1 $102C EE3170/CC/Lecture#14-PartII 49 EE3170/CC/Lecture#14-PartII 50 SCI : Serial I/O Example SCI : Serial I/O Example Echo characters via the 68HC11 UART UART Universal asynchronous receiver transmitter Wait for each character and echo the character back Start Initialization SCIINT Check which SCI Source? Assume 8-bit data word, no parity, 1200 Baud. NOTE : Echo does not use Serial Interface. Echo Routine RECV Copy Character to InBuf XMIT Copy Character From OutBuf N Done? Y Setup to Xmit Setup to Recv Finish RTI RTI EE3170/CC/Lecture#14-PartII 51 EE3170/CC/Lecture#14-PartII 52
14 SCI Example SCI Example Assume 8Mhz Crystal; Generate 1200 BAUD SCP[1:0] = 11 SCR[2:0] = 011 All Flags no Initialization M = 0 : 8 data bits Wake = 0 : no wake Enable Receiver and Interrupt RIE = 1; RE = 1 Transmitter Disabled TIE = 0; TCIE = 1; TE = 0 EE3170/CC/Lecture#14-PartII 53 /Definitions BAUD equ $102B SCCR1 equ $102C SCCR2 equ $102D SCSR equ $102E SCDR equ $102F org $2000 INBUF rmb 8 OUTBUF rmb 8 org fdb org fdb $FFD6 SCIISR $FFFE MAIN EE3170/CC/Lecture#14-PartII 54 SCI Example SCI Example Initialization Set Baud Set 8 bit No Wakeup Disable Xmit Enable Recv end INIT LDS $2FFF LDAA #$33 STAA BAUD CLRA STAA SCCR1 LDAA #$24 STAA SCCR2 CLI RECV Copy Character to InBuf Setup to Xmit RTI SCIINT Check which SCI Source? XMIT Copy Character From OutBuf Setup to Recv RTI SCIISR LDX #$1000 BRSET SCSR-$1000, X, BIT5, RECV BRSET SCSR-$1000, X, BIT7, TX RTI RECV LDAA SCDR STAA INBUF * Enable Xmit BSET SCSR-$1000, X, % RTI TX LDAA OUTBUF STAA SCDR * Disable Xmit BCLR SCSR-$1000, X, % RTI EE3170/CC/Lecture#14-PartII 55 EE3170/CC/Lecture#14-PartII 56
15 Conclusions Serial I/O is used when parallel is impractical due to distance or interconnect limitations. Timing is inherent in the Serial I/O protocol. Serial I/O functional unit called UART in most modern microcontrollers. Serial I/O in 68HC11 Single functional unit for transmit/receive Single SCI Interrupt must be asked which source requested the interrupt EE3170/CC/Lecture#14-PartII 57
EE 3170 Microcontroller Applications
Block Diagram of 68HC11A8 EE 3170 Microcontroller Applications Lecture 14: Advanced 68HC11 Hardware- PartI A: Measuring Real-Time in the 68HC11 - Miller 7.7-7.8 Based on slides for ECE3170 by Profs. Davis,
More informationSCI Serial Communication Interface
SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004 1 Learning Objectives of the Overview Knowledge of the general differences between serial and parallel
More informationA B C D E F 0480 FE B F5 3B FC F3 E 1A 1D 2A 2D 3A 3D 4A 4D 5A 5D 6A 6D 7A 7D
What's on the 9S12 bus as it executes a program The 9S12 Serial Communications Interface 9S12 Serial Communications Interface (SCI) Block Guide V02.05 Huang, Sections 9.2-9.6 Consider a 9S12 executing
More informationReview for Exam 3. Write 0x05 to ATD0CTL4 to set at fastest conversion speed and 10-bit conversions
Review for Exam 3 A/D Converter Power-up A/D converter (ATD0CTL2) Write 0x05 to ATD0CTL4 to set at fastest conversion speed and 10-bit conversions Write 0x85 to ATD0CTL4 to set at fastest conversion speed
More informationM68HC11E Family. Data Sheet M68HC11. Microcontrollers M68HC11E/D Rev. 5 6/2003 MOTOROLA.COM/SEMICONDUCTORS
M68HCE Family Data Sheet M68HC Microcontrollers M68HCE/D Rev. 5 6/23 MOTOROLA.COM/SEMICONDUCTORS MC68HCE Family Data Sheet To provide the most up-to-date information, the revision of our documents on
More informationAsynchronous Data Transfer
Asynchronous Data Transfer In asynchronous data transfer, there is no clock line between the two devices Both devices use internal clocks with the same frequency Both devices agree on how many data bits
More informationLecture 13 Serial Interfaces
CPE 390: Microprocessor Systems Spring 2018 Lecture 13 Serial Interfaces Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 Adapted from HCS12/9S12
More informationM68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1
M68HC08 Microcontroller The MC68HC908GP32 Babak Kia Adjunct Professor Boston University College of Engineering Email: bkia -at- bu.edu ENG SC757 - Advanced Microprocessor Design General Description The
More informationCS/ECE 5780/6780: Embedded System Design
CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 16: SCI Register Configuration and Ritual SCI Register Information & Terminology The information in this lecture is found: Textbook pages 346-9.
More informationHCS12 Serial Communications Interface (SCI) Block Guide V02.06
DOCUMENT NUMBER S12SCIV2/D HCS12 Serial Communications Interface (SCI) Block Guide V02.06 Original Release Date: June 4, 1999 Revised: Oct 10, 2001 Motorola, Inc. Motorola reserves the right to make changes
More informationSECTION 5 RESETS AND INTERRUPTS
SECTION RESETS AND INTERRUPTS Resets and interrupt operations load the program counter with a vector that points to a new location from which instructions are to be fetched. A reset immediately stops execution
More informationM68HC11E/D REV 3.1 HC11M68HC 1M68HC11M. M68HC11E Family Technical Data. HCMOS Microcontroller Unit
M68HC11E/D REV 3.1 68HC11M6 HC11M68HC 1M68HC11M M68HC11E Family Technical Data HCMOS Microcontroller Unit blank MC68HC11E Family Technical Data Motorola reserves the right to make changes without further
More informationECE/CS 5780/6780: Embedded System Design
ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 16: SCI Register Configuration and Ritual Scott R. Little (Lecture 16: SCI Config) ECE/CS 5780/6780 1 / 19 Administrivia Schedule This is
More informationDallas Semiconductor DS1307 Real Time Clock. The DS 1307 is a real-time clock with 56 bytes of NV (nonvolatile)
Using the MC9S12 IIC Bus with DS 1307 Real Time Clock DS1307 Data Sheet Asynchronous Serial Communications The MC9S12 Serial Communications Interface (SCI) Dallas Semiconductor DS1307 Real Time Clock The
More informationMC68HC12 Parallel I/O
EEL 4744C: Microprocessor Applications Lecture 6 Part 2 MC68HC12 Parallel I/O Dr. Tao Li 1 Software and Hardware Engineering (new version): Chapter 11 Or SHE (old version): Chapter 7 And Reading Assignment
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 informationM68HC11 E SERIES HCMOS MICROCONTROLLER UNIT
M68HC11 E SERIES HCMOS MICROCONTROLLER UNIT Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding
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 informationspi 1 Fri Oct 13 13:04:
spi 1 Fri Oct 1 1:: 1.1 Introduction SECTION SERIAL PERIPHERAL INTERFACE (SPI) The SPI module allows full-duplex, synchronous, serial communication with peripheral devices.. Features Features of the SPI
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 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 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 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 informationEE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System
EE4390 Microprocessors Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System 1 Overview 68HC12 hardware overview Subsystems Memory System 2 68HC12 Hardware Overview "Copyright of Motorola,
More informationECE/CE 3720: Embedded System Design
Sequence of Events During Interrupt 1. Hardwere needs service (busy-to-done) transition. 2. Flag is set in one of the I/O status registers. (a) Interrupting event sets the flag (ex., STAF=1). Slide 1 ECE/CE
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 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 informationECE/CS 3720: Embedded System Design (ECE 6960/2 and CS 6968)
Sequence of Events During Interrupt 1. Hardwere needs service (busy-to-done) transition. 2. Flag is set in one of the I/O status registers. (a) Interrupting event sets the flag (ex., STAF=1). Slide 1 ECE/CS
More informationME 4447 / ME 6405: Introduction to Mechatronics
ME 4447 / ME 6405: Introduction to Mechatronics Interrupts and Resets Rohan Bansal Edward Chyau Anirudh Rudraraju Interrupts and Resets 1 Telephone Analogy How do we know if someone is calling? Use polling
More informationGo Gators! Relax! May the Schwartz be with you!
Page 1/12 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front of the test papers. If you need more room make a clearly indicated note on the front
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 informationEB380. Migrating from the MC68HC811E2 to the MC68HC711E9. Freescale Semiconductor, I. Introduction. Migrating to the MC68HC711E9
nc. Semiconductor Products Sector Engineering Bulletin Order this document by /D Migrating from the MC68HC811E2 to the MC68HC711E9 By Timothy J. Airaudi Applications Engineering, Microcontroller Division
More informationChapter 14. Motorola MC68HC11 Family MCU Architecture
Chapter 14 Motorola MC68HC11 Family MCU Architecture Lesson 1 68HC11 MCU Architecture overview 2 Outline CPU Registers, MCU Architecture overview Address and Data Buses Execution Unit- ALU Ports 3 CPU
More informationM68HC11K/D HC11M68HC 1M68HC11M. M68HC11K Family Technical Data. HCMOS Microcontroller Unit
M68HC11K/D 68HC11M6 HC11M68HC 1M68HC11M HCMOS Microcontroller Unit nc. blank nc. MC68HC11K Family Motorola reserves the right to make changes without further notice to any products herein. Motorola makes
More informationModule 3.C. Serial Peripheral Interface (SPI) Tim Rogers 2017
Module 3.C Serial Peripheral Interface (SPI) Tim Rogers 2017 Learning Outcome #3 An ability to effectively utilize the wide variety of peripherals integrated into a contemporary microcontroller How? A:
More informationFreescale Semiconductor, I MC68HC11A8. HCMOS Single-Chip Microcontroller
nc. MC8HCA8 HCMOS Single-Chip Microcontroller Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding
More informationApplication Note. Interfacing the CS5525/6/9 to the 68HC05. By Keith Coffey MOSI (PD3) SDO MISO (PD2) SCLK. Figure 1. 3-Wire and 4-Wire Interfaces
Application Note Interfacing the CS5525/6/9 to the 68HC05 By Keith Coffey INTRODUCTION This application note details the interface of Crystal Semiconductor s CS5525/6/9 Analog-to-Digital Converter (ADC)
More informationRoberto Muscedere Images and Text Portions 2003 Prentice Hall 1
Microcomputer Structure and Operation Chapter 5 A Microprocessor ( P) contains the controller, ALU and internal registers A Microcomputer ( C) contains a microprocessor, memory (RAM, ROM, etc), input and
More informationRL78 Serial interfaces
RL78 Serial interfaces Renesas Electronics 00000-A Introduction Purpose This course provides an introduction to the RL78 serial interface architecture. In detail the different serial interfaces and their
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 informationIntroduction to Mechatronics. Fall Instructor: Professor Charles Ume. Interrupts and Resets
ME645 Introduction to Mechatronics Fall 24 Instructor: Professor Charles Ume Interrupts and Resets Reason for Interrupts You might want instructions executed immediately after internal request and/or request
More informationRyerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003
Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 23 Name: Student Number: Time limit: 3 hours Section: Examiners: K Clowes,
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 information538 Lecture Notes Week 5
538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?
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 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 informationModule 3.F. Serial Communications Interface (SCI) Tim Rogers 2017
Module 3.F Serial Communications Interface (SCI) Tim Rogers 2017 Learning Outcome #3 An ability to effectively utilize the wide variety of peripherals integrated into a contemporary microcontroller How?
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 information538 Lecture Notes Week 5
538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what
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 informationEE 3170 Microcontroller Applications
EE 317 Microcontroller Applications Lecture 5 : Instruction Subset & Machine Language: Introduction to the Motorola 68HC11 - Miller 2.1 & 2.2 Based on slides for ECE317 by Profs. Davis, Kieckhafer, Tan,
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 informationEEL 4744C: Microprocessor Applications. Lecture 7. Part 2. M68HC12 Interrupt. Dr. Tao Li 1
EEL 4744C: Microprocessor Applications Lecture 7 Part 2 M68HC12 Interrupt Dr. Tao Li 1 Reading Assignment Software and Hardware Engineering (New version): Chapter 12 or SHE (old version) Chapter 8 And
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 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 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 informationHC11 MC68HC11F1. Technical Data
HC11 MC68HC11F1 Technical Data Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee regarding the suitability
More informationInput-Output Organization
Ted Borys - CSI 404 5/1/2004 Page 11-1 Section 11 Input-Output Organization ASCII Character Set 94 printable characters Upper & lowercase letters 10 numerals Special characters such as $, @, #, % 34 control
More informationInterrupts. Interrupts Resets Low Power Modes. Resets Low Power Modes
Interrupts Resets Low Power Modes Drop everything and get your priorities straight! Alan Claghorn Chris Golder Raja Shah Outline Interrupts Why use interrupts? Types of interrupts Interrupt Flow Priorities
More informationEE 354 November 13, 2017 ARM UART Notes
EE 354 November 13, 2017 ARM UART Notes For serial communications you should be familiar with the following terms: UART/USART Baud rate Synchronous/Asynchronous communication Half-Duplex/Full-Duplex The
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 informationMark II Aiken Relay Calculator
Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00
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 informationUniversity of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz
Department of Electrical & Computer Engineering 15 October 199 Professor in ECE 31-Dec-9 12:22 PM Page 1/ Instructions: Show all work on the front of the test papers. If you need more room, make a clearly
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 informationEEE310 MICROPROCESSORS M. Fatih Tüysüz CHAPTER 7
EEE31 MICROPROCESSORS M. Fatih Tüysüz CHAPTER 7 CHAPTER 7 Contents Midterm Questions & Solutions Serial I/O Data Transfer Midterm Questions & Solutions Q1: a) Why Microprocessors use only two digits (
More informationC4 C9, C12 C18. Maxim Integrated Products 1
General Description The LD module is an assembled and tested PC board intended for use with Maxim s low-voltage dataacquisition evaluation kits (V kits). The module uses Motorola s MCLFN microcontroller
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 informationECE 372 Microcontroller Design Parallel IO Ports - Interrupts. ECE 372 Microcontroller Design Parallel IO Ports - Interrupts
Interrupts An interrupt can be compared with a phone call interrupting your task which you will resume when the call is finished You can mask an interrupt just as you can decide not to answer any phone
More informationIntroduction to Serial Communication. ECE/CS 5780/6780: Embedded System Design. A Serial Channel. Definitions. SCI versus SPI.
Introduction to Serial Communication ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 14: Serial I/O Devices Serial communication transmits of one bit of information at a time. One bit is
More informationCOMP2121: Microprocessors and Interfacing
COMP2121: Microprocessors and Interfacing Lecture 25: Serial Input/Output (II) Overview USART (Universal Synchronous and Asynchronous serial Receiver and Transmitter) in AVR http://www.cse.unsw.edu.au/~cs2121
More informationEmbedded Systems. Read pages
Embedded Systems Read pages 385-417 Definition of Embedded Systems Embedded systems Computer dedicated to serve specific purposes Many physical systems today use computer for powerful and intelligent applications
More informationCS/ECE 5780/6780: Embedded System Design
CS/ECE 5780/6780: Embedded System Design John Regehr Lecture 15: Serial I/O Devices Today Quick overview of serial communication in general SCI Serial Communication Interface SCI on the HCS12 Introduction
More information8051 Serial Port. EE4380 Fall02 Class 10. Pari vallal Kannan. Center for Integrated Circuits and Systems University of Texas at Dallas
8051 Serial Port EE4380 Fall02 Class 10 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Serial Comm. - Introduction Serial Vs Parallel Transfer of data Simplex,
More informationInterfacing the HI7190 to a Microcontroller
Interfacing the to a Microcontroller Application Note September 1995 AN9527 Authors: Stephen LaJeunesse and John Kornblum Introduction The Intersil is a 24-bit monolithic instrumentation sigma delta A/D
More informationAli Karimpour Associate Professor Ferdowsi University of Mashhad
AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Main reference: Christopher T. Kilian, (2001), Modern Control Technology: Components and Systems Publisher: Delmar
More informationASSIGNMENT 3: PLAYING WITH THE 68HC11. Due Wednesday, Oct 9, 2002
ASSIGNMENT 3: PLAYING WITH THE 68HC11 Due Wednesday, Oct 9, 2002 Introduction In this assignment, you will (1) construct a minimal 68HC11 system on your breadboard, and (2) use the serial port of a computer
More informationTutorial Introduction
Tutorial Introduction PURPOSE: This tutorial describes the key features of the DSP56300 family of processors. OBJECTIVES: Describe the main features of the DSP 24-bit core. Identify the features and functions
More informationECE/CS 5780/6780: Embedded System Design. Introduction to Serial Communication
ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 15: Serial I/O Devices Scott R. Little (Lecture 15: Serial I/O) ECE/CS 5780/6780 1 / 69 Introduction to Serial Communication Serial communication
More informationEE 3170 Microcontroller Applications
EE 3170 Microcontroller Applications Lecture 4 : Processors, Computers, and Controllers - 1.2 (reading assignment), 1.3-1.5 Based on slides for ECE3170 by Profs. Kieckhafer, Davis, Tan, and Cischke Outline
More informationAN Kbyte Addressing with the M68HC11. Overview
Order this document by /D 128-Kbyte Addressing with the M68HC11 By Ross Mitchell MCU Applications Engineering Freescale Ltd. East Kilbride, Scotland Overview The maximum direct addressing capability of
More informationAN1298. Variations in the Motorola MC68HC(7)05Cx Family By Joanne Field CSIC Applications. Introduction
Order this document by /D Variations in the Motorola MC68HC(7)05Cx Family By Joanne Field CSIC Applications East Kilbride, Scotland Introduction The Freescale MC68HC05 C Family of 8-bit microcontrollers
More informationAN Multifunction Serial Interface of FM MCU. Contents. 1 Introduction
AN99218 Author: Edison Zhang Associated Part Family: FM0+, FM3, FM4 Associated Code Examples: None Related Application Notes: None AN99218 explains the various modes of the multifunction serial (MFS) interface.
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 informationUnderstanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,
Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and
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 informationHigh Performance M68HC11 System Design Using The WSI PSD4XX and PSD5XX Families
APPLICATION NOTE Order this document by: AN1242/D High Performance M68HC11 System Design Using The WSI PSD4XX and PSD5XX Families by John Bodnar INTRODUCTION This application note covers conversion from
More informationTutorial Introduction
Tutorial Introduction PURPOSE: - To explain MCU processing of reset and and interrupt events OBJECTIVES: - Describe the differences between resets and interrupts. - Identify different sources of resets
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 informationCommunication. Chirag Sangani
Communication Scope of Communication Telephones and cell phones. Satellite networks. Radio and DTH services. Campus LAN and wireless. Internet. Intra-galactic communication. Essentials of Communication
More information8051 Microcontrollers
8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 8, 2016 Controller vs Processor Controller vs Processor Introduction to 8051 Micro-controller In 1981,Intel corporation
More informationInput and Output Ports. How do you get data into a computer from the outside?
Input and Output Ports How do you get data into a computer from the outside? SIMPLIFIED INPUT PORT D 7 Any read from address $0000 gets signals from outside H C 2 D a t a D D D4 D3 S i g n a l s F r o
More informationAN1060. Motorola Semiconductor Application Note. M68HC11 Bootstrap Mode By Jim Sibigtroth, Mike Rhoades, and John Langan Austin, Texas.
Order this document by AN1060/D Rev. 1.0 Motorola Semiconductor Application Note AN1060 M68HC11 Bootstrap Mode By Jim Sibigtroth, Mike Rhoades, and John Langan Austin, Texas Introduction The M68HC11 Family
More informationA Synthesizable VHDL Model of the Serial Communication Interface and. Synchronous Serial Interface of Motorola DSP56002
A Synthesizable VHDL Model of the Serial Communication Interface and Synchronous Serial Interface of Motorola DSP56002 Master thesis performed in Eletronics Systems by Swaroop Mattam LiTH-ISY-EX--06/3860--SE
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 informationGrowing Together Globally Serial Communication Design In Embedded System
Growing Together Globally Serial Communication Design In Embedded System Contents Serial communication introduction......... 01 The advantages of serial design......... 02 RS232 interface......... 04 RS422
More informatione-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text
e-pg Pathshala Subject : Computer Science Paper: Embedded System Module: 8051 Architecture Module No: CS/ES/5 Quadrant 1 e-text In this lecture the detailed architecture of 8051 controller, register bank,
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 informationFreescale Semiconductor, Inc.
Order this document by /D Software I 2 C Communications By Brad Bierschenk MMD Applications Engineering Austin, Texas Introduction I 2 C Overview The I 2 C (inter-integrated circuit) protocol is a 2-wire
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 information