Shop OBEX P1 Docs P2 Docs Learn Events
L2G4200D communicating with MSP430G4252. — Parallax Forums

L2G4200D communicating with MSP430G4252.

viniciusantonioviniciusantonio Posts: 1
edited 2013-03-07 21:24 in Accessories
Dear Sirs,


I'm trying to do the communication gyroscope co MSP430G2452 microcontroller using SPI.


Looking at some of the documentation gyroscope saw he reaches up to 10 Mhz


The configuration of the microcontroller clock must also be configured in 10Mhz?


Is there a problem if the clock of the microcontroller is below 10Mhz?


Thank you,


Vinicius

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-03-07 20:46
    The L2G4200D doesn't seem to have a minimum SPI clock speed. There may be minimum widths for the SPI clock pulses. You'll have to look through the L2G4200D datasheet for that, but I suspect that it will accept a wide range of pulse widths and speeds.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-03-07 21:24
    You can run the msp430 at 1mhz and 1/16 of that clock for spi just fine.

    bis.b #USIPE7+USIPE6+USIPE5+USIMST+USIOE,&USICTL0 ; P1.5,6,7 SPI master
    mov.b #USIDIV_4+USISSEL_2,&USICKCTL ; /16 SMCLK
    bic.b #USISWRST,&USICTL0 ; Enable USI

    Probably should add this too, as TI's defult is not the same as Motorola's
    bis.b #USIIE+USICKPH,&USICTL1

    http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/172303.aspx
Sign In or Register to comment.