Señal RS232. d. codevilla v1.0



Similar documents
Using the HC08 SCI Module

Section 17. UART HIGHLIGHTS UART. This section of the manual contains the following major topics:

USART and Asynchronous Communication

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring ) Serial Interfacing. By Dr.

Parallel IO. Serial IO. Parallel vs. Serial IO. simplex vs half-duplex vs full-duplex. Wires: Full Duplex. Wires: Simplex, Half-duplex.

UART IP Core Specification. Author: Jacob Gorban

INFORMATICA INDUSTRIALE

INFORMATICA INDUSTRIALE

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

Design and Implementation of Home Monitoring System Using RF Technology

Using Xbee in Serial Communication

Serial Communications

Serial Communications

Using XGATE to Implement LIN Communication on HCS12X Daniel Malik 8/16-Bit Products Division East Kilbride, Scotland

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

SC16IS740/750/760. Single UART with I 2 C-bus/SPI interface, 64 bytes of transmit and receive FIFOs, IrDA SIR built-in support

a8251 Features General Description Programmable Communications Interface

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Technical Data Sheet UM-005. UM005-doc In reference to UM005-c-01.04

USB TO SERIAL ADAPTER

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

SC16C652B. 1. General description. 2. Features. 5 V, 3.3 V and 2.5 V dual UART, 5 Mbit/s (max.) with 32-byte FIFOs and infrared (IrDA) encoder/decoder

Single channel data transceiver module WIZ2-434

LIN (Local Interconnect Network):

Serial Communications (Chapter 10) RS232, SPI, I2C

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

2.1 CAN Bit Structure The Nominal Bit Rate of the network is uniform throughout the network and is given by:

PFB366 Profibus-DP Gateway User Manual

Software User Guide UG-461

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

RS-422/485 Multiport Serial PCI Card. RS-422/485 Multiport Serial PCI Card Installation Guide

VMR6512 Hi-Fi Audio FM Transmitter Module

DECT Module UM-9802 Datasheet

Hello, and welcome to this presentation of the STM32 SDMMC controller module. It covers the main features of the controller which is used to connect

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

Local Interconnect Network Training. Local Interconnect Network Training. Overview

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

A RF18 Remote control receiver MODULE

Web Site: Forums: forums.parallax.com Sales: Technical:

RS-485 Protocol Manual

SC16C754B. 1. General description. 2. Features. 5 V, 3.3 V and 2.5 V quad UART, 5 Mbit/s (max.) with 64-byte FIFOs

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

RS232C < - > RS485 CONVERTER S MANUAL. Model: LD15U. Phone: / 97 / 98 (M)

What is Easy-Radio? Devices Covered. Frequency Hopping Transceiver. Where x00 denotes frequency of operation. E.g. 400 = 433MHz

Technical Support Bulletin Nr.18 Modbus Tips

2.8.3 / (Z80 Serial I/O)

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

2-port RS-422 / 485 Universal PCI

Clocking. Clocking in the Digital Network

SR450 RECEIVER OPERATING INSTRUCTIONS

Process Control and Automation using Modbus Protocol

Programing the Microprocessor in C Microprocessor System Design and Interfacing ECE 362

2. Terminal arrangement. Default (PV display) (SV display) Communication protocol selection Selects the Communication protocol. Modbus ASCII mode:

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

Siemens DECT Engine MD32. Product Description. Information and Communication Products

Embedded Systems Design Course Applying the mbed microcontroller

INTERNATIONAL TELECOMMUNICATION UNION

Microcomputer Protocol Implementation at Local Interconnect Network Georgi Krastev

Part Number Description Packages available

USB2.0 <=> I2C V4.4. Konverter Kabel und Box mit Galvanischetrennung

