Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface.

Slides:



Advertisements
Similar presentations
EUSART Serial Communication.
Advertisements

INPUT-OUTPUT ORGANIZATION
Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
11-1 ECE 424 Design of Microprocessor-Based Systems Haibo Wang ECE Department Southern Illinois University Carbondale, IL I/O System Design.
Review: Interrupts & Timers
ECT 357 Ch 18 UART. Today’s Quote: Be careful that your marriage doesn’t become a duel instead of a duet. Be careful that your marriage doesn’t become.
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
H. Huang Transparency No.9-1 The HCS12/MC9S12 Microcontroller Copyright © 2010 Delmar Cengage Learning Chapter 9: Serial Communication Interface – SCI.
SCI: Serial Communications Interface Presented by: Sean Kline Chad Smith Jamie Cruce.
Serial I/O - Programmable Communication Interface
COMP3221: Microprocessors and Embedded Systems Lecture 22: Serial Input/Output (II) Lecturer: Hui Wu Session 1, 2005.
Serial Input/Output Interface Outline –Serial I/O –Asynchronous serial I/O –6850 ACIA –68681 DUART –Synchronous serial I/OInterface Standards –68000 Serial.
USART and Asynchrono us Communica tion The USART is used for synchronous and asynchronous serial communication. USART = Universal Synchronous/Asynchronous.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Harrison Jones Alexis Noel William Allen SERIAL COMMUNICATION INTERFACE (SCI)
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.
EEE305 Microcontroller Systems Lecture 7: Embedded C using PIC microcontrollers Serial i/o with the XC8 Teaching resources are at
1 SCI Serial Communication Interface Gerrit Becker James McClearen Charlie Hagadorn October 21, 2004.
INPUT-OUTPUT ORGANIZATION
Serial Communication Interface (SCI) Kevin Stuart Matt Betts March 27, 2007 ME 6405, Sp 07.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
The 8051 Microcontroller and Embedded Systems
SC200x Peripherals Broadband Entertainment Division DTV Source Applications July 2001.
M Semiconductor Products Sector Computer Operating Properly Module Detail Slide #1 of 7 Tutorial Introduction PURPOSE -To explain how to configure and.
Lecture Set 9 MCS-51 Serial Port.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
Lecture 14 DMA Controller & Serial Communications Interface (UART)
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
Universal Asynchronous Receiver/Transmitter (UART)
Serial Communication Lec note 9.
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
Advanced Microprocessor1 I/O Interface Programmable Interval Timer: 8254 Three independent 16-bit programmable counters (timers). Each capable in counting.
Example. SBUF Register SCON Register(1) SCON Register(2)
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
NS Training Hardware. Serial Controller - UART.
Universal Asynchronous Receiver/Transmitter (UART)
Serial Communication Interface Ta Kim Nicholas Earnhart Razid Ahmad ME 6405 – Fall 2008 November 6, 2008.
CE-2810 Dr. Mark L. Hornick 1 Using the USART Configuration and Programming.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
1 October 26, 2006ME 6405 MechatronicsSerial Communication Interface Brian Guerriero Jon Rogers Robert Thiets.
Appendix B: System Development Example MTT48 V2.1 B - 1 APPENDIX B: SYSTEM DEVELOPMENT.
HCS12 Technical Training, Rev 2.0 Module 7- SCI, Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
RX Serial Peripheral Interface (RSPI)
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
M Semiconductor Products Sector Low Voltage Inhibit Module Slide #1 of 3 Tutorial Introduction PURPOSE -To explain how to configure and use the Low Voltage.
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
8251 USART.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
SCI Communication Proudly Presented By: Adam Cardi & Aaron Enes.
The HCS12 SCI Subsystem A HCS12 device may have one or two serial communication interface. These two SCI interfaces are referred to as SCI0 and SCI1. The.
Serial mode of data transfer
Tutorial Introduction
Source: Serial Port Source:
SERIAL PORT PROGRAMMING
Source: Serial Port Source:
UART Serial Port Programming
Serial Communication Interface
Serial Communication Interface: Using 8251
Serial Communication Interface
COMP3221: Microprocessors and Embedded Systems
Source: Serial Port Source:
EUSART Serial Communication.
Serial Communication 19th Han Seung Uk.
Source: Serial Port Source:
PIC Serial Port Interfacing
PIC Serial Port Interfacing
Presentation transcript:

Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface (SCI) Module in common applications OBJECTIVES: -Describe the uses and features of the Serial Communications Interface Module. -Identify the steps to configure the SCI transmitter. -Identify the steps to configure the SCI receiver. -Identify the steps to set up serial communications from the MC68HC08 to the host PC. CONTENTS: -22 pages -2 questions LEARNING TIME: -40 minutes PREREQUESITE: -68HC08 CPU training module Tutorial Introduction

