MSP430 Teaching Materials

Size: px
Start display at page:

Download "MSP430 Teaching Materials"

Transcription

1 MSP430 Teaching Materials Capítulo 7 Comunicaciones Introducción Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department Contents Introduction Communications system model Transmission mode Serial communications Synchronous and asynchronous serial communications Peripheral Interface Serial (SPI) protocol I 2 C (Inter-Integrated Circuit) protocol MSP430 communications interfaces Quiz 2 1

2 15/01/2013 Introduction Una característica importante de los sistemas basados en microprocesadores modernos es su capacidad de comunicación, es decir, su capacidad para intercambiar información con otros sistemas en el medio ambiente circundante; A bajo nivel, las interfaces de comunicación se utilizan para descargar una actualización de firmware o para establecer las configuraciones locales (por ejemplo, características encender o apagar), entre otras tareas; En un nivel superior, interfaces de comunicación se utilizan para intercambiar información en aplicaciones distribuidas. 3 Communications system model (1/2) Dispositivos de comunicación digital: Transmisor: Tiene la tarea de poner la información en el formato adecuado para su posterior transmisión; Receptor: Es el encargado de recoger el mensaje que se ha enviado y extraer la información original; Medio de comunicación: El medio físico a través del cual fluye la información y se implementa habitualmente como: Par de cable trenzado; Cable de fibra óptica; Transmisión por radiofrecuencia. 4 2

3 Communications system model (2/2) Dispositivos de un sistema de comunicación digital: DTE: Data Terminal Equipment; DCE: Data Communications Equipment. Transmitter Receiver DTE DCE Transmission medium DCE DTE Receiver Transmitter 5 Transmission mode (1/5) La comunicaciones entre dispositivos digitales pueden ser divididos en dos tiempos: Comunicaciones paralelas; Comunicaciones seriales. Comunicaciones paralelas: El medio físico de transmisión tiene líneas independientes de señal en un número igual a los bits de la palabra digital transmitida; La información transmitida en cualquier instante dado, es la palabra de datos formada por los niveles lógicos en las líneas de señal diferentes. 6 3

4 Transmission mode (2/5) Comunicaciones paralelas: Ejemplo: Carácter ASCII W en una transmisión paralela. Flujo de la información 7 Transmission mode (3/5) Comunicación serial: El medio físico de transmisión sólo necesita una línea de señal; La información transmitida es proporcionada por el transmisor como una secuencia de bits, enviado a la razón establecida entre el transmisor y el receptor; Se necesita información adicional para permitir la sincronización entre el receptor y el transmisor: Bit de inicio: se añade al inicio de la información transmitida, de modo que el receptor puede identificar el inicio de una nueva transmisión; Bit de paro(s): Añadido a la final de la información transmitida para indicar que el valor de los datos se ha completado. 8 4

5 Transmission mode (4/5) Comunicación serial: Ejemplo: Carácter ASCII W de transmisión serial: 9 Transmission mode (5/5) Ventajas y desventajas de las comunicaciones seriales y paralelas: Característica Paralela Serial Bus line One line per bit One line Sequence Transmission rate All bits of one word simultaneously High Sequence of bits Low Bus length Short distances Short and long distances Cost High Low Critical characteristics Synchronisation between the different bits is demanding Asynchronous transmission needs start and stop bits Synchronous transmission needs some other synchronisation 10 5

6 Serial communications (1/3) El bit de inicio identifica el inicio de una transferencia de datos y se genera una transición de alto a bajo en el bus; Tras el bit de inicio son los bits de datos. En este ejemplo, el código ASCII para la transferencia de texto utiliza siete bits de datos; La comprobación de errores de bit (bit de paridad) se envía después de los bits de datos; Para finalizar la transmisión, uno o dos bits de parada se emiten; A partir de siete bits de datos, el mensaje completo puede utilizar uno o dos bits de paro. Si se usan ocho bits de datos, un bit de paro sólo está disponible para la transmisión. 11 Serial communications (2/3) Bit de paridad: Se utiliza para verificar la integridad de la información transmitida; El bit se agrega por el transmisor e indica si la suma total de los números "1" en el mensaje de datos es par o impar; Las transmisiones pueden ser configurados para paridad par o impar. 12 6

7 Serial communications (3/3) Ejemplo de baud rate: La transmisión de la W : El caracter usa siete bits de datos; Cuatro bits son usados para control, haciendo un total de 11 bits. Esto corresponde a 11 bauds; Si los caracteres son transmitidos a una razón de 10 caracteres por segundo, el baud rate sería: 10x11 = 1100 baud/s. 13 Synchronous and asynchronous serial communications (1/2) Las comunicaciones seriales pueden ser: Asíncrono: donde la tasa de transmisión (baud rate) está fijado por el transmisor y el receptor funcionan en la mismo baud rate de transmisión, utilizando el bit de inicio de transmisión para sincronizar el inicio de un nuevo mensaje; Síncrono: donde hay una señal de sincronización de reloj independiente conectado entre el receptor y el transmisor. Síncrono: donde hay una señal de sincronización de reloj independiente conectado entre el receptor y el transmisor. Comunicaciones síncronas: Normalmente una unidad asume el papel de maestro y uno o más de las otras unidades tomar el papel de esclavos; La señal de reloj generada por el maestro es utilizado por las unidades esclavas para transferir datos en /hacia los registros TX y RX; Es posible que un dispositivo para transmita y reciba simultáneamente. 14 7

8 Synchronous and asynchronous serial communications (2/2) Comunicaciones asíncronas: Caracterizada por la ausencia de cualquier señal de reloj de sincronización entre las unidades; La transmisión en este modo no permite la transmisión y recepción simultáneas, es decir, cuando un dispositivo transmite los otros dispositivos sólo escuchan. 15 Serial Peripheral Interface (SPI) protocol (1/2) El bus de Interfaz Serial de Periféricos (Serial Peripheral Interface SPI) es un estándar para la comunicación serial síncrona. Desarrollado por Motorola; Funciona en mod full duplex; Relación Maestro / esclavo; Las comunicaciones son Siempre iniciadas por el maestro. Bajo costo. 16 8

9 Peripheral Interface Serial (SPI) protocol (2/2) Soporta un solo maestro; Puede soportar más de un esclavo; A corta distancia entre dispositivos, por ejemplo, en una placa de circuito impreso (PCB); Se observa especial atención en la polaridad y la fase de la señal de reloj; El maestro envía los datos en un filo de reloj y lee los datos en el otro filo. Por lo tanto, se puede enviar / recibir al mismo tiempo. 17 I 2 C (Inter-Integrated Circuit) protocol (1/3) Bus serial síncrono de computadora multi maestro; Inventado por Philips semiconductores; Desarrollado con el objetivo principal de establecer vínculos entre los circuitos integrados y para conectar periféricos de baja velocidad; Basado en un dos líneas bidireccionales con compuertas de colector abierto conectadas con resistores: SDA: Serial Data; SCL: Serial clock. Los voltajes típicos usados son de +5.0 V o +3.3 V, sin embargo otros voltajes son posibles. 18 9

10 I 2 C (Inter-Integrated Circuit) protocol (2/3) Las comunicaciones son siempre iniciados y completados por el maestro, el cual es responsable de generar la señal de reloj; En aplicaciones más complejas, I2C puede funcionar en modo de multi maestro; La selección del esclavo por el maestro es realizado usando la dirección de 7 bits del esclavo destino; El maestro (en modo de transmisión) envía: Bit de inicio; La dirección de 7-bits del esclavo con el que se desea comunicar; Con un bit se determina Con un solo bit representa si desea escribir (0) o para leer (1) desde el esclavo; El esclavo de destino responde con su dirección. 19 I 2 C (Inter-Integrated Circuit) protocol (3/3) Ejemplo de un sistema de comunicación I 2 C: 20 10

11 MSP430 communications interfaces (1/2) Equipado con tres interfaces seriales: USART (Universal Synchronous/Asynchronous Receiver/Transmitter): UART mode; SPI mode; I 2 C (on F15x/ F16x only). USCI (Universal Serial Communication Interface): UART with Lin/IrDA support; SPI (Master/Slave, 3 and 4 wire modes); I 2 C (Master/Slave, up to 400 khz). USI (Universal Serial Interface): SPI (Master/Slave, 3 & 4 wire mode); I 2 C (Master/Slave, up to 400 khz). 21 MSP430 communications interfaces (2/2) Comparación entre los módulos de comunicaciones USART USCI USI UART: - Only one modulator - n/a - n/a - n/a SPI: - Only one SPI available - Master and Slave Modes - 3 and 4 Wire Modes I 2 C: (on 15x/ 16x only) - Master and Slave Modes - up to 400kbps UART: - Two modulators support n/16 timings - Auto baud rate detection - IrDA encoder & decoder - Simultaneous USCI_A and USCI_B (2 channels) SPI: - Two SPI (one on each USCI_A and USCI_B) - Master and Slave Modes - 3 and 4 Wire Modes I 2 C: - Simplified interrupt usage - Master and Slave Modes - up to 400kbps SPI: - Only one SPI available - Master and Slave Modes I 2 C: - SW state machine needed - Master and Slave Modes 22 11

12 Quiz (1/6) 1. In the parallel communication transmission mode: (a) The data is transferred more slowly; (b) Each bit of the data has its own line; (c) All of above; (d) None of above. 2. In the serial communication transmission mode: (a) The data bits arrive sequentially; (b) The digital data is transferred faster; (c) All of above; (d) None of above. 23 Quiz (2/6) 3. The serial transmission mode is the most popular digital data communications method because: (a) Higher bit transfer rates are achieved; (b) It is cheaper to implement than parallel transmission mode; (c) All of above; (d) None of above. 4. In asynchronous serial transmission communications, the frame must include: (a) Start and stop bits. (b) Parity bit. (c) All of above; (d) None of above

13 Quiz (3/6) 5. Even parity means that an additional bit is: (a) Added to the data to make the sum of the 1 bits even; (b) Subtracted from the data to make the sum of the 1 bits even; (c) All of above; (d) None of above. 6. A USART is used: (a) Only for asynchronous transmissions; (b) Only for synchronous transmissions; (c) In parallel transmission communications; (d) In serial transmission communications. 25 Quiz (4/6) 7. Synchronous communication performed between two USART requires: (a) A common clock either in the transmitter or the receiver; (b) No common clock; (c) An independent clock in the transmitter; (d) An independent clock in the receiver. 8. Asynchronous communication between two USARTs requires: (a) A common clock in the transmitter and the receiver; (b) An independent clock in the transmitter and the receiver; (c) A common clock in the transmitter or the receiver; (d) An independent clock in the transmitter or the receiver

14 Quiz (5/6) 9. I 2 C is a bus: (a) Synchronous with a master and a slave where both can be the transmitter or receiver; (b) Where the master generates the clock; (c) All of above; (d) None of above. 27 Answers: Quiz (6/6) 1. (b) Each bit of the data has its own line. 2. (a) The data bits arrive sequentially. 3. (c) All of above. 4. (c) All of above. 5. (a) Added to the data to make the sum of the 1 bits even. 6. (d) In serial transmission communications. 7. (a) A common clock either in the transmitter or the receiver. 8. (b) An independent clock in the transmitter and the receiver. 9. (d) None of above

15 29 MSP430 Teaching Materials Capítulo 7 Comunicaciones Módulo USART Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department 15

16 Contents MSP430 communications interfaces USART module introduction USART operation: UART mode USART operation: SPI mode USART registers (UART and SPI modes) Quiz 31 USART module introduction (1/2) The USART (Universal Synchronous/Asynchronous Receiver/Transmitter) este módulo esta basado para comunicaciones seriales soportando comunicaciones (RS232) y asíncronas (SPI). El módulo USART esta disponible en los dispositivos 4xx: MSP430x42x y MSP430x43x: un módulo; MSP430x44x y MSP430FG461x: Dos módulos

17 USART module introduction (2/2) El soporte del USART: Modos de operación baja potencia (con auto inicio); Modo UART o SPI (I 2 C solo en F15x/ F16x); Buffer doble TX/RX; Generador de baud rate; Habilita DMA; Detección de errores. 33 USART operation: UART mode (1/13) Transmite y recibe caracteres de forma asíncrona; La sincronización de cada carácter se basa en la selección de baud rate seleccionada; El transmisor y el receptor usa la misma frecuencia de reloj que llevan el mismo baud rate; 34 17

