MSP430G2553 launchpad and MPU6050 Introduction

Slides:



Advertisements
Similar presentations
Chapter 14 Communications Introduction
Advertisements

EUSART Serial Communication.
I2C bus Inter Integrated Circuits bus by Philips Semiconductors
INPUT-OUTPUT ORGANIZATION
Serial Communications (Chapter 10)
Review: Interrupts & Timers
ECE 2211 Microprocessor and Interfacing Chapter 8 The 8088/8086 Microprocessors and their memory and I/O interfaces Br. Athaur Rahman Bin Najeeb Room.
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.
Lecture 8: Serial Interfaces
Confidentiality/date line: 13pt Arial Regular, white Maximum length: 1 line Information separated by vertical strokes, with two spaces on either side Disclaimer.
Starting with serial Chapter Ten 10.1, 10.2,
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
I2CI2C CS-423 Dick Steflik. Inter-Integrated Circuit Developed and patented by Philips for connecting low speed peripherals to a motherboard, embedded.
Chapter 6 Serial Communications Objectives Introduce the RS232 standard and position it within the crowded field of serial communications standards. Configure.
Embedded Systems UNIT 3. Pin Details of 8051 Pins 1-8: Port 1 Each of these pins can be configured as an input or an output. Pin 9: The positive voltage.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
UBI >> Contents Chapter 14 Communications USI Module MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis.
Lecture 27: LM3S9B96 Microcontroller – Inter- Integrated Circuit (I 2 C) Interface.
Team Members Jordan Bennett Kyle Schultz Min Jae Lee Kevin Yeh.
INPUT-OUTPUT ORGANIZATION
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
4.0 rtos implementation part II
Digilent System Board Capabilities Serial Port (RS-232) Parallel Port 1 Pushbutton Hint: Good for a reset button Connected to a clock input. See Digilent.
S4525A Peripherals & Enhanced FLASH 1 © 1999 Microchip Technology Incorporated. All Rights Reserved. S4525A Peripherals & Enhanced FLASH 1 Peripherals.
1 SERIAL PORT INTERFACE FOR MICROCONTROLLER EMBEDDED INTO INTEGRATED POWER METER Mr. Borisav Jovanović, Prof.dr Predrag Petković, Prof.dr. Milunka Damnjanović,
Lecture Set 9 MCS-51 Serial Port.
Universal Synchronous/Asynchronous Receiver/Transmitter (USART)
“Describe the overview of hardware interfacing and the serial communication interface. Describe the PIC18 connections to RS232. Explain the serial port.
Example. SBUF Register SCON Register(1) SCON Register(2)
 8251A is a USART (Universal Synchronous Asynchronous Receiver Transmitter) for serial data communication.  Programmable peripheral designed for synchronous.
智慧電子應用設計導論(1/3) Arduino MEGA 2560
Serial Communications Interface Module Slide #1 of 19 MC68HC908GP20 Training PURPOSE -To explain how to configure and use the Serial Communications Interface.
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
Aum Amriteswaryai Namah:. PIN DIAGRAM WW hen two processors are to communicate, more often the communication is organized in a bit serial fashion The.
Chapter Microcontroller
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Embedded Communication Protocols Don Heer 10/18/10 1.
UBI >> Contents Lecture 11 Communications Introduction & USI Module MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior.
8251 USART.
Tiva C TM4C123GH6PM UART Embedded Systems ECE 4437 Fall 2015 Team 2:
Chapter 4 UART Serial Port Programming 1. Serial vs. Parallel Data Transfer 2.
 The LPC2xxx devices currently have two on- chip UARTS.  Except UART1 has additional modem support.
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.
NFC Sensor System ECE Winter 2015
UNIT 24 I2C Test 로봇 SW 교육원 조용수.
Introduction to MSP430G2553 and MPU6050
Serial mode of data transfer
ECE 382 Lesson 15 Lesson Outline S/W Delays Wrap up
I2C Protocol and RTC Interfacing
EMBEDDED SYSTEMS UNIT 4.
Source: Serial Port Source:
ROOM OCCUPANCY INDICATOR
SERIAL PORT PROGRAMMING
SPI Protocol and DAC Interfacing
Serial Communication: RS-232 (IEEE Standard)
Introduction to Micro Controllers & Embedded System Design I/O Processing and Serial Port Operation Department of Electrical & Computer Engineering Missouri.
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
Source: Serial Port Source:
Instruction cycle Instruction: A command given to the microprocessor to perform an operation Program : A set of instructions given in a sequential.
8251A UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER
Serial Communication Interface
NS Training Hardware.
Source: Serial Port Source:
EUSART Serial Communication.
Serial Communication 19th Han Seung Uk.
Prof Afonso Ferreira Miguel
Source: Serial Port Source:
PIC Serial Port Interfacing
Presentation transcript:

