SPI Protocol and DAC Interfacing

Slides:



Advertisements
Similar presentations
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Advertisements

Programmable Interval Timer
Oscilloscope Watch Teardown. Agenda History and General overview Hardware design: – Block diagram and general overview – Choice of the microcontroller.
Serial Communication Interface (SCI) Kevin Stuart Matt Betts March 27, 2007 ME 6405, Sp 07.
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.
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
AT91 Embedded Peripherals
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
TRIO-CINEMA 1 UCB, 2/08/2010 Cinema Stein Interface FPGA (CSI) [Part II] Karthik Lakshmanan CINEMA - EE Team Space Sciences Laboratory University of California,
7 - 1 Texas Instruments Incorporated Module 7 : Serial Peripheral Interface C28x 32-Bit-Digital Signal Controller TMS320F2812.
RX Serial Peripheral Interface (RSPI)
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
SCI Communication Proudly Presented By: Adam Cardi & Aaron Enes.
1 The LPC1768 Architecture (with focus on Cortex-M3)
 The LPC2xxx devices currently have two on- chip UARTS.  Except UART1 has additional modem support.
Application Case Study Christmas Lights Controller
Study Report for Brushless DC (BLDC) Motors
Class Exercise 1B.
I2C Protocol and RTC Interfacing
TI ARM I/O Programming Chapter 2
Two Wire Interface Another popular serial peripheral interface bus
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Refer to Chapter 16 in the reference book
Figure SPI Single-Byte Write Timing (Notice A7 = 1)
Introduction An interrupt is an event which informs the CPU that its service (action) is needed. Sources of interrupts: Internal fault (e.g.. divide by.
Chapter 11: Inter-Integrated Circuit (I2C) Interface
Refer to Chapter 10 in the reference book
General Purpose I/O.
NS Training Hardware.
COMP2121: Microprocessors and Interfacing
Programmable Interval Timer
Two Wire Interface (TWI)
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
ADC, DAC, and Sensor Interfacing
SERIAL PERIPHERAL INTERFACE
SPI Protocol and DAC Interfacing
I2C Protocol and RTC Interfacing
ADC, DAC, and Sensor Interfacing
..
Interrupt and Exception Programming
This chapter provides a series of applications.
SPI Protocol and DAC Interfacing
UART Serial Port Programming
SPI Protocol and DAC Interfacing
8255.
Atmel ARM Timer Programming
UART Serial Port Programming
Serial Communication Interface: Using 8251
8086 Ahad.
SPI Protocol and DAC Interfacing
Programmable Interval timer 8253 / 8254
I2C Protocol and RTC Interfacing
NS Training Hardware.
Keyboard/Display Controller (8279)
Programmable Interval timer 8253 / 8254
Programmable Peripheral Interface
Programmable Data Communication Blocks
AVR – ATmega103(ATMEL) Architecture & Summary
FIGURE 1: SERIAL ADDER BLOCK DIAGRAM
I2C Protocol and RTC Interfacing
SPI Protocol and Programming
EUSART Serial Communication.
Programmable Interrupt Controller (PIC)
I2C and DAC Interfacing and Programming
Figure Serial versus Parallel Data Transfer
The Programmable Peripheral Interface (8255A)
Presentation transcript:

SPI Protocol and DAC Interfacing Chapter 8 SPI Protocol and DAC Interfacing

SPI Bus vs. Traditional Parallel Bus Connection to Microcontroller

SPI Architecture

SPI Clock Polarity and phase

SPI Clock Polarity and phase Data read and change time SPI Mode read on falling edge, changed on a rising edge 1 read on rising edge, changed on a falling edge 2 3

SSI Module Base Address 0x40008000 SSI1 0x40009000 SSI2 0x4000A000 SSI3 0x4000B000

RCGCSSI, Offset 0x61C

SSICR0, Offset 0

eUSCI Registers Bits Name Function Description 0-3 DSS SSI Data Size Select 0x03 to 0x0F for 4-bit to 16-bit data size 0x07 means 8-bit data size 4-5 FRF SSI Frame Format Select 0 for SPI, 1 for TI, and 2 for MICROWIRE frame format 6 SPO SSI Serial Clock Polarity Clock polarity 7 SPH SSI Serial Clock Phase Clock phase 8-15 SCR SSI Serial Clock Rate BR=SysClk/(CPSDVSR * (1 + SCR))

Bit Rate selection

Register 5, SSI Clock Prescale (SSICPSR), offset 0x010

Register 2, SSI Control 1 (SSICR1), offset 0x004

SSIDR register

Register 3, SSI Data (SSIDR), offset 0x008

Register 4, SSI Status (SSISR), offset 0x00C

SSI Status (SSISR) Bits Name Function Description TFE TFE SSI Transmit FIFO Empty The bit is 1 when the transmit FIFO is empty 1 TNF SSI Transmit FIFO Not Full The bit is 1 when the SSI transmit FIFO not full 2 RNE SSI Receive FIFO Not Empty The bit is 1 when the receive FIFO is not empty 3 RFF SSI Receive FIFO Full The bit is 1 when the receive FIFO is full 4 BSY SSI Busy Bit The bit is 1 when the SSI is currently transmitting or receiving

GPIO Pin Assignment for all 4 SSI Modules SSI Module Pin GPIO Pin SSI0Clk PA2 SSI2Clk PB4 SSI0Fss PA3 SSI2Fss PB5 SSI0Rx PA4 SSI2Rx PB6 SSI0Tx PA5 SSI2TX PB7 SSI1Clk PD0 or PF2 SSI3Clk PD0 SSI1Fss PD1 or PF3 SSI3Fss PD1 SSI1Rx PD2 or PF0 SSI3Rx PD2 SSI1TX PD3 or PF1 SSI3TX PD3

Register 6, SSIIM

Register 6, SSIIM Bits Name Function Description RORIM RORIM SSI Receive Overrun Interrupt Mask The receive FIFO overrun interrupt is masked when RORIM is zero and not masked when it is one 1 RTIM SSI Receive Time-Out Interrupt Mask The receive FIFO time-out interrupt is masked when RTIM is zero and not masked when it is one 2 RXIM SSI Receive FIFO Interrupt Mask The receive FIFO interrupt is masked when RXIM is zero and not masked when it is one 3 TXIM SSI Transmit FIFO Interrupt Mask The transmit FIFO interrupt is masked when TXIM is zero and not masked when it is one

LTC1661 Internal Block Diagram

Sending a Packet of Data to LTC166x

LTC1661 DAC Control Functions A3 A2 A1 A0 Interrupt Register DAC Register Power Down Status Comments 0 0 0 0 No Change No Update No operation. power-down status unchanged 0 0 0 1 Load DAC A Load input register A with data. DAC outputs unchanged. power-down Status unchanged 0 0 1 0 Load DAC B Load input register B with data. DAC outputs unchanged. power-down status unchanged 0 0 1 1 - Reserved 0 1 0 0 0 1 0 1

LTC1661 DAC Control Functions (Cont.) A3 A2 A1 A0 Interrupt Register DAC Register Power Down Status Comments 0 1 1 0 - Reserved 0 1 1 1 1 0 0 0 No Change Update Outputs Wake Load both DAC Regs with existing contents of input Regs. Outputs update. Part wakes up 1 0 0 1 Load DAC A Load input Reg A. Load DAC Regs with new contents of input Reg A and existing contents of Reg B. Outputs update. 1 0 1 0 Load DAC B Load input Reg B. Load DAC Regs with existing contentsof input Reg A and new contents of Reg B. Outputs update

LTC1661 DAC Control Functions (Cont.) A3 A2 A1 A0 Interrupt Register DAC Register Power Down Status Comments 1 0 1 1 - Reserved 1 1 0 0 1 1 0 1 No Change No Update Wake Part wakes up. Input and DAC Regs unchanged. DAC outputs reflect existing contents of DAC Regs 1 1 1 0 Sleep Part goes to sleep. Input and DAC Regs unchanged. DAC outputs set to high impedance state 1 1 1 1 Load ADCs A, B with same 10-bit code Update Outputs Load both input Regs. Load both DAC Regs with new contents of input Regs. Outputs update. Part wakes up

Connecting LTC1661 to the Microcontroller

The Generated sawTooth waveform