ULC Technology: High-performance gate array package using multiple metal layer CMOS technology featuring sub-micron channel lengths (0.

Serial Communications / Protocol in AirTest Products

PrimeCell Synchronous Serial Port (PL022) ARM. Technical Reference Manual. Revision: r1p4

AVR315: Using the TWI Module as I2C Master. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

DCP COMMAND. bringing two-way communications to your DCPs

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

isco Connecting Routers Back to Back Through the AUX P

DS1621 Digital Thermometer and Thermostat

DS1621 Digital Thermometer and Thermostat

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Freescale Semiconductor, I

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

AVR32100: Using the AVR32 USART. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

DATA SHEET. SJA1000 Stand-alone CAN controller INTEGRATED CIRCUITS

16-Port RS232 to USB2.0 High Speed Multi Serial Adapter (w/ Metal Case) Installation Guide

AVR Timer/Counter. Prof Prabhat Ranjan DA-IICT, Gandhinagar

FPGA INTEGRATION MANUAL SATURN-SIL 2 MODULES. Dictionary Code. Edition 01. Revision 00. Number of pages 18

LOW COST GSM MODEM. Description. Part Number

RENESAS TECHNICAL UPDATE

Managing High-Speed Clocks

SRX 210 Services Gateway T1 Interface Configuration

The following document contains information on Cypress products.

Wireless Home Security System

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

INTERNATIONAL TELECOMMUNICATION UNION. SERIES V: DATA COMMUNICATION OVER THE TELEPHONE NETWORK Interfaces and voiceband modems

MDM192 MULTI-DROPS DIGITAL MODEM FOR PRIVATE LINE. USER GUIDE Document reference :

Bluetooth Audio Data Transfer between Bluetooth chipset (PMB6752&PMB6625) and TriCore Host TC1920

Repeater Mil-Std-1553B Datasheet

RockBLOCK+ Developer guide

SPA-Bus Communication Protocol V2.5. Technical description

User Manuals. Connection to Siemens S5 PU (AS511) Part Number: Version: 2. Date:

Consult protocol, Nissan Technical egroup, Issue 6

AN_2901CE_001 JULY 2005

Section 29. Real-Time Clock and Calendar (RTCC)

RPDO 1 TPDO 1 TPDO 5 TPDO 6 TPDO 7 TPDO 8

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM100(1328)

How To Set Up A Modem (Marc) Model (Marc) Model 2 (Marr) Model 1 (Marm) Model 4 (Mariar) Model 8 (Marp) Model 6 (Mar

Bluetooth to Serial Adapter

Transcription:

Señal RS232

SCI Señal desde y hacia el µc BREAK: Caracter con todos 0 lógicos IDLE: caracter con todos 1 lógicos

SCI estructura simplificada Se terminó de transferir un caracter al shift register TDRE SCIxD TC 11 bit Shift register 11 bit Shift register TX RX RDRF Llegó un nuevo caracter

SCI estructura del transmisor

SCI estructura del receptor

SCI registros RX EDGe Interrupt Generation (1: habilitado) SCIxBDH Line BreaK Detection Interrupt Enable (1: habilitado) SCIxBDL SBR12.. SBR0 -> 0 a 8191 Divisor para obtener Baud Rate (0: desactiva Baud generator) Baud Rate = BUSCLK / (16 * BR)

SCI registros SCISWAI 1: SCI Stops In WAIt mode M 1: 9 bits (start + 9 data bits + stop) ILT Idle Line Type 0: Idle count after start bit 1: Idle count after stop bit LOOPS 1: Enable RSRC Receiver SouRCe Select (si LOOPS= 1) 0: Loopback 1: Single Wire (TX) WAKE 0: IDLE 1: Address Mark PE Parity Enable (MSb) 1: Enable PT Parity Type 0: Even 1: Odd

SCI registros TCIE (TC) Transmission Complete Interrupt Enable 1: Enable ILIE (IDLE) Idle Line Interrupt Enable 1: Enable RE Receiver Enable 1: Enable SBK Send BreaK 1: Envía Break 0: Operación normal TIE (TE) Transmit Interrupt Enable 1: Enable RIE (RF) Receiver Interrupt Enable 1: Enable TE Transmitter Enable 1: Enable RWU Receiver Wake-Up 1: standby 0: normal

SCI registros R8 Noveno bit recibido (si M = 1, dato 9bit) T8 Noveno bit a transmitir (si M = 1, dato 9bit) TXDIR TX pin DIRection in single-wire mode 0: input 1: output TXINV TX data INVersion 0: normal 1: invertido Framing Error Interrupt Enable Parity Error Interrupt Enable OverRun Error Interrupt Enable Noise Error Interrupt Enable

SCI registros TDRE Transmit Data Register Empty Flag 1: Buffer TX vacío 0: Buffer TX lleno Para limpiar este flag, leer SCIxS1 y escribir SCIxD IDLE Idle Line Flag 1: línea Idle Para limpiar este flag: leer SCIxS1 y leer SCIxD Noise Flag Framing Error flag Receiver OverRun flag TC Transmission Complete flag 1: Transmisor ocioso 0: Transmisor activo Para limpiar este flag: leer SCIxS1 y escribir SCIxD RDRF Receive Data Register Full flag 1: Llegó un nuevo byte a SCIxD Para limpiar este flag: leer SCIxS1 y leer SCIxD Parity error Flag

SCI registros LBKDIF LIN Break Detect Interrupt Flag 0: No se detectó caracter LIN break Para limpiar este flag, escribir 1 en este bit RXEDGIF RX Pin active EDGe Interrupt Flag 0: No se flanco activo en RX Para limpiar este flag, escribir 1 en este bit RXINV RX data INVersion 0: normal 1: invertido BRK13 Break character generation length 1: 13 bits (14 si M = 1) 0: 10 bits (11 si M = 1) LBKDE Lin BreaK Detection Enabled 1: Habilitada RWUID Rx Wake-Up Idle Detection 1: El caracter IDLE que produce Wake-Up setea bit IDLE RAF Receiver Active Flag 1: Receptor activo

SCI registros

SCI ejemplo SCI1C1 = 0x00; /* Loop mode disabled, disable SCI, Tx output not inverted, 8-bit characters, idle line wakeup, disable parity bit */ SCI1C2 = 0x00101100 ; /* Enable SCI receive interrupts, Enable Tx & Rx */ SCI1C3 = 0x00; /* Disable all error interrupts */ ***************************************************************** * BUSCLK 4 MHz * * Baud Rate = -------------------- = ---------- = 9600 bps * * [SBR12:SBR0] x 16 26 x 16 * ***************************************************************** /* For this example, the internal bus clock is used, SCI1BDH = 0x00; // SCI1BDH [SBR12:SBR8] + SCI1BDL [SBR7:SBR0] SCI1BDL = 0x1A; // SCI1BDH and SCI1BHL control the 13 bit // prescale divisor for the SCI module baud rate.... interrupt 17 void SCI_RX_isr (void) { SCI1S1; // Acknowledge SCI Receiver Full Flag dato_recibido = SCID; while (SCI1S1_TDRE == 0); // Wait for the transmitter to be empty SCI1D = dato_mandar; //Manda dato }

SCI ejemplo unsigned char buffer[10]; unsigned char bp = 0; unsigned char proc_mensaje = 0; SCIBD = 52; // divisor = 52 baud = 8MHz / 52 / 16 = 9615,38 9600 SCIC1 = 0b00000010; // paridad habilitada paridad par SCIC2 = 0b00101100; // habilita interrupción de recepción, transmisor y receptor SCIC3 = 0; for(;;) { if (proc_mensaje == 1) { while (SCIS1_TC!= 1); // espera TC = 1 SCID = 'A'; //envía 65 while (SCIS1_TC!= 1); // espera TC = 1 SCID = 0x42; //envía 66 } }.. interrupt 17 void rx_int() { SCIS1; // Limpia flag RDRF Buffer[bp++] = SCID; if (bp == 11) { bp = 0; proc_mensaje = 1; } }

The receiver samples the RxD pin at the RT clock rate. The RT clock is an internal signal with a frequency 16 times the baud rate. To adjust for baud rate mismatch, the RT clock is resynchronized at the following times (see Figure 9-6): After every start bit After the receiver detects a data bit change from logic 1 to logic 0 (after the majority of data bit samples at RT8, RT9, and RT10 returns a valid logic 1 and the majority of the next RT8, RT9, and RT10 samples returns a valid logic 0) To locate the start bit, data recovery logic does an asynchronous search for a logic 0 preceded by three logic 1s. When the falling edge of a possible start bit occurs, the RT clock begins to count to 16.