Search the Community
Showing results for tags 'SPI'.
Surprisingly, the MSP430G2553 seems to require an extra initial mock reading data = SPI.transfer(0); before starting to read the right address. Unfortunately, I can't provide logic analyser trace as the signal on the MSP430G2553 is below the threshold of my logic analyser which doesn't feature adjustable threshold. On the LM4F and on the MSP430G2553 with the initial mock reading data = SPI.transfer(0); On the MSP430G2553 without the initial mock reading data = SPI.transfer(0); The first reading returns ?. Commenting lines 72 and 73 on usci_spi.cpp as sugge
SPI provides different speeds on LaunchPad and StellarPad for Energia: #if defined(__MSP430G2553__) SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV2); // for MSP430G2553 DIV2 = 8 MHz #elif defined(__LM4F120H5QR__) SPI.begin(2); SPI.setClockDivider(SPI_CLOCK_DIV2); // for LM4F120H5QR DIV2 = 4 MHz ! #endif Please find the traces with my just-purchased oscilloscope thanks to http://embeddedcomputing.weebly.com/2/post/2012/11/oscilloscope-target-reached.html'>contributions I've received! Left: MSP430G2253 = 8 MHz; Right: LM4F210H5QR = 4 MHz Line 119 of Energ
I'm attempting to talk to a digipot over SPI with energia. The pot in question is a microchip mcp4261 (http://ww1.microchip...eDoc/22059b.pdf). To communicate with it, you pull the CS pin active (low), send it a 2 byte command then pull the CS pin back high. Without quoting the entire the data sheet, the basic command sequence is a 4 bit register address, 2 bit command, and 9 data bits. When you issue the read command, it is supposed to return 9 bits of data (the value of the register). I've bread boarded this up using the SPI examples with the following layout: CS -> P2.0