7 - 1 Texas Instruments Incorporated Module 7 : Serial Peripheral Interface C28x 32-Bit-Digital Signal Controller TMS320F2812.

Slides:



Advertisements
Similar presentations
EUSART Serial Communication.
Advertisements

Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
ECT 357 Ch 18 UART. Today’s Quote: Be careful that your marriage doesn’t become a duel instead of a duet. Be careful that your marriage doesn’t become.
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Direct Memory Access Introduction to 8237
Texas Instruments Incorporated Module 13 : C28x BOOT – ROM 32-Bit-Digital Signal Controller TMS320F2812.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Introduction of Holtek HT-46 series MCU
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
Serial Peripheral Interface (SPI)
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
Chapter 10 Input/Output Interface Circuits and LSI Peripheral Devices
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Multichannel Serial Port Interface (McSPI)
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
The 8253 Programmable Interval Timer
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
AT91 Embedded Peripherals
Universal Asynchronous Receiver/Transmitter (UART)
Microprocessors 2 lesson Subjects lesson 7 Planning Interrupts Serial communication /USART Questions.
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
NS Training Hardware. Serial Controller - UART.
8279 KEYBOARD AND DISPLAY INTERFACING
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Features of the new Alibava firmware: 1. Universal for laboratory use (readout of stand-alone detector via USB interface) and for the telescope readout.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
8 - 1 Texas Instruments Incorporated European Customer Training Centre University of Applied Sciences Zwickau (FH) Module 8 : Serial Communication Interface.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
RX Serial Peripheral Interface (RSPI)
Module 11 Adapted By and Prepared James Tan © 2001.
Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
32-Bit-Digital Signal Controller Texas Instruments Incorporated
8279 KEYBOARD AND DISPLAY INTERFACING
1 MPC 555: Queued Serial Module. 2 MPC 555 QSM QSPI: Queued Serial Peripheral Interface: full duplex serial, synchronous interface. 160B of queue RAM.
8255:Programmable Peripheral Interface
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
Genova May 2013 Diego Real – David Calvo IFIC (CSIC – Universidad de Valencia) CLBv2 1.
박 유 진.  Short RF Range(~10m)  Reduce range by obstruction  Low data rate(1Mbps)  Normal Audio data rate : 1.5 Mbps  CD Quality Audio data rate :
8251 USART.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
The HCS12 SCI Subsystem A HCS12 device may have one or two serial communication interface. These two SCI interfaces are referred to as SCI0 and SCI1. The.
ECE 382 Lesson 15 Lesson Outline S/W Delays Wrap up
Serial Communication Buses: I2C and SPI
Tutorial Introduction
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Chapter 6 General Purpose Input/Output
Two Wire Interface (TWI)
SPI Protocol and DAC Interfacing
I2C PROTOCOL SPECIFICATION
SPI Protocol and DAC Interfacing
SPI Protocol and DAC Interfacing
Serial Communication Interface: Using 8251
SPI Protocol and DAC Interfacing
NS Training Hardware.
Programmable Data Communication Blocks
AVR – ATmega103(ATMEL) Architecture & Summary
EUSART Serial Communication.
Serial Communication 19th Han Seung Uk.
Presentation transcript:

7 - 1 Texas Instruments Incorporated Module 7 : Serial Peripheral Interface C28x 32-Bit-Digital Signal Controller TMS320F2812

7 - 2 SPI Data Flow SPI Shift Register SPI Device #1 - MasterSPI Device #2 - Slave  Simultaneous transmits and receive  SPI Master provides the clock signal shift clock

7 - 3 SPI Block Diagram SPIRXBUF.15-0 SPIDAT.15-0 SPICLK SPISOMI SPISIMO LSPCLK baud rate clock polarity clock phase C28x - SPI Master Mode Shown SPITXBUF.15-0 LSB MSB TX FIFO_0 TX FIFO_15 RX FIFO_0 RX FIFO_15

7 - 4 SPI Data Character Justification  Programmable data length of 1 to 16 bits  Transmitted data of less than 16 bits must be left justified  MSB transmitted first  Received data of less than 16 bits are right justified  User software must mask- off unused MSB’s XXXXXXXX XXXXXXXX SPIDAT - Processor #1 SPIDAT - Processor #2