MSP430G2553 launchpad and MPU6050 Introduction ----Liqiang Du(EE MS)

MSP430 figure

MSP430 pin figure

MPU6050 module VCC and GND for power supply:3-5v SCL and SDA for I2C communication with MSP430 XCL and XDA to connect magnetic sensor

USCI I2C Mode Figure : I2C Bus Connection Diagram The two pull up resistor is necessary for I2C mode to work properly

I2C data transfer Figure : I2C Module Data Transfer The first byte after a START condition consists of a 7-bit slave address and the R/W bit. When R/W = 0, the master transmits data to a slave. When R/W = 1, the master receives data from a slave. The ACK bit is sent from the receiver after each byte on the 9th SCL clock.

I2C initialization code void Init_i2c(uint8_t devAddr) { UCB0CTL1 |= UCSWRST; // Enable SW reset UCB0CTL0 = UCMST + UCMODE_3 + UCSYNC; // I2C Master, synchronous mode UCB0CTL1 = UCSSEL_2 + UCSWRST; // Use SMCLK, keep SW reset UCB0BR0 = 10; // fSCL = 1Mhz/10 = ~100kHz UCB0BR1 = 0; P1SEL = BIT6 + BIT7; // Assign I2C pins to USCI_B0 P1SEL2 = BIT6 + BIT7; // Assign I2C pins to USCI_B0 UCB0I2CSA = devAddr; // Slave Address is 069h UCB0CTL1 &= ~UCSWRST; // **Initialize USCI state machine** IE2 |= UCB0RXIE + UCB0TXIE; // Enable RX and TX interrupt }

I2C Module Operating Modes Transmitter Master Receiver I2C Transmitter Slave Receiver

USCI UART Mode In asynchronous mode, the USCI_Ax modules connect the MSP430 to an external system via two external pins, UCAxRXD and UCAxTXD. UART mode is selected when the UCSYNC bit is cleared. In UART mode, the USCI transmits and receives characters at a bit rate asynchronous to another device. Timing for each character is based on the selected baud rate of the USCI. The transmit and receive functions use the same baud rate frequency.

UART initialization code void initUart(void) { UCA0CTL1 |= UCSSEL_2; // Use SMCLK UCA0BR0 = 104; // 1MHz 9600 UCA0BR1 = 0; // 1MHz 9600 UCA0MCTL = UCBRS0; // Modulation UCBRSx = 1 P1SEL = BIT1 + BIT2 ; // P1.1 = RXD, P1.2=TXD P1SEL2 = BIT1 + BIT2 ; // P1.1 = RXD, P1.2=TXD UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine** IE2 |= UCA0TXIE; }

Shopping information MSP430G2 $9.99 MPU6050 $5.75 https://estore.ti.com/MSP-EXP430G2-MSP430-LaunchPad-Value-Line-Development-kit-P2031.aspx MPU6050 $5.75 http://www.ebay.com/itm/MPU-6050-3-Axis-Accelerometer-Sensor-Gyroscope-6DOF-Module-3-3V-5V-For-Arduino-/161108492494?pt=LH_DefaultDomain_0&hash=item2582d080ce