Serial Communications Interface Module Slide #2 of 19 MC68HC908GP20 Training Full-duplex high speed asynchronous operation Standard mark/space NRZ format 32 programmable baud rates Programmable 8-bit or 9-bit character length Two receiver wakeup methods: – Address mark wakeup – Idle line wakeup Separately enabled, double-buffered transmitter and receiver Advanced data sampling and re-synchronization logic Programmable transmitter output polarity Eight interrupt sources SCI Module Features

Serial Communications Interface Module Slide #3 of 19 MC68HC908GP20 Training SCI Module Pins MC68HC908GP32 SCI output pins RxD and TxD

Serial Communications Interface Module Slide #4 of 19 MC68HC908GP20 Training SCI data register (SCDR) SCI baud rate register (SCBR) SCI control register 1 (SCC1) SCI control register 2 (SCC2) SCI control register 3 (SCC3) SCI status register 1 (SCS1) SCI status register 2 (SCS2) SCI Register Summary

Serial Communications Interface Module Slide #5 of 19 MC68HC908GP20 Training Reading SCDR accesses R7:R0. Writing SCDR accesses T7:T0. SCI Data Register (SCDR)

Serial Communications Interface Module Slide #6 of 19 MC68HC908GP20 Training Double Buffering PTE0/TxD SCI Data Register H L STOP START 11-BIT TRANSMIT SHIFT REGISTER MSB INTERNAL DATA BUS CLK From Baud Rate Generator SCI Transmitter SCI Data Register Transmitter Empty Event (Flag or IRQ Request) Transmition Complete Event (Flag or IRQ Request) Data from CPU

Serial Communications Interface Module Slide #7 of 19 MC68HC908GP20 Training D0D1D2D3D4 D6D7AP StartStop optional SCI internal sampling burst Incoming data on RxD pin time R8 R9 R10 start and bit validation Data Receiver Recovery R3R5R7

Serial Communications Interface Module Slide #8 of 19 MC68HC908GP20 Training baud rate to shift register clock Source ÷ 4 PRESCALER BAUD RATE DIVISOR SCP1 SCP0 SCR0 SCR1 SCR2 ÷ 16 DATA RECOVERY PTE1/RxD SCI baud rate register (SCBR) Baud Rate Generator

Serial Communications Interface Module Slide #9 of 19 MC68HC908GP20 Training SCI Baud Rate Register (SCBR) SCR2 - SCR baud rate divisor SCP1 - SCP prescaler

Serial Communications Interface Module Slide #10 of 19 MC68HC908GP20 Training Selecting the Baud Rate SCR2 - SCR baud rate divisor SCP1 - SCP prescaler Generate a baud rate of baud:

Serial Communications Interface Module Slide #11 of 19 MC68HC908GP20 Training SCI Control Registers Overview SCC1 SCC2 SCC3

Serial Communications Interface Module Slide #12 of 19 MC68HC908GP20 Training LOOPS — Loop Mode Select Bit 1 = Loop mode enabled 0 = Normal operation enabled Configuring SCI Operations - SCC1

Serial Communications Interface Module Slide #13 of 19 MC68HC908GP20 Training TE - Transmitter Enable Bit 1 = Transmitter enabled 0 = Transmitter disabled Configuring SCI Operations - SCC2

Serial Communications Interface Module Slide #14 of 19 MC68HC908GP20 Training R8 — Received Bit 8 When receiving 9-bit characters, R8 is the ninth bit (bit 8) of the character. When receiving 8-bit characters, R8 is a copy of the eighth bit (bit 7) of the character. Configuring SCI Operations - SCC3