7 - 5 SPI-A Registers AddressRegisterName 0x007040SPICCRSPI-A configuration control register 0x007041SPICTLSPI-A operation control register 0x007042SPISTSSPI-A status register 0x007044SPIBRRSPI-A baud rate register 0x007046SPIEMUSPI-A emulation buffer register 0x007047SPIRXBUFSPI-A serial receive buffer register 0x007048SPITXBUFSPI-A serial transmit buffer register 0x007049SPIDATSPI-A serial data register 0x00704ASPIFFTXSPI-A FIFO transmit register 0x00704BSPIFFRXSPI-A FIFO receive register 0x00704CSPIFFCTSPI-A FIFO control register 0x00704FSPIPRISPI-A priority control register

7 - 6 SPI-A Configuration Control Register 0x reserved SPI CHAR.3-0 character length = number + 1 e.g.0000b  length = b  length = 16 SPI SW RESET 0 = SPI flags reset 1 = normal operation CLOCK POLARITY 0 = rising edge data transfer 1 = falling edge data transfer reserved

7 - 7 SPI-A Operation Control Register 0x reserved CLOCK PHASE 0 = no CLK delay 1 = CLK delayed 1/2 cycle OVERRUN INT ENABLE 0 = disabled 1 = enabled MASTER/SLAVE 0 = slave 1 = master TALK 0 = transmission disabled, output pin hi-Z’d 1 = transmission enabled SPI INT ENABLE 0 = disabled 1 = enabled

7 - 8 SPI-A Baud Rate Register 0x reserved SPI BIT RATE SPICLK signal = LSPCLK (SPIBRR + 1) LSPCLK 4,SPIBRR = 3 to 127,SPIBRR = 0, 1, or 2 Need to set this only when in master mode!

7 - 9 SPI-A Status Register 0x SPI INT FLAG (read only) Set to 1 when transfer completed Interrupt requested if SPI INT ENA bit set (SPICTL.0) Cleared by reading SPIBRXUF RECEIVER OVERRUN (read/clear only) Set to 1 if next reception completes before SPIRXBUF read Interrupt requested if OVERRUN INT ENA bit set (SPICTL.4) Cleared by writing a 1 reserved 15-8 TX BUF FULL (read only) Set to 1 when char written to SPITXBUF Cleared when char in SPIDAT 5

SPI-A FIFO Transmit Register 0x00704A 0 TXFFIL2 SPIFFENTXFFST0TXFFST3 TXFFIEN TXFFIL0TXFFIL1TXFFIL4TXFFIL3 TXFFST1 TXFFINT CLR TXFFST2 TXFFINT TXFFST4 TXFIFO RESET reserved TX FIFO Status (read-only) 00000TX FIFO empty 00001TX FIFO has 1 word 00010TX FIFO has 2 words 00011TX FIFO has 3 words 10000TX FIFO has 16 words TX FIFO Interrupt Level Interrupt when TXFFST4-0 and TXFFIL4-0 match SPI FIFO Enhancements 0 = disable 1 = enable TX FIFO Reset 0 = reset (pointer to 0) 1 = enable operation TX FIFO Interrupt (on match) Enable 0 = disable 1 = enable TX FIFO Interrupt Flag (read-only) 0 = not occurred 1 = occurred TX FIFO Interrupt Flag Clear 0 = no effect 1 = clear

SPI-A FIFO Receive Register 0x00704B 0 RXFFIL2 RXFF- OVF CLR RXFFST0RXFFST3 RXFFIEN RXFFIL0RXFFIL1RXFFIL4RXFFIL3 RXFFST1 RXFFINT CLR RXFFST2 RXFFINT RXFFST4 RXFIFO RESET RXFF- OVF RX FIFO Status (read-only) 00000RX FIFO empty 00001RX FIFO has 1 word 00010RX FIFO has 2 words 00011RX FIFO has 3 words 10000RX FIFO has 16 words RX FIFO Interrupt Level Interrupt when RXFFST4-0 and RXFFIL4-0 match RX FIFO Reset 0 = reset (pointer to 0) 1 = enable operation RX FIFO Interrupt (on match) Enable 0 = disable 1 = enable RX FIFO Interrupt Flag (read-only) 0 = not occurred 1 = occurred RX FIFO Interrupt Flag Clear 0 = no effect 1 = clear RX FIFO Overflow Flag (read-only) 0 = no overflow 1 = overflow RX FIFO Overflow Flag Clear 0 = no effect 1 = clear