18 USART operation: UART mode (2/13) Proceso de Inicialización / reconfiguración recomendada: Poner SWRST (BIS.B #SWRST,&UxCTL); Inicializa todos los registros del USART con SWRST = 1 (incluyendo UxCTL); Habilita el modo USART vía los SFRs Mex (URXEx y/o UTXEx); Limpia por software SWRST (BIC.B #SWRST,&UxCTL); Habilita las interrupciones (opcional) vía los SFRs Iex (URXIEx y/o UTXIEx); 35 USART operation: UART mode (3/13) El formato del carácter se especifica como sigue: Bit de inicio; Siete u ocho bits de datos; Bit de paridad impar/par; Bit de dirección (modo de bit de dirección); Uno o dos bits de paro

19 USART operation: UART mode (6/13) Detección de error automático: El supresor de Glitch previene que la USART se inicie accidentalmente; Cualquier pulso corto en UCxRXC menor al tiempo de glitch (aproximadamente 30 ns). Error de trama FE: Se activa si el bit de paro es omitido de la trama recibida; Error de paridad PE: Se pone si la paridad es diferente de la trama recibida; Error de desbordamiento OE: Se pone si UxRXBUF es sobrescrita; Condición de ruptura BRK: Se pone si todos los bits en la trama recibida =0; 37 USART operation: UART mode (7/13) Habilitado el receptor de la USART se activa el bit URXEx: El buffer del datos recibidos, UxRXBUF, contiene el carácter movido del registro de corrimiento RX después de que el carácter ha sido recibido

20 USART operation: UART mode (8/13) Habilitado el transmisor de la USART con el bit UTXEx: La transmisión es iniciado por escribir el dato a UxTXBUF; El valor del dato se mueve al registro de corrimiento del transmisor en el siguiente pulso de reloj después que éste se vacía. 39 USART operation: UART mode (9/13) Generación del Baud rate del USART : El baud rate estándar se genera con generadores de frecuencia no convencionales. El módulo USART utiliza un pre-escalador / divisor y un modulador; El bit de temporización (BITCLK) de este módulo se permite que sea más pequeño que 1/3 de la señal de reloj, BRCLK

21 USART operation: UART mode (10/13) Generación del Baud rate del USART(continuación): Bits de temporización: Implementación en dos etapas: Par el divisor BRCLK, el factor N esta dado por: BRCLK N = baudrate Su parte entera es la primera fase del bit de tiempo; Su parte fraccionaria de este factor es el modulador; La nueva definición de N esta dado por: N = UxBR n m i n i = 0 41 USART operation: UART mode (11/13) Interrupción de la USART: Un vector de interrupciones para la transmisión y un vector para la recepción: Interrupción de la UART por transmisión: La bandera de interrupción UTXIFGx se pone el transmisor para indicar que UxTXBUF está listo para aceptar otro carácter; Una petición de interrupción también se genera si UTXIEx y GIE se activan; El bit UTXIFGx se reinicia automáticamente si la solicitud de interrupción es atendida o si un carácter se escribe en UxTXBUF

22 USART operation: UART mode (12/13) Interrupción de la USART(continuación): Interrupción de la UART por recepción: La bandera de interrupción URXIFGx se pone cada vez que se recibe un carácter y se cargan en UxRXBUF; Una petición de interrupción también se genera si URXIEx y GIE se activan; URXIFGx y URXIEx se restablecen por una señal de reinicio del sistema o cuando SWRST PUC = 1; URXIFGx se reinicia automáticamente si la interrupción pendiente es atendida (cuando URXSE = 0) o cuando se lee UxRXBUF. 43 USART operation: UART mode (13/13) La facilidad de la detección del filo de inicio del receptor (URXSE bit). Deberá usarse cuando: BRCLK es la fuente del DCO; DCO esta apagado debido al modo de operación de bajo consumo

23 Ejemplo de comunicaciones seriales //*************************************************************** // MSP430G2xx3 Demo - USCI_A0, 9600 UART Echo ISR, DCO SMCLK // // Description: Echo a received character, RX ISR used. Normal mode is LPM0. // USCI_A0 RX interrupt triggers TX Echo. // Baud rate divider with 1MHz = 1MHz/9600 = ~104.2 // ACLK = n/a, MCLK = SMCLK = CALxxx_1MHZ = 1MHz // // MSP430G2xx3 // // / \ XIN - // // -- RST XOUT - // // P1.2/UCA0TXD > // N1 // P1.1/UCA0RXD < // // D. Dang // Texas Instruments Inc. // February 2011 // Built with CCS Version and IAR Embedded Workbench Version: 5.10 //************************************************************* 45 Ejemplo de comunicaciones seriales #include "msp430g2553.h" void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_1MHZ; // Set DCO DCOCTL = CALDCO_1MHZ; P1SEL = BIT1 + BIT2 ; // P1.1 = RXD, P1.2=TXD P1SEL2 = BIT1 + BIT2 ; // P1.1 = RXD, P1.2=TXD UCA0CTL1 = UCSSEL_2; // SMCLK UCA0BR0 = 104; // 1MHz 9600 UCA0BR1 = 0; // 1MHz 9600 UCA0MCTL = UCBRS0; // Modulation UCBRSx = 1 UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine** IE2 = UCA0RXIE; // Enable USCI_A0 RX interrupt _BIS_SR(GIE); while(1); } // Echo back RXed character, confirm TX buffer is ready first #pragma vector=usciab0rx_vector interrupt void USCI0RX_ISR(void) { while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready? UCA0TXBUF = UCA0RXBUF; // TX -> RXed character } 46 23

24 USART operation: SPI mode (1/8) Serial data transmitted and received by multiple devices using a shared clock provided by the master; Three or four signals are used for SPI data exchange: SIMO: Slave In, Master Out; SOMI Slave Out, Master In; UCLK USART SPI clock; STE slave transmit enable (controlled by the master). 47 USART operation: SPI mode (2/8) USART initialization/re-configuration process: Set SWRST (BIS.B #SWRST,&UxCTL); Initialize all USART registers with SWRST = 1 (including UxCTL); Enable USART module via the MEx SFRs (URXEx and/or UTXEx); Clear SWRST via software (BIC.B #SWRST,&UxCTL); Enable interrupts (optional) via the IEx SFRs (URXIEx and/or UTXIEx); 48 24

25 USART operation: SPI mode (3/8) Define mode: Master or Slave; Enable SPI transmit/receive, USPIEx; State diagram of transmit enable for SPI master mode: 49 USART operation: SPI mode (4/8) Enable SPI transmit/receive, USPIEx; State diagram of transmit enable for SPI slave mode: 50 25

26 USART operation: SPI mode (5/8) Enable SPI transmit/receive, USPIEx; State diagram of receive enable for SPI master mode: 51 USART operation: SPI mode (6/8) Enable SPI transmit/receive, USPIEx; State diagram of receive enable for SPI slave mode: 52 26

27 USART operation: SPI mode (7/8) Define serial clock control: UCLK is provided by the master on the SPI bus. MM = 1: BITCLK is provided by the USART baud rate generator on the UCLK; MM = 0: USART clock is provided on the UCLK pin by the master (baud rate generator disable); The SPI receiver and transmitter operate in parallel and use the same clock source for data transfer. Define serial clock polarity (CKPL bit) and phase (CKPH bit); 53 USART operation: SPI mode (8/8) USART interrupts: One interrupt vector for transmission and one interrupt vector for reception: UART transmit interrupt operation: UTXIFGx interrupt flag is set by the transmitter to indicate that UxTXBUF is ready to accept another character; An interrupt request is generated if UTXIEx and GIE are also set; UTXIFGx is automatically reset if the interrupt request is serviced or if a character is written to UxTXBUF

28 USART registers (UART and SPI modes) (1/11) In this section, the register bit definitions are provided for both USART peripheral interfaces: Asynchronous UART mode; Synchronous SPI mode. The registers common to both modes are described simultaneously, taking into account that some of them are represented by the same mnemonic, only differentiated by the register number ( UART for UART mode and SPI for SPI mode); The registers used exclusively for one mode are presented separately. 55 USART registers (UART and SPI modes) (2/11) UxCTL, USART Control Register Mode UART PENA PEV SPB CHAR LISTEN SYNC MM SWRST SPI Unused Unused I2C (1) CHAR LISTEN SYNC MM SWRST Bit UART mode description SPI mode description 7 PENA Parity enable when PENA = 1 Parity bit is generated (UTXDx) and expected (URXDx). 6 PEV Parity select: PEV = 0 Odd parity PEV = 1 Even parity 5 SPB Stop bit select: SPB = 0 One stop bit SPB = 1 Two stop bits 4 CHAR Character length: CHAR = 0 7-bit data CHAR = 1 8-bit data 3 LISTEN Listen enable when LISTEN = 1. The transmit signal is internally fed back to the receiver. 2 SYNC Synchronous mode enable: SYNC = 0 UART mode SYNC = 1 SPI Mode 1 MM Multiprocessor mode select MM = 0 Idle-line multiprocessor protocol MM = 1 Address-bit multiprocessor protocol 0 SWRST Software reset enable: SWRST = 0 Disabled. USART reset released for operation SWRST = 1 Enabled. USART logic held in reset state U I C L S M S Unused Unused I 2 C or SPI mode select when SYNC = 1. I 2 C 2= 0 SPI mode I 2 C = 1 I 2 C mode As UART mode As UART mode As UART mode N C Master mode: MM M= 0 USART is slave MM = 1 USART is master As UART mode W R S T 56 28

29 USART registers (UART and SPI modes) (3/11) UxTCTL, USART Transmit Control Register Mode UART Unused CKPL SSELx URXSE TXWAKE Unused TXEPT SPI CKPH CKPL SSELx Unused Unused STC TXEPT Bit UART mode description SPI mode description 7 Unused CKPH 6 CKPL Clock polarity select: CKPL = 0 UCLKI = UCLK CKPL = 1 UCLKI = inverted UCLK 5-4 SSELx BRCLK source clock: SSEL1 SSEL0 = 00 UCLKI SSEL1 SSEL0 = 01 ACLK SSEL1 SSEL0 = 10 SMCLK SSEL1 SSEL0 = 11 SMCLK CKPL SSELx 3 URXSE UART receive start-edge enable when URXSE = 1 Unused 2 TXWAKE Transmitter wake: TXWAKE = 0 Next frame transmitted is data TXWAKE = 1 Next frame transmitted is an address Unused Clock polarity select: CKPL = 0 UCLKI = The inactive state is low. CKPL = 1 UCLKI = The inactive state is high. BRCLK source clock: SSEL1 SSEL0 = 00 External UCLK (slave mode only) SSEL1 SSEL0 = 01 ACLK (master mode only) SSEL1 SSEL0 = 10 SMCLK (master mode only) SSEL1 SSEL0 = 11 SMCLK (master mode only) 1 Unused STC Slave transmit control: STC = 0 4-pin SPI mode: STE enabled. STC = 1 3-pin SPI mode: STE disabled. 0 TXEPT Transmitter empty flag: TXEPT = 0 UART is transmitting data and/or data is waiting in UxTXBUF TXEPT = 1 Transmitter shift register and UxTXBUF are empty or SWRST=1 TXEPT Transmitter empty flag: TXEPT = 0 UART is transmitting data and/or data is waiting in UxTXBUF TXEPT = 1 UxTXBUF and TX shift register are empty 57 USART registers (UART and SPI modes) (4/11) UxRCTL, USART Receive Control Register Mode UART FE PE OE BRK URXEIE URXWIE RXWAKE RXERR SPI FE Unused OE Unused Unused Unused Unused Unused Bit UART mode description SPI mode description 7 FE Framing error flag: = 0 No error = 1 Character received with low stop bit Parity error flag: 6 PE = 0 No error = 1 Character received with parity error FE Master mode framing error flag: (MM = 1, STC = 0) = 0 No conflict detected = 1 Bus conflict (STE s negative edge) Unused 5 OE Overrun error flag: = 0 No error = 1 A character was transferred into UxRXBUF before the previous character was read. 4 BRK Break detect flag: = 0 No break condition = 1 Break condition occurred Receive erroneous-character interrupt-enable: 3 URXEIE = 0 Err. characters rejected = 1 Err. characters received Receive wake-up interrupt-enable: 2 URXWIE = 0 All received characters set IFG = 1 Received address characters set IFG Receive wake-up flag: 1 RXWAKE = 0 Received character is data = 1 Received character is an address Receive error flag: 0 RXERR = 0 No receive errors detected = 1 Receive error detected OE Unused Unused Unused Unused Unused As UART mode 58 29

30 USART registers (UART and SPI modes) (5/11) UxBR0, USART Baud Rate Control Register 0 Mode UART / SPI UxBR1, USART Baud Rate Control Register 1 Mode UART / SPI Bit UART mode description SPI mode description 7 UxBRx The valid baud-rate control range is 3 UxBR < 0FFFFh, where UxBR = {UxBR1+UxBR0}. Unpredictable receive/transmit timing occurs if UxBR < 3. UxBRx The baud-rate generator uses the content of {UxBR1+UxBR0} to set the baud rate. Unpredictable SPI operation occurs if UxBR < USART registers (UART and SPI modes) (6/11) UxMCTL, USART Modulation Control Register Mode UART / SPI m7 m6 m5 m4 m3 m2 m1 m0 Bit UART mode description SPI mode description 7 UxMCTL x Selects the modulation for BRCLK. UxMCTLx Not used in SPI mode and should be set to 00h. UxRXBUF, USART Receive Buffer Register Mode UART / SPI Bit UART mode description SPI mode description 7 UxRXBUFx The receive-data buffer is user accessible and contains the last received character from the receive shift register. Reading UxRXBUF resets the receiveerror bits, the RXWAKE bit, and URXIFGx. In 7-bit data mode, UxRXBUF is LSB justified and the MSB is always cleared. UxRXBUFx The receive-data buffer is user accessible and contains the last received character from the receive shift register. Reading UxRXBUF resets the OE bit and URXIFGx flag. In 7-bit data mode, UxRXBUF is LSB justified and the MSB is always cleared

31 USART registers (UART and SPI modes) (7/11) UxTXBUF, USART Transmit Buffer Register Mode UART / SPI Bit UART mode description SPI mode description 7 UxTXBUFx The transmit data buffer is user accessible and holds the data waiting to be moved into the transmit shift register and transmitted on UTXDx. Writing to the transmit data buffer clears UTXIFGx. The MSB of UxTXBUF is not used for 7-bit data and is cleared. UxTXBUFx The transmit data buffer is user accessible and contains current data to be transmitted. When seven-bit character-length is used, the data should be MSB justified before being moved into UxTXBUF. Data is transmitted MSB first. Writing to UxTXBUF clears UTXIFGx. 61 USART registers (UART and SPI modes) (8/11) ME1, Module Enable Register 1 Mode UART UTXE0 URXE0 SPI USPIE0 Bit UART mode description SPI mode description 7 UTXE0 USART0 transmit enable: UTXE0 = 0 Module not enabled UTXE0 = 1 Module enabled 6 URXE0 USART0 receive enable: URXE0 = 0 Module not enabled URXE0 = 1 Module enabled ME2, Module Enable Register 2 USPIE0 USART0 SPI enable: USPIE0 = 0 Module not enabled USPIE0 = 1 Module enabled Mode UART UTXE1 URXE1 SPI USPIE1 Bit UART mode description SPI mode description 5 UTXE1 USART1 transmit enable: UTXE1 = 0 Module not enabled UTXE1 = 1 Module enabled 4 URXE1 USART1 receive enable: URXE1 = 0 Module not enabled URXE1 = 1 Module enabled USPIE1 USART1 SPI enable: USPIE1 = 0 Module not enabled USPIE1 = 1 Module enabled 62 31

32 USART registers (UART and SPI modes) (9/11) IE1, Interrupt Enable Register 1 Mode UART / SPI UTXIE0 URXIE0 Bit UART mode description SPI mode description 7 UTXIE0 USART0 UTXIFG0 transmit interrupt enable: UTXIE0 = 0 Interrupt not enabled UTXIE0 = 1 Interrupt enabled 6 URXIE0 USART0 URXIFG0 receive interrupt enable: URXIE0 = 0 Interrupt not enabled URXIE0 = 1 Interrupt enabled IE2, Interrupt Enable Register 2 UTXIE0 URXIE0 As UART mode As UART mode Mode UART / SPI UTXIE1 URXIE1 Bit UART mode description SPI mode description 7 UTXIE1 USART1 UTXIFG1 transmit interrupt enable: UTXIE1 = 0 Interrupt not enabled UTXIE1 = 1 Interrupt enabled 6 URXIE1 USART1 URXIFG1 receive interrupt enable: URXIE1 = 0 Interrupt not enabled URXIE1 = 1 Interrupt enabled UTXIE1 URXIE1 As UART mode As UART mode 63 USART registers (UART and SPI modes) (10/11) IFG1, Interrupt Flag Register 1 Mode UART / SPI UTXIFG0 URXIFG0 Bit UART mode description SPI mode description 7 UTXIFG0 USART0 transmit interrupt flag. UTXIFG0 is set when U0TXBUF is empty. UTXIFG0 = 0 No interrupt pending UTXIFG0 = 1 Interrupt pending 6 URXIFG0 USART0 receive interrupt flag. URXIFG0 is set when U0RXBUF has received a complete character. URXIFG0 = 0 No interrupt pending URXIFG0 = 1 Interrupt pending UTXIFG0 URXIFG0 As UART mode As UART mode 64 32

33 USART registers (UART and SPI modes) (11/11) IFG2, Interrupt Flag Register 2 Mode UART / SPI UTXIFG1 URXIFG1 Bit UART mode description SPI mode description 7 UTXIFG1 USART1 transmit interrupt flag. UTXIFG1 is set when U1TXBUF is empty. UTXIFG1 = 0 No interrupt pending UTXIFG1 = 1 Interrupt pending 6 URXIFG1 USART1 receive interrupt flag. URXIFG1 is set when U1RXBUF has received a complete character. URXIFG1 = 0 No interrupt pending URXIFG1 = 1 Interrupt pending UTXIFG1 URXIFG1 As UART mode As UART mode 65 Quiz (1/5) 1. The USART supports the following communication modes: (a) UART and I 2 C; (b) SPI and I 2 C; (c) UART and SPI; (d) None of above. 2. The USART module has: (a) One SPI module; (b) Two SPI modules; (c) Three SPI modules; (d) None of the above

34 Quiz (2/5) 3. The USART: (a) Transmits and receives characters synchronously; (b) Transmits characters synchronously and receives characters asynchronously; (c) Transmits characters asynchronously and receives characters synchronously; (d) Transmits and receives characters asynchronously. 4. The USART character format is composed of: (a) {Start bit, Seven data bits, Parity bit, Stop bit}; (b) {Start bit, Eight data bits, Parity bit, Stop bits}; (c) {Start bit, Seven data bits, Parity bit, Address bit; Stop bit}; (d) Each of the above is possible. 67 Quiz (3/5) 5. The asynchronous communication formats available to the USART module are: (a) Idle-line multiprocessor communication protocol; (b) Address bit multiprocessor communication protocol; (c) All of above; (d) None of above. 6. The automatic error detection recognizes: (a) Framing, Parity, Receive Overrun and Break condition errors; (b) Framing and Parity errors; (c) Receive Overrun and Break condition errors; (d) Framing, Parity, Receive Overrun errors

35 Quiz (4/5) 7. The serial clock control in SPI mode when MM = 1 is provided by the: (a) UCLK pin on the master; (b) BITCLK USART baud rate generator on the UCLK; (c) All of above; (d) None of above. 69 Answers Quiz (5/5) 1. (c) UART and SPI. 2. (a) One SPI module. 3. (d) Transmits and receives characters asynchronously. 4. (d) Each of the above is possible. 5. (c) All of above. 6. (a) Framing, Parity, Receive Overrun and Break condition errors. 7. (b) BITCLK USART baud rate generator on the UCLK

36 MSP430 Teaching Materials Capítulo 7 Comunicaciones Módulo USCI Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department Contents MSP430 communications interfaces USCI module introduction USCI operation: UART mode USCI operation: SPI mode USCI operation: I 2 C mode USCI registers: UART, SPI and I 2 C modes Lab10b: USCI echo test Quiz 72 36

37 USCI module introduction (1/3) Although supporting UART, SPI and I 2 C, the USCI (Universal Serial Communication Interface) module is a communications interface specially designed to interconnect with high-speed industrial protocols: LIN (Local interconnect Network), used for low-cost modules in cars e.g. door modules, alarms, rain-sensors; IrDA (Infrared Data Association). The USCI module is available in the following devices: MSP430F5xx; MSP430F4xx and MSP430FG41xx; MSP430F2xx. 73 USCI module introduction (2/3) The USCI module supports: Low power operating modes (with auto-start); Two individual blocks: USCI_A: UART and SPI; USCI_B: SPI and I 2 C. Double buffered TX/RX; Baud rate/bit clock generator: With auto-baud rate detect; Flexible clock source. RX glitch suppression; DMA enabled; Error detection

38 USCI module introduction (3/3) USCI block diagram: 75 USCI operation: SPI mode (1/9) Flexible interface: 3- or 4-pin SPI; 7- or 8-bit data length; Master or slave; LSB or MSB first. S/W configurable clock phase and polarity; Programmable SPI master clock; Double buffered TX/RX; Interrupt driven TX/RX (USCI_A and USCI_B share TX and RX vector); Direct Memory Address ( DMA) enabled; LPMx operation

39 USCI operation: SPI mode (2/9) USCI module: SPI mode block diagram: 77 USCI operation: SPI mode (3/9) USCI module: SPI connections: 78 39

40 USCI operation: SPI mode (4/9) Serial data transmitted and received by multiple devices using a shared clock provided by the master; Three or four signals are used for SPI data exchange: UCxSIMO: Slave in, master out; UCxSOMI: Slave out, master in; UCxCLK: USCI SPI clock; UCxSTE: Slave transmit enable: Enables a device to receive and transmit data and is controlled by the master; 4 wire master, senses conflicts with other master(s); In 4 wire slave, externally controls TX and RX. 79 USCI operation: SPI mode (5/9) USCI initialization/re-configuration process: Set UCSWRST (BIS.B #UCSWRST,&UCAxCTL1); Initialize all USCI registers with UCSWRST = 1 (including UCxCTL1); Configure ports; Clear UCSWRST via software (BIC.B #UCSWRST,&UCxCTL1); Enable interrupts (optional) via UCxRXIE and/or UCxTXIE

41 USCI operation: SPI mode (6/9) Define the character format as presented earlier; Define mode: Master or Slave; Enable SPI transmit/receive clearing the UCSWRST bit; Define serial clock control: UCxCLK is provided by the master on the SPI bus; Configure serial clock polarity and phase (UCCKPL and UCCKPH bits). 81 USCI operation: SPI mode (7/9) USCI interrupts: One interrupt vector for transmission and one interrupt vector for reception: SPI transmit interrupt operation: UCxTXIFG interrupt flag is set by the transmitter to indicate that UCxTXBUF is ready to accept another character; An interrupt request is generated if UCxTXIE and GIE are also set; UCxTXIFG is automatically reset if the interrupt request is serviced or if a character is written to UCxTXBUF

42 USCI operation: SPI mode (8/9) USCI interrupts (continued): USCI receive interrupt operation: UCxRXIFG interrupt flag is set each time a character is received and loaded into UCxRXBUF; An interrupt request is also generated if UCxRXIE and GIE are set; UCxRXIFG and UCxRXIE are reset by a system reset PUC signal or when SWRST = 1; UCxRXIFG is automatically reset if the pending interrupt is serviced (when UCSWRST = 1) or when UCxRXBUF is read. 83 USCI operation: SPI mode (9/9) USCI interrupts (continued): SPI TX interrupt: SPI RX interrupt: 84 42

43 USCI operation: I 2 C mode (1/11) The I 2 C mode supports any master or slave I 2 C- compatible device (Specification v2.1); Each I 2 C device is recognized by a unique address and can operate as either a transmitter or a receiver, as well as either the master or the slave; A master initiates a data transfer and generates the clock signal SCL; Any device addressed by a master is considered a slave; Communication using the bi-directional serial data (SDA) and serial clock (SCL) pins; 85 USCI operation: I 2 C mode (2/11) I 2 C mode block diagram: 86 43

44 USCI operation: I 2 C mode (3/11) I 2 C mode block diagram: 87 USCI operation: I 2 C mode (4/11) Initialized using the sequence given earlier; I 2 C serial data: One clock pulse is generated by the master for each data bit transferred; Operates with byte data (MSB transferred first); The first byte after a START condition consists of a 7-bit slave address and the R/W bit: R/W = 0: Master transmits data to a slave; R/W = 1: Master receives data from a slave. The ACK bit is sent from the receiver after each byte on the 9th SCL clock

45 USCI operation: I 2 C mode (5/11) I 2 C addressing modes (7-bit and 10-bit addressing modes); I 2 C module operating modes: Master transmitter; Master receiver; Slave transmitter; Slave receiver. Arbitration procedure is invoked if two or more master transmitters simultaneously start a transmission on the bus; 89 USCI operation: I 2 C mode (6/11) I 2 C Clock generation and synchronization: SCL is provided by the master on the I 2 C bus; Master mode: BITCLK is provided by the USCI bit clock generator; Slave mode: the bit clock generator is not used

46 USCI operation: I 2 C mode (7/11) I 2 C interrupts: One interrupt vector for transmission and one interrupt vector for reception; I 2 C transmit interrupt operation: UCBxTXIFG interrupt flag is set by the transmitter to indicate that UCBxTXBUF is ready to accept another character; An interrupt request is also generated if UCBxTXIE and GIE are set; UCBxTXIFG is automatically reset if a character is written to UCBxTXBUF or a NACK is received. 91 USCI operation: I 2 C mode (8/11) I 2 C interrupts (continued): I 2 C receive interrupt operation: UCBxRXIFG interrupt flag is set each time a character is received and loaded into UCxRXBUF; An interrupt request is also generated if UCBxRXIE and GIE are set; UCBxRXIFG and UCBxRXIE are reset by a system reset PUC signal or when SWRST = 1; UCxRXIFG is automatically reset when UCBxRXBUF is read

47 USCI operation: I 2 C mode (9/11) I 2 C interrupts (continued): I 2 C transmit/receive interrupt operation: 93 USCI operation: I 2 C mode (10/11) I 2 C interrupts (continued): I 2 C state change interrupt flags: Arbitration-lost, UCALIFG: Flag is set when two or more transmitters start a transmission simultaneously, or operates as master but is addressed as a slave by another master; Not-acknowledge interrupt, UCNACKIFG: Flag set when an acknowledge is expected but is not received; Start condition detected interrupt, UCSTTIFG: Flag set when the I 2 C module detects a START condition together with its own address while in slave mode; Stop condition detected interrupt, UCSTPIFG: Flag set when the I 2 C module detects a STOP condition while in slave mode

48 USCI operation: I 2 C mode (11/11) I 2 C interrupts (continued): I 2 C TX interrupt: I 2 C RX interrupt: 95 USCI registers (UART, SPI and I 2 C modes) (1/20) UCAxCTL0, USCI_Ax Control Register 0 (UART, SPI) UCBxCTL0, USCI_Bx Control Register 0 (SPI, I 2 C) Mode UART UCPEN UCPAR UCMSB UC7BIT UCSPB UCMODEx UCSYNC=0 SPI UCCKPH UCCKPL UCMSB UC7BIT UCMST UCMODEx UCSYNC=1 I2C UCA10 UCSLA10 UCMM Unused UCMST UCMODEx=11 UCSYNC=1 Bit UART mode description SPI mode description I 2 C mode description 7 UCPEN Parity enable when UCPEN = 1 UCCKPH Clock phase select: UCCKPH = 0 Data is changed on the 1st UCLK edge and captured on the next one. UCCKPH = 1 Data is captured on the 1st UCLK edge and changed on the next one. UCA10 Own addressing mode select: UCA10= 0 7-bit address UCA10= 1 10-bit address 6 UCPAR Parity select: UCPAR = 0 Odd parity UCPAR = 1 Even parity UCCKPL Clock polarity select. UCCKPL = 0 Inactive state: low. UCCKPL = 1 Inactive state: high. UCSLA10 Slave addressing mode select: UCSLA10= 0 7-bit address UCSLA10= 1 10-bit address 5 UCMSB MSB first select: UCMSB = 0 LSB first UCMSB = 1 MSB first UCMSB As UART mode UCMM Multi-master environment select: UCMM= 0 Single master UCMM= 1 Multi master 96 48

49 USCI registers (UART, SPI and I 2 C modes) (2/20) UCAxCTL0, USCI_Ax Control Register 0 (UART, SPI) UCBxCTL0, USCI_Bx Control Register 0 (SPI, I 2 C) Mode UART UCPEN UCPAR UCMSB UC7BIT UCSPB UCMODEx UCSYNC=0 SPI UCCKPH UCCKPL UCMSB UC7BIT UCMST UCMODEx UCSYNC=1 I 2 C UCA10 UCSLA10 UCMM Unused UCMST UCMODEx=11 UCSYNC=1 Bit UART mode description SPI mode description I 2 C mode description 4 UC7BIT Character length: = 0 8-bit data = 1 7-bit data UC7BIT As UART mode Unused 3 UCSPB Stop bit select: = 0 One stop bit = 1 Two stop bits UCMST Master mode: = 0 USART is slave = 1 USART is master UCMST Master mode select. = 0 Slave mode = 1 Master mode 2-1 UCMODEx USCI asynchronous mode: = 00 UART = 01 Idle-Line Multiproc. = 10 Address-Bit Multiproc. = 11 UART with ABR. UCMODEx USCI synchronous mode: = 00 3-Pin SPI = 01 4-Pin SPI (slave enabled when UCxSTE=1) = 10 4-Pin SPI (slave enabled when UCxSTE=0) = 11 I 2 C UCMODEx=11 USCI Mode: = 00 3-Pin SPI = 01 4-Pin SPI (master/slave enabled if STE = 1) = 10 4-Pin SPI (master/slave enabled if STE = 0) = 11 I 2 C 0 UCSYNC=0 Synchronous mode enable: = 0 Asynchronous = 1 Synchronous UCSYNC=1 As UART mode UCSYNC=1 As UART mode 97 USCI registers (UART, SPI and I 2 C modes) (3/20) UCAxCTL1, USCI_Ax Control Register 1 (UART, SPI) UCBxCTL1, USCI_Bx Control Register 1 (SPI, I 2 C) Mode UART UCSSELx UCRXEIE UCBRKIE UCDORM UCTXADDR UCTXBRK UCSWRST SPI UCSSELx Unused Unused Unused Unused Unused UCSWRST I 2 C UCSSELx Unused UCTR UCTXNACK UCTXSTP UCTXSTT UCSWRST Bit UART mode description SPI mode description I 2 C mode description 7-6 UCSSELx BRCLK source clock: = 00 UCLK = 01 ACLK = 10 SMCLK = 11 SMCLK UCSSELx BRCLK source clock: = 00 N/A = 01 ACLK = 10 SMCLK = 11 SMCLK UCSSELx BRCLK source clock: = 00 UCLKI = 01 ACLK = 10 SMCLK = 11 SMCLK 5 UCRXEIE Receive erroneous-character IE: = 0 Rejected (UCAxRXIFG not set) = 1 Received (UCAxRXIFG set) 4 UCBRKIE Receive break character IE: = 0 Not set UCAxRXIFG. = 1 Set UCAxRXIFG. Unused Unused Slave addressing mode select: UCSLA10= 0 7-bit address UCSLA10= 1 10-bit address Unused UCTR Transmitter/Receiver select: = 0 Receiver = 1 Transmitter 98 49

50 USCI registers (UART, SPI and I 2 C modes) (4/20) UCAxCTL1, USCI_Ax Control Register 1 (UART, SPI) UCBxCTL1, USCI_Bx Control Register 1 (SPI, I 2 C) Mode UART UCSSELx UCRXEIE UCBRKIE UCDORM UCTXADDR UCTXBRK UCSWRST SPI UCSSELx Unused Unused Unused Unused Unused UCSWRST I 2 C UCSSELx Unused UCTR UCTXNACK UCTXSTP UCTXSTT UCSWRST Bit UART mode description SPI mode description I 2 C mode description 3 UCDORM Dormant. Puts USCI into sleep mode: = 0 Not dormant = 1 Dormant 2 UCTXADDR Transmit address: = 0 Next frame transmitted is data = 1 Next frame transmitted is address 1 UCTXBRK Transmit break: = 0 Next frame transmitted is not a break = 1 Next frame transmitted is a break or a break/synch 0 UCSWRST Software reset enable =0 Disabled. USCI reset released for operation 1 Enabled. USCI logic held in reset state Unused UCTXNACK Transmit a NACK: = 0 Acknowledge normally = 1 Generate NACK Unused UCTXSTP Transmit STOP condition in master mode: = 0 No STOP generated = 1 Generate STOP Unused UCTXSTT Transmit START condition in master mode: = 0 No START generated = 1 Generate START UCSWRST As UART mode UCSWRST As UART mode 99 USCI registers (UART, SPI and I 2 C modes) (5/20) UCAxBR0, USCI_Ax Baud Rate Control Register 0 (UART, SPI) UCBxBR0, USCI_Bx Bit Rate Control Register 0 (SPI, I 2 C) Mode UART / SPI / I 2 C UCBRx low byte UCAxBR1, USCI_Ax Baud Rate Control Register 1 (UART, SPI) UCBxBR1, USCI_Bx Bit Rate Control Register 1 (SPI, I 2 C) Mode UART / SPI / I 2 C UCBRx high byte Bit UART mode description SPI mode description I 2 C mode description 7-6 UCBRx Clock prescaler setting of the baud rate generator: Prescaler value (16-bit value) = {UCAxBR0+UCAxBR1x256} UCBRx Bit clock prescaler setting: Prescaler value (16-bit value) = {UCAxBR0+UCAxBR1 256} UCBRx As SPI mode

51 USCI registers (UART, SPI and I 2 C modes) (6/20) UCAxSTAT, USCI_Ax Status Register (UART, SPI) UCBxSTAT, USCI_Bx Status Register (SPI, I 2 C) Mode UART UCLISTEN UCFE UCOE UCPE UCBRK UCRXERR UCADDR UCIDLE UCBUSY SPI UCLISTEN UCFE UCOE Unused Unused Unused Unused UCBUSY I 2 C Unused UCSCLLOW UCGC UCBBUSY UCNACKIFG UCSTPIFG UCSTTIFG UCALIFG Bit UART mode description SPI mode description I 2 C mode description 7 UCLISTEN Listen enable: = 0 Disabled = 1 UCAxTXD is internally fed back to receiver 6 UCFE Framing error flag: = 0 No error = 1 Character with low stop bit 5 UCOE Overrun error flag: = 0 No error = 1 Overrun error UCLISTEN UCFE Listen enable: = 0 Disabled = 1 The transmitter output is internally fed back to receiver Framing error flag: = 0 No error = 1 Bus conflict (4w master) Unused UCSCLLOW SCL low: = 0 SCL is not held low = 1 SCL is held low UCOE As UART mode UCGC General call address received: = 0 No general call address = 1 General call address 101 USCI registers (UART, SPI and I 2 C modes) (7/20) UCAxSTAT, USCI_Ax Status Register (UART, SPI) UCBxSTAT, USCI_Bx Status Register (SPI, I 2 C) Mode UART UCLISTEN UCFE UCOE UCPE UCBRK UCRXERR UCADDR UCIDLE UCBUSY SPI UCLISTEN UCFE UCOE Unused Unused Unused Unused UCBUSY I 2 C Unused UCSCLLOW UCGC UCBBUSY UCNACKIFG UCSTPIFG UCSTTIFG UCALIFG Bit UART mode description SPI mode description I 2 C mode description 4 UCPE Parity error flag: = 0 No error = 1 Character with parity error 3 UCBRK Break detect flag: = 0 No break condition = 1 Break condition occurred 2 UCRXERR Receive error flag. = 0 No receive errors detected = 1 Receive error detected 1 UCADDR UCIDLE Address-bit multiproc. mode: = 0 Received character is data = 1 Received character is an address Idle-line multiproc. mode: = 0 No idle line detected = 1 Idle line detected 0 UCBUSY USCI busy: = 0 USCI inactive = 1 USCI transmit/receive Unused UCBBUSY Bus busy: = 0 Bus inactive = 1 Bus busy Unused UCNACKIFG NACK received interrupt flag: = 0 No interrupt pending = 1 Interrupt pending Unused UCSTPIFG Stop condition interrupt flag: = 0 No interrupt pending = 1 Interrupt pending Unused UCSTTIFG Start condition interrupt flag: = 0 No interrupt pending = 1 Interrupt pending UCBUSY UCALIFG Arbitration lost interrupt flag: = 0 No interrupt pending = 1 Interrupt pending

52 USCI registers (UART, SPI and I 2 C modes) (8/20) UCAxRXBUF, USCI_Ax Receive Buffer Register (UART, SPI) UCBxRXBUF, USCI_Bx Receive Buffer Register (SPI, I 2 C) Mode UART / SPI / I 2 C UCRXBUFx Bit UART mode description SPI mode description I 2 C mode description 7-0 UCRXBUFx The receive-data buffer is user accessible and contains the last received character from the receive shift register. Reading UCxRXBUF resets receive-error bits, UCADDR/UCIDLE bit and UCAxRXIFG. In 7-bit data mode, UCAxRXBUF is LSB justified and the MSB is always cleared. UCRXBUFx As UART mode Reading UCxRXBUF resets the receive-error bits, and UCxRXIFG UCRXBUFx As SPI mode 103 USCI registers (UART, SPI and I 2 C modes) (9/20) UCAxTXBUF, USCI_Ax Transmit Buffer Register (UART, SPI) UCBxTXBUF, USCI_Bx Transmit Buffer Register (SPI, I 2 C) Mode UART / SPI / I 2 C UCTXBUFx Bit UART mode description SPI mode description I 2 C mode description 7-0 UCTXBUFx The transmit data buffer is user accessible and holds the data waiting to be moved into the transmit shift register and transmitted on UCAxTXD. Writing to the transmit data buffer clears UCAxTXIFG. UCTXBUFx The transmit data buffer is user accessible and holds the data waiting to be moved into the transmit shift register and transmitted. Writing to the transmit data buffer clears UCxTXIFG. UCTXBUFx As SPI mode

53 USCI registers (UART, SPI and I 2 C modes) (10/20) IE2, Interrupt Enable Register 2 (UART, SPI, I 2 C) Mode UART UCA0TXIE UCA0RXIE SPI UCB0TXIE UCB0RXIE UCA0TXIE UCA0RXIE I 2 C UCB0TXIE UCB0RXIE Bit UART mode description SPI mode description I 2 C mode description 3 UCB0TXIE USCI_B0 transmit interrupt enable: = 0 Disabled = 1 Enabled 2 UCB0RXIE USCI_B0 receive interrupt enable: = 0 Disabled = 1 Enabled UCB0TXIE UCB0RXIE As SPI mode As SPI mode 1 UCA0TXIE USCI_A0 transmit interrupt enable: = 0 Disabled = 1 Enabled 0 UCA0RXIE USCI_A0 receive interrupt enable: = 0 Disabled = 1 Enabled UCA0TXIE UCA0RXIE As UART mode As UART mode 105 USCI registers (UART, SPI and I 2 C modes) (11/20) IFG2, Interrupt Flag Register 2 (UART, SPI, I 2 C) Mode UART UCA0TXIFG UCA0RXIFG SPI UCB0TXIFG UCB0RXIFG UCA0TXIFG UCA0RXIFG I 2 C UCB0TXIFG UCB0RXIFG Bit UART mode description SPI mode description I 2 C mode description 3 UCB0TXIFG USCI_B0 transmit interrupt flag: = 0 No interrupt pending = 1 Interrupt pending 2 UCB0RXIFG USCI_B0 receive interrupt flag: = 0 No interrupt pending = 1 Interrupt pending UCB0TXIFG UCB0RXIFG As SPI mode As SPI mode 1 UCA0TXIFG USCI_A0 transmit interrupt flag: = 0 No interrupt pending = 1 Interrupt pending 0 UCA0RXIFG USCI_A0 receive interrupt flag: = 0 No interrupt pending = 1 Interrupt pending UCA0TXIFG UCA0RXIFG As UART mode As UART mode

54 USCI registers (UART, SPI and I 2 C modes) (12/20) UC1IE, USCI_A1 Interrupt Enable Register (UART, SPI) UC1IE, USCI_B1 Interrupt Enable Register (SPI, I 2 C) Mode UART Unused Unused Unused Unused UCA1TXIE UCA1RXIE SPI Unused Unused Unused Unused UCB1TXIE UCB1RXIE UCA1TXIE UCA1RXIE I 2 C Unused Unused Unused Unused UCB1TXIE UCB1RXIE Bit UART mode description SPI mode description I 2 C mode description 3 UCB1TXIE USCI_B1 transmit interrupt enable: UTXIE1 = 0 Disabled UTXIE1 = 1 Enabled 2 UCB1RXIE USCI_B1 receive interrupt enable: URXIE1 = 0 Disabled URXIE1 = 1 Enabled UCB1TXIE UCB1RXIE As SPI mode As SPI mode 1 UCA1TXIE USCI_A1 transmit interrupt enable: UTXIE1 = 0 Disabled UTXIE1 = 1 Enabled UCA1TXIE As UART mode 0 UCA1RXIE USCI_A1 receive interrupt enable: URXIE1 = 0 Disabled URXIE1 = 1 Enabled UCA1RXIE As UART mode 107 USCI registers (UART, SPI and I 2 C modes) (13/20) UC1IFG, USCI_A1 Interrupt Flag Register (UART, SPI) UC1IFG, USCI_B1 Interrupt Flag Register (SPI, I 2 C) Mode UART UCA1TXIFG UCA1RXIFG SPI UCB1TXIFG UCB1RXIFG UCA1TXIFG UCA1RXIFG I 2 C UCB1TXIFG UCB1RXIFG Bit UART mode description SPI mode description I 2 C mode description 3 UCB1TXIFG USCI_B1 transmit interrupt flag: = 0 No interrupt pending = 1 Interrupt pending UCB1TXIFG As SPI mode 2 UCB1RXIFG USCI_B1 receive interrupt flag: = 0 No interrupt pending = 1 Interrupt pending UCB1RXIFG As SPI mode 1 UCA1TXIFG USCI_A1 transmit interrupt flag: = 0 No interrupt pending = 1 Interrupt pending 0 UCA1RXIFG USCI_A1 receive interrupt flag: = 0 No interrupt pending = 1 Interrupt pending UCA1TXIFG UCA1RXIFG As UART mode As UART mode

55 USCI registers (UART, SPI and I 2 C modes) (14/20) UCAxMCTL, USCI_Ax Modulation Control Register (UART) UCBRFx UCBRSx UCOS16 Bit UART mode description 7-4 UCBRFx First modulation pattern for BITCLK16 when UCOS16 = 1 (See Table 19-3 of the MSP430x4xx User s Guide) 3-1 UCBRSx Second modulation pattern for BITCLK (See Table 19-2 of the MSP430x4xx User s Guide) 0 UCOS16 Oversampling mode enabled when UCOS16 = USCI registers (UART, SPI and I 2 C modes) (15/20) UCAxIRTCTL, USCI_Ax IrDA Transmit Control Register (UART) UCIRTXPLx UCIRTXCLK UCIREN Bit UART mode description 7-2 UCIRTXPLx Transmit pulse length: t PULSE = (UCIRTXPLx + 1) / (2 x f IRTXCLK ) 1 UCIRTXCLK IrDA transmit pulse clock select: UCIRTXCLK = 0 BRCLK UCIRTXCLK = 1 BITCLK16, when UCOS16 = 1 BRCLK, otherwise 0 UCIREN IrDA encoder/decoder enable: UCIREN = 0 IrDA encoder/decoder disabled UCIREN = 1 IrDA encoder/decoder enabled

56 USCI registers (UART, SPI and I 2 C modes) (16/20) UCAxIRRCTL, USCI_Ax IrDA Receive Control Register (UART) UCIRRXFLx UCIRRXPL UCIRRXFE Bit UART mode description 7-2 UCIRRXFLx Receive filter length (minimum pulse length): t MIN = (UCIRRXFLx + 4) / (2 f IRTXCLK ) 1 UCIRRXPL IrDA receive input UCAxRXD polarity. When a light pulse is seen: UCIRRXPL = 0 IrDA transceiver delivers a high pulse UCIRRXPL = 1 IrDA transceiver delivers a low pulse 0 UCIRRXFE IrDA receive filter enabled: UCIRRXFE = 0 Disabled UCIRRXFE = 1 Enabled 111 USCI registers (UART, SPI and I 2 C modes) (17/20) UCAxABCTL, USCI_Ax Auto Baud Rate Control Register (UART) Reserved UCDELIMx UCSTOE UCBTOE Reserved UCABDEN Bit UART mode description 5-4 UCDELIMx Break/synch delimiter length: UCDELIM1 UCDELIM0 = 00 1 bit time UCDELIM1 UCDELIM0 = 01 2 bit times UCDELIM1 UCDELIM0 = 10 3 bit times UCDELIM1 UCDELIM0 = 11 4 bit times 3 UCSTOE Synch field time out error: UCSTOE = 0 No error UCSTOE = 1 Length of synch field exceeded measurable time 2 UCBTOE Break time out error: UCBTOE = 0 No error UCBTOE = 1 Length of break field exceeded 22 bit times. 0 UCABDEN Automatic baud rate detect enable: UCABDEN = 0 Baud rate detection disabled UCABDEN = 1 Baud rate detection enabled

57 USCI registers (UART, SPI and I 2 C modes) (18/20) UCBxI2COA, USCIBx I2C Own Address Register (I 2 C) UCGCEN I2COAx I2COAx Bit UART mode description 15 UCGCEN General call response enable: UCGCEN = 0 Do not respond to a general call UCGCEN = 1 Respond to a general call 9-0 I2COAx I 2 C own address (local address of the USCI_Bx I 2 C controller) Right-justified address 7-bit address Bit 6 is the MSB, Bits 9-7 are ignored. 10-bit address Bit 9 is the MSB. 113 USCI registers (UART, SPI and I 2 C modes) (19/20) UCBxI2CSA, USCI_Bx I 2 C Slave Address Register (I 2 C) I2CSAx I2CSAx Bit UART mode description 9-0 I2CSAx I 2 C slave address (slave address of the external device to be addressed by the USCI_Bx module) Only used in master mode Right-justified address 7-bit address Bit 6 is the MSB, Bits 9-7 are ignored. 10-bit address Bit 9 is the MSB

58 USCI registers (UART, SPI and I 2 C modes) (20/20) UCBxI2CIE, USCI_Bx I2C Interrupt Enable Register (I 2 C) Reserved UCNACKIE UCSTPIE UCSTTIE UCALIE Bit UART mode description 3 UCNACKIE Not-acknowledge interrupt enable: UCNACKIE = 0 Interrupt disabled UCNACKIE = 1 Interrupt enabled UCSTPIE UCSTTIE UCALIE Stop condition interrupt enable: UCSTPIE = 0 Interrupt disabled UCSTPIE = 1 Interrupt enabled Start condition interrupt enable: UCSTTIE = 0 Interrupt disabled UCSTTIE = 1 Interrupt enabled Arbitration lost interrupt enable: UCALIE = 0 Interrupt disabled UCALIE = 1 Interrupt enabled 115 Quiz (1/6) 1. The USCI module has: (a) One module; (b) Two modules; (c) Three modules; (d) None. 2. The USCI module in UART mode supports: (a) LIN; (b) IrDA; (c) All of above; (d) None of above

59 Quiz (2/6) 3. The UCMSB bit controls: (a) The direction of the data transfer; (b) Selects LSB or MSB first; (c) All of above; (d) None of above. 4. The automatic baud rate detection uses a break which is: (a) Detected when 11 or more continuous 0 s are received; (b) Detected when 4 or more continuous 0 s are received; (c) Detected when 8 or more continuous 0 s are received; (d) None. 117 Quiz (3/6) 5. The automatic baud rate detection uses a synch field which is represented by: (a) Data 022h inside a byte field; (b) Data 055h inside a byte field; (c) Data 044h inside a byte field; (d) None. 6. The USCI module in UART mode for IrDA decoding detects: (a) Low pulse; (b) High pulse; (c) All of above; (d) None

60 Quiz (4/6) 7. The baud rate can be generated using: (a) A low frequency; (b) Oversampling; (c) All of above; (d) None of above. 8. In USCI I 2 C communication, the ACK bit is sent from the receiver after: (a) Each bit on the 9th SCL clock; (b) Each byte on the 2th SCL clock; (c) Each bit on the 2th SCL clock; (d) Each byte on the 9th SCL clock. 119 Quiz (5/6) 9. The operating modes provided by the I 2 C mode are: (a) Master transmitter and Slave receiver; (b) Slave transmitter and Master receiver; (c) All of above; (d) None of above. 10. The I 2 C state change interrupt flags are: (a) Arbitration-lost and Not-acknowledge; (b) Start and stop conditions; (c) All of above; (d) None of above

61 Quiz (6/6) Answers: 1. (b) Two modules. 2. (c) All of above. 3. (c) All of above. 4. (a) Detected when 11 or more continuous 0 s are received. 5. (b) Data 055h inside a byte field. 6. (c) All of above. 7. (c) All of above. 8. (d) Each byte on the 9th SCL clock. 9. (c) All of above. 10. (c) All of above. 121 MSP430 Teaching Materials Chapter 7 Communicaciones USI Module Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António Espírito Santo, Bruno Ribeiro, Humberto Santos University of Beira Interior, Electromechanical Engineering Department 61

62 Contents MSP430 communications interfaces USI module introduction USI operation: SPI mode USI operation: I 2 C mode USI registers (SPI and I 2 C modes) Lab10b: Echo test using SPI Lab10c: Echo test using I 2 C Quiz 123 USI module introduction (1/2) The USI (Universal Serial Interface) module supports basic SPI and I 2 C synchronous serial communications; It is available in the MSP430x20xx family of devices; The USI module supports: SPI or I 2 C modes; Interrupt driven; Reduces CPU load; Flexible clock source selection

63 USI module introduction (2/2) USI block diagram: SPI mode: Programmable data length (8/16-bit shift register); MSB/LSB first. I 2 C mode: START/STOP detection; Arbitration lost detection. Interrupt driven; Reduces CPU load; Flexible clock source. 125 USI operation: SPI and I 2 C modes (1/5) Shift register and bit counter that include logic to support SPI and I 2 C communication; USISR shift register (up to 16 bits supported): Directly accessible by software; Contains the data to be transmitted/received (simultaneously); MSB or LSB first. Bit counter: Controls the number of bits transmitted/received; Counts the number of sampled bits; Sets USIIFG when the USICNTx = 0 (decrementing or writing zero to USICNTx bits); Writing USICNTx > 0 automatically clears USIIFG when USIIFGCC = 0 (automatically stops clocking after last bit)

64 USI operation: SPI and I 2 C modes (2/5) USI initialization: Reset USISWRST; Set USIPEx bits (USI function for the pin and maintains the PxIN and PxIFG functions for the pin): Port input levels can be read via the PxIN register by software; Incoming data stream can generate port interrupts on data transitions. 127 USI operation: SPI and I 2 C modes (3/5) Recommended USI initialization process: Set the USIPEx bits in the USI control register (USI function for the pin and set up the PxIN and PxIFG functions for the pin as well); Set the direction of the RX and TX shift register (MSB or LSB first) by USILSB bit; Select the mode (master or slave) by USIMTS bit; Enable or disable output data by USIOE bit; Enable USI interrupts by setting USIIE bit; Set up USI clock by configuring the USICKCTL control register; Enable USI by setting USISWRST bit; Read port input levels via the PxIN register by software; Incoming data stream will generate port interrupts on data transitions

65 USI operation: SPI and I 2 C modes (4/5) USI clock generation: Clock selection multiplexer: Internal clocks ACLK or SMCLK; External clock SCLK; USISWCLK (software clock input bit); Timer_A CAP/COM outputs. Configurable divider; Auto-stop on interrupt: USIIFG; Selectable phase and polarity. 129 USI operation: SPI and I 2 C modes (5/5) USICKPL: Selects the inactive level of the SPI clock (data latching on rising or falling edge); USICKPH: Selects the clock edge on which SDO is updated and SDI is sampled (idle high or low support). USIIFG automatically cleared and set by USICNTx; Clock stop on IFG: USIIFG and USISTTIFG

66 USI operation: SPI mode (1/2) Configure SPI mode: SPI master: USIMST = 1; USII2C = 0; Select clock source; SCLK -> output. SPI slave: USIMST = 0; USII2C = 0; SCLK -> input; Receives the clock externally from the master. USIPEx bits enable data and clock pins; Port logic functions, including interrupts as normal; Data output latched on shift clock. 131 USI operation: SPI mode (2/2) SPI interrupts: One interrupt vector associated with the USI module; One interrupt flag, USIIFG: Set when bit counter counts to zero; Generates an interrupt request when USIIE = 1; Cleared when USICNTx > 0 (USIIFGCC = 0), or directly by software; Stops clock when set

67 USI operation: I 2 C mode (1/10) Configure USI module in I 2 C mode: USII2C =1; USICKPL = 1; USICKPH = 0; I 2 C data compatibility: USILSB = 0; USI16B = 0; Enable SCL and SDA port functions: Set USIPE6 and USIPE USI operation: I 2 C mode (2/10) I 2 C master: USIMST = 1 and USII2C = 1; Select clock source (output to SCL line while USIIFG = 0). I 2 C slave: USIMST = 0; SCL is held low if USIIFG=1, USISTTIFG=1 or if USICNTx=

14. Communications. Chapter 14

14. Communications. Chapter 14 Chapter 14 14. Communications The MSP430 contains built-in features for both parallel and serial data communication. This chapter describes the operation of these peripherals, and discusses the protocols,

More information

Serial Communications (Chapter 10) RS232, SPI, I2C

Serial Communications (Chapter 10) RS232, SPI, I2C Serial Communications (Chapter 10) RS232, SPI, I2C Thesimplest is parallel One way Communications There may be mechanism for peripheral to get attention of μc(i.e., interrupt, or poll) μc Multiple (8 typically)

More information

Señal RS232. d. codevilla v1.0

Señal RS232. d. codevilla v1.0 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

More information

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

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS SERIAL I/O COMMON PROTOCOLS RS-232 Fundamentals What is RS-232 RS-232 is a popular communications interface for connecting modems and data acquisition devices (i.e. GPS receivers, electronic balances,

More information

Serial Communications

Serial Communications Serial Communications 1 Serial Communication Introduction Serial communication buses Asynchronous and synchronous communication UART block diagram UART clock requirements Programming the UARTs Operation

More information

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

Objectives. Basics of Serial Communication. Simplex vs Duplex. CMPE328 Microprocessors (Spring 2007-08) Serial Interfacing. By Dr. CMPE328 Microprocessors (Spring 27-8) Serial Interfacing By Dr. Mehmet Bodur Objectives Upon completion of this chapter, you will be able to: List the advantages of serial communication over parallel communication

More information

Serial Communications

Serial 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 information

INFORMATICA INDUSTRIALE

INFORMATICA INDUSTRIALE INFORMATICA INDUSTRIALE Lezione 5 Prof. Christian Forlani forlani@disco.unimib.it Device Structure: Peripherals» I/O» Parallel Slave Port (PSP)» Timer» Capture/Compare/PWM (CCP)» Serial Slave Port (SSP)»

More information

INFORMATICA INDUSTRIALE

INFORMATICA INDUSTRIALE INFORMATICA INDUSTRIALE Lezione 6 Prof. Christian Forlani forlani@disco.unimib.it Tutor: Stefano Brusamolino brusamolino@ira.disco.unimib.it Device Structure: Peripherals» I/O» Parallel Slave Port (PSP)»

More information

Software User Guide UG-461

Software User Guide UG-461 Software User Guide UG-461 One Technology Way P.O. Box 9106 Norwood, MA 02062-9106, U.S.A. Tel: 781.329.4700 Fax: 781.461.3113 www.analog.com ezlinx icoupler Isolated Interface Development Environment

More information

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

Section 17. UART HIGHLIGHTS UART. This section of the manual contains the following major topics: HIGHLIGHTS Section 17. UART This section of the manual contains the following major topics: 17 17.1 Introduction... 17-2 17.2 Control Registers... 17-4 17.3 UART Baud Rate Generator... 17-10 17.4 UART

More information

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

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1. SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES 1. Introduction C8051F3xx and C8051F41x devices are equipped with an SMBus serial I/O peripheral that is compliant with both the System Management

More information

Revisión general de la tecnología. Funcionalidad del CRTOUCH Calibración Casos de Uso Consideraciones importantes

Revisión general de la tecnología. Funcionalidad del CRTOUCH Calibración Casos de Uso Consideraciones importantes Agosto, 2012 Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, t he Energy Efficient Solutions logo, mobilegt, PowerQUICC, QorIQ, StarCore and Symphony are trademarks

More information

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

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A Application Note Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A AN026701-0308 Abstract This application note demonstrates a method of implementing the Serial Peripheral Interface

More information

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

USB2.0 <=> I2C V4.4. Konverter Kabel und Box mit Galvanischetrennung USB2.0 I2C V4.4 Konverter Kabel und Box mit Galvanischetrennung USB 2.0 I2C Konverter Kabel V4.4 (Prod. Nr. #210) USB Modul: Nach USB Spezifikation 2.0 & 1.1 Unterstützt automatisch "handshake

More information

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual. 14.10.2010 HAW - Arduino 1 The I2C Bus Introduction The I2C-bus is a de facto world standard that is now implemented in over 1000 different ICs manufactured by more than 50 companies. Additionally, the versatile I2C-bus is used

More information

LIN (Local Interconnect Network):

LIN (Local Interconnect Network): LIN (Local Interconnect Network): History: LIN (Local Interconnect Network) was developed as cost-effective alternate to CAN protocol. In 1998 a group of companies including Volvo, Motorola, Audi, BMW,

More information

USER GUIDE EDBG. Description

USER GUIDE EDBG. Description USER GUIDE EDBG Description The Atmel Embedded Debugger (EDBG) is an onboard debugger for integration into development kits with Atmel MCUs. In addition to programming and debugging support through Atmel

More information

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor. http://onsemi.

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor. http://onsemi. Design Examples of On Board Dual Supply Voltage Logic Translators Prepared by: Jim Lepkowski ON Semiconductor Introduction Logic translators can be used to connect ICs together that are located on the

More information

Microcomputer Protocol Implementation at Local Interconnect Network Georgi Krastev

Microcomputer Protocol Implementation at Local Interconnect Network Georgi Krastev Microcomputer Protocol Implementation at Local Interconnect Network Georgi Krastev Abstract: The paper discusses the issues of microcomputer protocol implementation at local interconnect network for automobile

More information

In-Vehicle Networking

In-Vehicle Networking In-Vehicle Networking SAE Network classification Class A networks Low Speed (

More information

Implementing SPI Communication Between MSP430 G2452 and LTC2382-16 ADC

Implementing SPI Communication Between MSP430 G2452 and LTC2382-16 ADC Implementing SPI Communication Between MSP430 G2452 and LTC2382-16 ADC Enwei Gu Nov. 12, 2011 MCU ADC MSP430- G2452 LTC2382-16 16- bits SPI Keywords 1 Abstract This document describes and shows how to

More information

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

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 5 V, 3.3 V and 2.5 V dual UART, 5 M/s (max.) with 32-byte FIFOs and infrared (IrDA) encoder/decoder Rev. 04 1 September 2005 Product data sheet 1. General description 2. Features The is a 2 channel Universal

More information

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

SC16IS740/750/760. Single UART with I 2 C-bus/SPI interface, 64 bytes of transmit and receive FIFOs, IrDA SIR built-in support Single UART with I 2 C-bus/SPI interface, 64 bytes of transmit and receive FIFOs, IrDA SIR built-in support Rev. 7 9 June 2011 Product data sheet 1. General description The is a slave I 2 C-bus/SPI interface

More information

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ Tema 5. Unidad de E/S 1 I/O Unit Index Introduction. I/O Problem

More information

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

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems 1 5-1 8051 Peripherals 8051 Serial Port The 8051 contains a UART Universal Asynchronous Receiver Transmitter The serial port is full-duplex It can transmit and receive simultaneously 2 Port 3 pins are used to provide the serial

More information

DS1721 2-Wire Digital Thermometer and Thermostat

DS1721 2-Wire Digital Thermometer and Thermostat www.dalsemi.com FEATURES Temperature measurements require no external components with ±1 C accuracy Measures temperatures from -55 C to +125 C; Fahrenheit equivalent is -67 F to +257 F Temperature resolution

More information

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

PrimeCell Synchronous Serial Port (PL022) ARM. Technical Reference Manual. Revision: r1p4 ARM PrimeCell Synchronous Serial Port (PL022) Revision: r1p4 Technical Reference Manual Copyright 2000-2001, 2009, 2011, 2016. All rights reserved. ARM DDI 0194H () ARM PrimeCell Synchronous Serial Port

More information

UNIVERSIDAD FRANCISCO DE PAULA SANTANDER DOMINIOS DE COLISION, SEGMENTACION Y VLAN. Academia Local. Ing. José Martín Calixto Cely

UNIVERSIDAD FRANCISCO DE PAULA SANTANDER DOMINIOS DE COLISION, SEGMENTACION Y VLAN. Academia Local. Ing. José Martín Calixto Cely UNIVERSIDAD FRANCISCO DE PAULA SANTANDER DOMINIOS DE COLISION, SEGMENTACION Y VLAN Academia Local Ing. José Martín Calixto Cely COLLISIONS AND COLLISION DOMAINS Types of Networks Shared media environment

More information

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

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs AN033101-0412 Abstract This describes how to interface the Dallas 1-Wire bus with Zilog s Z8F1680 Series of MCUs as master devices. The Z8F0880,

More information

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

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction Software ISO 7816 I/O Line Implementation Features ISO 7816-3 compliant (direct convention) Byte reception and transmission with parity check Retransmission on error detection Automatic reception at the

More information

Single channel data transceiver module WIZ2-434

Single channel data transceiver module WIZ2-434 Single channel data transceiver module WIZ2-434 Available models: WIZ2-434-RS: data input by RS232 (±12V) logic, 9-15V supply WIZ2-434-RSB: same as above, but in a plastic shell. The WIZ2-434-x modules

More information

Local Interconnect Network Training. Local Interconnect Network Training. Overview

Local Interconnect Network Training. Local Interconnect Network Training. Overview Overview Local Interconnect Network Training History and introduction Technical features The ISO/OSI reference model and LIN Frames Message Frames Communication concept of LIN Command Frames and Extended

More information

Digital Fundamentals

Digital Fundamentals igital Fundamentals with PL Programming Floyd Chapter 9 Floyd, igital Fundamentals, 10 th ed, Upper Saddle River, NJ 07458. All Rights Reserved Summary Latches (biestables) A latch is a temporary storage

More information

Summary. Basic comparator operation. (Equality) 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Summary. Basic comparator operation. (Equality) 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved Comparators The unction o a comparator is to compare the manitudes o two binary numbers to determine the relationship between them. In the simplest orm, a comparator can test or equality usin XNOR ates.

More information

UART IP Core Specification. Author: Jacob Gorban gorban@opencores.org

UART IP Core Specification. Author: Jacob Gorban gorban@opencores.org UART IP Core Specification Author: Jacob Gorban gorban@opencores.org Rev. 0.6 August 11, 2002 This page has been intentionally left blank Revision History Rev. Date Author Description 0.1 Jacob Gorban

More information

a8251 Features General Description Programmable Communications Interface

a8251 Features General Description Programmable Communications Interface a8251 Programmable Communications Interface June 1997, ver. 2 Data Sheet Features a8251 MegaCore function that provides an interface between a microprocessor and a serial communication channel Optimized

More information

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

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 information

Práctica 1: PL 1a: Entorno de programación MathWorks: Simulink

Práctica 1: PL 1a: Entorno de programación MathWorks: Simulink Práctica 1: PL 1a: Entorno de programación MathWorks: Simulink 1 Objetivo... 3 Introducción Simulink... 3 Open the Simulink Library Browser... 3 Create a New Simulink Model... 4 Simulink Examples... 4

More information

DS1621 Digital Thermometer and Thermostat

DS1621 Digital Thermometer and Thermostat Digital Thermometer and Thermostat www.dalsemi.com FEATURES Temperature measurements require no external components Measures temperatures from 55 C to +125 C in 0.5 C increments. Fahrenheit equivalent

More information

Manejo Basico del Servidor de Aplicaciones WebSphere Application Server 6.0

Manejo Basico del Servidor de Aplicaciones WebSphere Application Server 6.0 Manejo Basico del Servidor de Aplicaciones WebSphere Application Server 6.0 Ing. Juan Alfonso Salvia Arquitecto de Aplicaciones IBM Uruguay Slide 2 of 45 Slide 3 of 45 Instalacion Basica del Server La

More information

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards

RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards RN-131-PICTAIL & RN-171-PICTAIL Evaluation Boards 2012 Roving Networks. All rights reserved. Version 1.0 9/7/2012 USER MANUAL OVERVIEW The RN-131 and RN-171 WiFly radio modules are complete, standalone

More information

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ nc. Order this document by MC68328/D Microprocessor and Memory Technologies Group MC68328 MC68328V Product Brief Integrated Portable System Processor DragonBall ΤΜ As the portable consumer market grows

More information

USART and Asynchronous Communication

USART and Asynchronous Communication The USART is used for synchronous and asynchronous serial communication. USART = Universal Synchronous/Asynchronous Receiver Transmitter Our focus will be on asynchronous serial communication. Asynchronous

More information

Using Xbee 802.15.4 in Serial Communication

Using Xbee 802.15.4 in Serial Communication Using Xbee 802.15.4 in Serial Communication Jason Grimes April 2, 2010 Abstract Instances where wireless serial communication is required to connect devices, Xbee RF modules are effective in linking Universal

More information

DS1621 Digital Thermometer and Thermostat

DS1621 Digital Thermometer and Thermostat www.maxim-ic.com FEATURES Temperature measurements require no external components Measures temperatures from -55 C to +125 C in 0.5 C increments. Fahrenheit equivalent is -67 F to 257 F in 0.9 F increments

More information

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

AVR311: Using the TWI Module as I2C Slave. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE AVR 8-bit Microcontrollers AVR311: Using the TWI Module as I2C Slave APPLICATION NOTE Introduction The Two-wire Serial Interface (TWI) is compatible with Philips I 2 C protocol. The bus allows simple,

More information

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

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction AVR317: Using the Master SPI Mode of the USART module Features Enables Two SPI buses in one device Hardware buffered SPI communication Polled communication example Interrupt-controlled communication example

More information

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

AVR315: Using the TWI Module as I2C Master. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE AVR 8-bit Microcontrollers AVR315: Using the TWI Module as I2C Master APPLICATION NOTE Introduction The Two-wire Serial Interface (TWI) is compatible with Philips I 2 C protocol. The bus allows simple,

More information

NB3H5150 I2C Programming Guide. I2C/SMBus Custom Configuration Application Note

NB3H5150 I2C Programming Guide. I2C/SMBus Custom Configuration Application Note NB3H550 I2C Programming Guide I2C/SMBus Custom Configuration Application Note 3/4/206 Table of Contents Introduction... 3 Overview Process of Configuring NB3H550 via I2C/SMBus... 3 Standard I2C Communication

More information

CAM-VGA100 User Manual

CAM-VGA100 User Manual CAM-VGA100 User Manual Release Note: 1. Jan 28, 2004 official released v1.0 2. Feb 24, 2004 official released v1.1 Fix the definition of verify code Fix the bug of unable jump to power save mode Fix the

More information

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II Data Cables Data cables link one instrument to another. Signals can attenuate or disperse on long wires. A direct wire works best for short cables of less than 10 ft. A TTL cable connection can use a Schmitt

More information

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

Hello, and welcome to this presentation of the STM32L4 reset and clock controller. Hello, and welcome to this presentation of the STM32L4 reset and clock controller. 1 The STM32L4 reset and clock controller manages system and peripheral clocks. STM32L4 devices embed three internal oscillators,

More information

Methode Electronics. DM-338-GG-XXXX Up to 120 Gbps CXP Passive Cable Assembly. www.methode.com

Methode Electronics. DM-338-GG-XXXX Up to 120 Gbps CXP Passive Cable Assembly. www.methode.com DM-338-GG-XXXX Up to 120 Gbps CXP Passive Cable Assembly Compliant with Infiniband Architecture Specification Annex 6 Hot-pluggable footprint Supports Serial ID (write protected) Robust Die Cast Housing

More information

Atmel Norway 2005. XMEGA Introduction

Atmel Norway 2005. XMEGA Introduction Atmel Norway 005 XMEGA Introduction XMEGA XMEGA targets Leadership on Peripheral Performance Leadership in Low Power Consumption Extending AVR market reach XMEGA AVR family 44-100 pin packages 16K 51K

More information

2.8.3 / (Z80 Serial I/O)

2.8.3 / (Z80 Serial I/O) 283 / (Z80 Serial I/O) 80 SIO 80 / 80 bit bit bit bit SIO! 80 " Z80 SIO 2 # $ % Z80 SIO & IBM bisync ( byte) HDLC, IBM SDLC ( bit) '! # & ( modem modem )/" ' Cyclic Redundancy Check (CRC) ( ) 2831 Z80

More information

Part Number Description Packages available

Part Number Description Packages available Features 3 digital I/O Serial Data output Connects directly to RF Modules Easy Enc / Dec Pairing Function Minimal External Components Required Performs all encoding/decoding of data for Reliable Operation.

More information

Cambridge IGCSE. www.cie.org.uk

Cambridge IGCSE. www.cie.org.uk Cambridge IGCSE About University of Cambridge International Examinations (CIE) Acerca de la Universidad de Cambridge Exámenes Internacionales. CIE examinations are taken in over 150 different countries

More information

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol

Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol RESEARCH ARTICLE OPEN ACCESS Interfacing Of PIC 18F252 Microcontroller with Real Time Clock via I2C Protocol Arnab G. Samanta (Electronics Design technology (EDT) department, R.C.O.E.M, RTM Nagpur University,

More information

Serial Communications / Protocol in AirTest Products

Serial Communications / Protocol in AirTest Products Serial Communications / Protocol in AirTest Products General The standard sensor has two different ways of serial communication with sensor s peripherals and the outside world. One is through the UART

More information

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE Atmel AVR 8-bit Microcontroller AVR151: Setup and Use of the SPI APPLICATION NOTE Introduction This application note describes how to set up and use the on-chip Serial Peripheral Interface (SPI) of the

More information

UM10204. I 2 C-bus specification and user manual. Document information

UM10204. I 2 C-bus specification and user manual. Document information Rev. 6 4 April 2014 User manual Document information Info Keywords Abstract Content I2C, I2C-bus, Standard-mode, Fast-mode, Fast-mode Plus, Fm+, Ultra Fast-mode, UFm, High Speed, Hs, inter-ic, SDA, SCL,

More information

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction AVR319: Using the USI module for SPI communication Features C-code driver for SPI master and slave Uses the USI module Supports SPI Mode 0 and 1 Introduction The Serial Peripheral Interface (SPI) allows

More information

Arbitration and Switching Between Bus Masters

Arbitration and Switching Between Bus Masters February 2010 Introduction Reference Design RD1067 Since the development of the system bus that allows multiple devices to communicate with one another through a common channel, bus arbitration has been

More information

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

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 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 the CPU to an SD card, MMC card, or an SDIO device.

More information

AN736. An I 2 C TM Network Protocol for Environmental Monitoring THE I 2 C BUS SPECIFICATION INTRODUCTION

AN736. An I 2 C TM Network Protocol for Environmental Monitoring THE I 2 C BUS SPECIFICATION INTRODUCTION An I 2 C TM Network Protocol for Environmental Monitoring Authors: INTRODUCTION Stephen Bowling, Richard L. Fischer Microchip Technology Incorporated Communication network systems are rapidly growing in

More information

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: 802.15.4 wireless embedded network

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: 802.15.4 wireless embedded network u Today: Wired embedded networks Ø Characteristics and requirements Ø Some embedded LANs SPI I2C LIN Ethernet u Next lecture: CAN bus u Then: 802.15.4 wireless embedded network Network from a High End

More information

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

4511 MODBUS RTU. Configuration Manual. HART transparent driver. No. 9107MCM100(1328) 4511 MODBUS RTU Configuration Manual HART transparent driver No. 9107MCM100(1328) 9107 CONTENTS Introduction... 3 Modbus basics... 3 Modbus RTU... 3 Supported Function Codes... 3 Modbus Parameters and

More information

LINIO COLOMBIA. Starting-Up & Leading E-Commerce. www.linio.com.co. Luca Ranaldi, CEO. Pedro Freire, VP Marketing and Business Development

LINIO COLOMBIA. Starting-Up & Leading E-Commerce. www.linio.com.co. Luca Ranaldi, CEO. Pedro Freire, VP Marketing and Business Development LINIO COLOMBIA Starting-Up & Leading E-Commerce Luca Ranaldi, CEO Pedro Freire, VP Marketing and Business Development 22 de Agosto 2013 www.linio.com.co QUÉ ES LINIO? Linio es la tienda online #1 en Colombia

More information

DIPLOMADO DE JAVA - OCA

DIPLOMADO DE JAVA - OCA DIPLOMADO DE JAVA - OCA TABLA DE CONTENIDO INTRODUCCION... 3 ESTRUCTURA DEL DIPLOMADO... 4 Nivel I:... 4 Fundamentals of the Java Programming Language Java SE 7... 4 Introducing the Java Technology...

More information

Modbus Protocol. PDF format version of the MODBUS Protocol. http://www.http://www.modicon.com/techpubs/toc7.html. The original was found at:

Modbus Protocol. PDF format version of the MODBUS Protocol. http://www.http://www.modicon.com/techpubs/toc7.html. The original was found at: Modbus Protocol PDF format version of the MODBUS Protocol The original was found at: http://www.http://www.modicon.com/techpubs/toc7.html (In case of any discrepancies, that version should be considered

More information

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

COMPUTER HARDWARE. Input- Output and Communication Memory Systems COMPUTER HARDWARE Input- Output and Communication Memory Systems Computer I/O I/O devices commonly found in Computer systems Keyboards Displays Printers Magnetic Drives Compact disk read only memory (CD-ROM)

More information

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board. Bus Interfaces Different types of buses: ISA (Industry Standard Architecture) EISA (Extended ISA) VESA (Video Electronics Standards Association, VL Bus) PCI (Periheral Component Interconnect) USB (Universal

More information

Application Note 83 Fundamentals of RS 232 Serial Communications

Application Note 83 Fundamentals of RS 232 Serial Communications Application Note 83 Fundamentals of Serial Communications Due to it s relative simplicity and low hardware overhead (as compared to parallel interfacing), serial communications is used extensively within

More information

MODBUS over Serial Line. Specification & Implementation guide V1.0

MODBUS over Serial Line. Specification & Implementation guide V1.0 MODBUS over Serial Line Specification & Implementation guide V1.0 Modbus.org http://www.modbus.org/ 1/44 Contents 1 Introduction...4 1.1 Scope of this document... 4 1.2 Protocol overview... 5 1.3 Conventions...

More information

The Secrets of RS-485 Half-duplex Communication

The Secrets of RS-485 Half-duplex Communication Communication Casper Yang, Senior Product Manager support@moxa.com RS-485 is a good choice for long distance serial communication since using differential transmission cancels out the vast majority of

More information

RS-485 Protocol Manual

RS-485 Protocol Manual RS-485 Protocol Manual Revision: 1.0 January 11, 2000 RS-485 Protocol Guidelines and Description Page i Table of Contents 1.0 COMMUNICATIONS BUS OVERVIEW... 1 2.0 DESIGN GUIDELINES... 1 2.1 Hardware Design

More information

Data sheet Wireless UART firmware version 4.02

Data sheet Wireless UART firmware version 4.02 Data sheet Wireless UART firmware version 4.02 BLUETOOTH is a trademark owned by Bluetooth SIG, Inc., U.S.A. and licensed to Free2move Rev: 22 December 2008 Table of contents 1 GENERAL INFORMATION...4

More information

ModBus Server - KNX. Gateway for integration of KNX equipment into Modbus (RTU and TCP) control systems.

ModBus Server - KNX. Gateway for integration of KNX equipment into Modbus (RTU and TCP) control systems. IntesisBox ModBus Server - KNX Gateway for integration of KNX equipment into Modbus (RTU and TCP) control systems. Integrate KNX based lighting control into your SCADA, BMS, PLC "talking" Modbus. Master

More information

Fecha: 04/12/2010. New standard treatment for breast cancer at early stages established

Fecha: 04/12/2010. New standard treatment for breast cancer at early stages established New standard treatment for breast cancer at early stages established London December 04, 2010 12:01:13 AM IST Spanish Oncology has established a new standard treatment for breast cancer at early stages,

More information

PMC-XM-DIFF & EADIN/MODBUS Virtex Design

PMC-XM-DIFF & EADIN/MODBUS Virtex Design DYNAMIC ENGINEERING 150 DuBois, Suite C Santa Cruz, CA 95060 (831) 457-8891 Fax (831) 457-4793 http://www.dyneng.com sales@dyneng.com Est. 1988 User Manual PMC-XM-DIFF & EADIN/MODBUS Virtex Design Interface

More information

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester Leonardo Journal of Sciences ISSN 1583-0233 Issue 20, January-June 2012 p. 31-36 Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester Ganesh Sunil NHIVEKAR *, and Ravidra Ramchandra MUDHOLKAR

More information

Introduction to. LIN (Local Interconnect Network)

Introduction to. LIN (Local Interconnect Network) Introduction to LIN (Local Interconnect Network) Stéphane REY Revision 1.0 - ay 13 th, 2003 Table of content 1 INTRODUCTION...3 1.1 PURPOSE OF THE DOCUENT...3 1.2 ACRONYOUS...3 1.3 RELATED DOCUENTS...3

More information

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

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide Parallel Data Transfer Suppose you need to transfer data from one HCS12 to another. How can you

More information

Section 14. Compare/Capture/PWM (CCP)

Section 14. Compare/Capture/PWM (CCP) M Section 14. Compare/Capture/PWM (CCP) HIGHLIGHTS This section of the manual contains the following major topics: 14.1 Introduction...14-2 14.2 Control Register...14-3 14.3 Capture Mode...14-4 14.4 Compare

More information

IBM PureSystems: Familia de Sistemas Expertos Integrados

IBM PureSystems: Familia de Sistemas Expertos Integrados IBM PureSystems: Familia de Sistemas Expertos Integrados Carlos Etchart Sales Support Specialist IBM Está IT listo para el Cambio? New server spending Power & cooling costs Server mgmt & admin costs 2013

More information

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:

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: PS-2 Mouse: The Protocol: For out mini project we designed a serial port transmitter receiver, which uses the Baud rate protocol. The PS-2 port is similar to the serial port (performs the function of transmitting

More information

DIFFERENTIATIONS OF OBJECTS IN DIFFUSE DATABASES DIFERENCIACIONES DE OBJETOS EN BASES DE DATOS DIFUSAS

DIFFERENTIATIONS OF OBJECTS IN DIFFUSE DATABASES DIFERENCIACIONES DE OBJETOS EN BASES DE DATOS DIFUSAS Recibido: 01 de agosto de 2012 Aceptado: 23 de octubre de 2012 DIFFERENTIATIONS OF OBJECTS IN DIFFUSE DATABASES DIFERENCIACIONES DE OBJETOS EN BASES DE DATOS DIFUSAS PhD. Amaury Caballero*; PhD. Gabriel

More information

Implementing MOD bus and CAN bus Protocol Conversion Interface

Implementing MOD bus and CAN bus Protocol Conversion Interface Implementing MOD bus and CAN bus Protocol Conversion Interface Umesh Goyal, Gaurav Khurana M.E., Electronics & Electrical Communications Department, PEC University of Technology, India M.E., Electronics

More information

Level 2 Spanish, 2012

Level 2 Spanish, 2012 91148 911480 2SUPERVISOR S Level 2 Spanish, 2012 91148 Demonstrate understanding of a variety of spoken Spanish texts on familiar matters 2.00 pm Tuesday 20 November 2012 Credits: Five Achievement Achievement

More information

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme 2015 - Alle Rechte vorbehalten

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme 2015 - Alle Rechte vorbehalten ALL-USB-RS422/485 USB to Serial Converter RS422/485 User Manual ALL-USB-RS422/485 USB to RS-422/485 Plugin Adapter This mini ALL-USB-RS422/485 is a surge and static protected USB to RS-422/485 Plugin Adapter.

More information

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

2.1 CAN Bit Structure The Nominal Bit Rate of the network is uniform throughout the network and is given by: Order this document by /D CAN Bit Timing Requirements by Stuart Robb East Kilbride, Scotland. 1 Introduction 2 CAN Bit Timing Overview The Controller Area Network (CAN) is a serial, asynchronous, multi-master

More information

www.imprezer.tk Introduction to www.union88.tk RACE FUELS Hans-Christian von der Wense Munich, Germany

www.imprezer.tk Introduction to www.union88.tk RACE FUELS Hans-Christian von der Wense Munich, Germany Introduction to Hans-Christian von der Wense Munich, Germany Overview Progress in Automotive Electronics and it s Impacts on Networking LIN Consortium LIN Concept Physical Layer Data Link Layer LIN Network

More information

Verbos modales. In this class we look at modal verbs, which can be a tricky feature of English grammar.

Verbos modales. In this class we look at modal verbs, which can be a tricky feature of English grammar. Verbos modales In this class we look at modal verbs, which can be a tricky feature of English grammar. We use Modal verbs in English to show: Probability,Possibility, Capability, Permission, ObligaCon,

More information

ENVIRONMENT: Collaborative Learning Environment

ENVIRONMENT: Collaborative Learning Environment Guía Integrada de Actividades Contexto de la estrategia de aprendizaje a desarrollar en el curso: The activity focuses on the Task Based Language Learning (TBLL). The task is used by the student in order

More information

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

Bluetooth Audio Data Transfer between Bluetooth chipset (PMB6752&PMB6625) and TriCore Host TC1920 Application Note, v1.0, 2001-10 Bluetooth Audio Data Transfer between Bluetooth chipset (PMB6752&PMB6625) and TriCore Host TC1920 Abstract The paper describes the interfaces and the handling of Audio Data

More information

New Server Installation. Revisión: 13/10/2014

New Server Installation. Revisión: 13/10/2014 Revisión: 13/10/2014 I Contenido Parte I Introduction 1 Parte II Opening Ports 3 1 Access to the... 3 Advanced Security Firewall 2 Opening ports... 5 Parte III Create & Share Repositorio folder 8 1 Create

More information

Appendix A. This Appendix includes the following supplemental material:

Appendix A. This Appendix includes the following supplemental material: Appendix A This Appendix includes the following supplemental material: Cabling Diagrams and Instructions Connectors (9-pin D-type) Data Transfer Protocols Usage/Handshaking Ultimax Dual Screen Console

More information

The Programming Interface

The Programming Interface : In-System Programming Features Program any AVR MCU In-System Reprogram both data Flash and parameter EEPROM memories Eliminate sockets Simple -wire SPI programming interface Introduction In-System programming

More information

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS AVR1309: Using the XMEGA SPI Features Introduction to SPI and the XMEGA SPI module Setup and use of the XMEGA SPI module Implementation of module drivers Polled master Interrupt controlled master Polled

More information