Serial Communications Interface Module Slide #15 of 19 MC68HC908GP20 Training SCC2 SCC3 Configuring SCI Interrupts

Serial Communications Interface Module Slide #16 of 19 MC68HC908GP20 Training SCTE — SCI Transmitter Empty Bit 1 = SCDR data transferred to transmit shift register 0 = SCDR data not transferred to transmit shift register SCI Status Register 1 (SCS1)

Serial Communications Interface Module Slide #17 of 19 MC68HC908GP20 Training BKF — Break Flag Bit 1 = Break character detected 0 = No break character detected SCI Status Register 2 (SCS2)

Serial Communications Interface Module Slide #18 of 19 MC68HC908GP20 Training Transmit “Hello World” at 9600,n,8,1 to a terminal: $include 'iogp20.inc' ORG$FFFE FDBApplication;Reset Vector ORG$B000 Application: MOV#$0B,CONFIG1;No COP, 5V Operation, No Low voltage detection MOV#$02,CONFIG2;Use Internal data bus clock as clock source for SCI MOV#% ,SCBR;Select 9600 Baud rate over a clock = MHz MOV#% ,SCC1;Enable SCI MOV#% ,SCC2;Transmit enable, Disable receiver LDASCS1;Condition to clear SCT Tx empty bit Main: MOV#'H',SCDR;Send “H” BRCLR7,SCS1,*;Wait for TX MOV#'e',SCDR;Send “e” BRCLR7,SCS1,*;Wait for TX MOV#'l',SCDR;Send “l” BRCLR7,SCS1,*;Wait for TX MOV#'l',SCDR;Send “l” BRCLR7,SCS1,*;Wait for TX MOV#'o',SCDR;Send “o” BRCLR7,SCS1,*;Wait for TX MOV#$0013,SCDR;Send BRCLR7,SCS1,*;Wait for TX JMPMAIN Example: Transmission Program

Serial Communications Interface Module Slide #19 of 19 MC68HC908GP20 Training $include 'iogp20.inc' ORG$FFFE FDBApplication;Reset Vector ORGEPROM Application: MOV#$0B,CONFIG1;No COP, 5V Operation, No Low voltage detection MOV#$02,CONFIG2;Use Internal data bus clock as clock source for SCI MOV#% ,SCBR;Select 9600 Baud rate over a clock = MHz MOV#% ,SCC1;Enable SCI MOV#% ,SCC2;Receiver enable, Disable transmitter LDASCS1;Condition to clear SCT Tx empty bit CLRPORTC;Set PORTC = 0x00 BSET4,DDRC;Set PORTC Bit 4 as Output. CLI Main:JMPMAIN;Application Loop RxEvent: LDASCS1;Clear Rx flag LDASCDR;Read incoming char CMP#'4';IF Acc = ASCII(4) Then Complement PORTC output contents BNEEndIRQ;ELSE Exit IRQ COMPORTC;Complement PORTC output contents EndIRQRTI;End this IRQ ORG$FFE4;Set SCI Receiver full Event (a New character has arrive) DWRxEvent;Define Interrupt Service Routine in IRQ Vector Table Receive a “4” to turn off/on a LED: Example: Reception Program

Serial Communications Interface Module Slide #20 of 19 MC68HC908GP20 Training Question What is the SCI baud rate when the clock frequency is MHz, the prescaler select bits are set to 01, and the baud rate select bits are set to 001? Click on your choice. a) 3200 baud b) 12,800 baud c) 19,200 baud d) 25,600 baud

Serial Communications Interface Module Slide #21 of 19 MC68HC908GP20 Training Question Which of the following instructions configures the SCI to generate both a noise error interrupt and a parity error interrupt? Click on your choice. a) MOV #% , SCC3 b) MOV #% , SCS1 c) MOV #% , SCC2 d) MOV #% , SCC3

Serial Communications Interface Module Slide #22 of 19 MC68HC908GP20 Training Tutorial Completion - SCI Uses and Features - SCI Configuration - SCI Transmission - SCI Reception