SPI Summary  Provides synchronous serial communications  Two wire transmit or receive (half duplex)  Three wire transmit and receive (full duplex)  Software configurable as master or slave  C28x provides clock signal in master mode  Data length programmable from 1-16 bits  125 different programmable baud rates

SPI Example 1: DAC TLV 5617  Texas Instruments Digital to Analogue Converter (DAC) TLV 5617A  10 MBPS SPI Data Communication  Dual Channel Analogue Output ( Out A + B)  10 Bit resolution  /CS is connected to C28x GPIO – D0 at the Zwickau Adapter Board  REF – Voltage defines Analogue Range / 2  SOIC-8  Operating Voltage : 0 to 3.3V

SPI Example : DAC TLV 5617  Timing Diagram: © Texas Instruments SLAS234F – JULY 1999 – REVISED JULY 2002 ; page 6

SPI Example : DAC TLV 5617  Serial Data Format: 0 DATA0 SPDDATA6DATA9 DATA DATA2DATA1 DATA7 DATA4 DATA8 DATA5 R0PWRR1 SPD Speed Control 0 = slow mode 1 = fast mode PWR Power Control 0 = normal operation 1 = power down R1, R0 Register Select 00:Write to DACB and Buffer 01:Write to Buffer 10: Write to DACA and update DACB with Buffer 11: reserved

Lab 7: DAC TLV 5617  Objective:  Generate a rising saw-tooth (0V…3.3V) at channel OUTA and a falling saw-tooth (3.3V…0V)at channel OUTB  GPIO – D0 is DAC’s chip select (/CS) at the Zwickau Adapter Board  To measure the DAC outputs:  Use JP7 for OUTA  Use JP8 for OUTB ( Zwickau Adapter Board)  REF = 3.3V  Feedback the voltages into the C28x ADC:  JP7 closed: OUTA  ADCINA1  JP8 closed: OUTB  ADCINB1

SPI Example 2: EEPROM M95080  ST Microelectronics EEPROM M95080  10 MBPS SPI Data Communication  Capacity: 1024 x 8 Bit  /CS is connected to C28x GPIO – D5 (Zwickau Adapter Board)  6 Instructions:  Write Enable, Write Disable  Read Status Register, Write Status Register  Read Data, Write Data  SOIC-8  Single Power Supply : 3.3V

SPI Example : EEPROM M95080  Timing Diagram: © ST Microelectronics Datasheet M95080 – November 2002, page 4

SPI Example : EEPROM M = no protection 01 = 0x300 – 0x3FF protected 10 = 0x200 – 0x3FF protected 11 = 0x000 – 0x3FF protected Status Register Write Protect 1 = no write access to SR 0 = normal operation Write in progress 0 = no write cycle 1 = write in progress  M95080 Status Register: Write Enable Latch 0 = write disabled 1 = write enabled WIPWELBP0SRWD00BP10 Block protect select

SPI Example : EEPROM M95080  M95080 Instruction Set: InstructionDescriptionCode WREN Write Enable WRDI Write Disable E Read Status Register WDSR Write Status Register READ Read Data WRITE Write Data

SPI Example : EEPROM M95080  Timing Diagram WREN: © ST Microelectronics ; Datasheet (8028.pdf) – November 2002; Page 8

SPI Example : EEPROM M95080  Timing Diagram RDSR: © ST Microelectronics ; Datasheet (8028.pdf) – November 2002; Page 10

SPI Example : EEPROM M95080  Timing Diagram READ: © ST Microelectronics ; Datasheet (8028.pdf) – November 2002; Page 13

SPI Example : EEPROM M95080  Timing Diagram WRITE: © ST Microelectronics ; Datasheet (8028.pdf) – November 2002; Page 14

Lab 7B: EEPROM M95080  Objective:  Based on hardware of Zwickau Adapter Board  Store the value of 8 input switches (GPIO – B15…B8) into EEPROM – Address 0x40 when command input button GPIO-D1 is pressed (low active).  Read EEPROM-Address 0x40 and show its content on 8 LED’s ( GPIO-B7…B0) when command input button GPIO-D6 is pressed (low active).  GPIO – D5 is EEPROM’s chip select (/CS) at the Zwickau Adapter Board