Jump to content
43oh

How should I connect my MSP430 to my LCD display?


Recommended Posts

I finally have an LCD display to connect to my MSP430 Launchpad but I'm not sure which pins to connect. I decided to use a serial inteface because it will leave more pins open on my Launchpad for other inputs and outputs.
post-3-0-84267900-1365642758_thumb.png
Here is the pin description
post-3-0-17961300-1365642760_thumb.png
but it doesn't really tell me what CS, SDO, SDI, and SCL mean.
 
As far as the pins on the Launchpad
post-3-0-90493700-1365642762_thumb.png
http://www.ti.com/lit/ds/symlink/msp430g2553.pdf (Pages 6-8)
I'm not really sure which ones to use for CS, SDO, SDI, and SCL. Could it just be any pins with digital read and digital write functionality? If so, I assume it would be best to use the ones that don't have other available functions in case I need to use those.

Edited by bluehash
Uploaded images to 43oh.
Link to post
Share on other sites

CS is your select pin.  You can pick any pin for that - you usually pull it high when writing to a device, and low when you're done.  

DO = Data Out.  MOSI = Master Out/Slave In (Your MSP430 is the master)

DI = Data In.  MISO = Master In/Slave Out

SCL = Clock.  SCK is the same thing (I believe it means Serial Clock)

 

So you'll need 1_5 (clock), 1_6 (master in), 1_7 (master out) and another pin of your choosing.  It looks like Energia has 2_0 labeled as CS for some reason - might be worth checking in the energia forum to see if there's some sort of special way it uses that pin when using SPI.

Link to post
Share on other sites

/CS is to be chosen and driven in software to any GPIO pin (digitalWrite() capable). The CS pin on the launchpad is only used when launchpad is slave instead of master.

MOSI (master out slave in) should be connected to SDI (serial data in) of the LCD.

MISO (master inslave out) should be connected to SDO (serial data out) of the LCD.

SCK (Serial ClocK) should be connected to SCL (Serial CLock).

If you're about to use P1.1 or P1.2 (used for UART) remove the two leftmost jumpers from J3.

Link to post
Share on other sites

Oh silly me, that second picture I posted does in fact tell you what those pins mean. But it does help now to know what MOSI and MISO mean. And good to know that I can just use any pin for CS. Thank you both now I can finally make progress on my senior project  :grin:

Link to post
Share on other sites
  • 3 weeks later...

Ok so I connected the board to the display using a wire wrap tool.
P1.5 => SCK/SCL
P2.0 => CS
P1.7 => MOSI
P1.6 => MISO
VCC => VCC
GND => GND
 
But now that I have it connected I can't find any tutorial anywhere for Energia or Code Composer Studio that explains how to communicate with the LCD using serial communication.

 

I did find this in the MSP430 datasheet:

 

 

The USCI module is used for serial data communication. The USCI module supports 
synchronous communication protocols such as SPI (3 or 4 pin) and I2C, and
asynchronous communication protocols such as UART, enhanced UART with automatic baudrate detection (LIN), and IrDA.
Not all packages support the USCI functionality.
USCI_A0 provides support for SPI (3 or 4 pin), UART, enhanced UART, and IrDA.
USCI_B0 provides support for SPI (3 or 4 pin) and I2C.
 
So I suppose I would want to use USCI_B0. Does anyone know of any good tutorials for this?
Link to post
Share on other sites

Yes - the pin connections you're using are the ones for USCI_B0.  I tend to leave USCI_A0 open for UART communication.  

I'd suggest dropping into the energia forum - I'd bet there's some good material there.  Also - if you look at their git repository - there are examples available for SPI - https://github.com/energia/Energia/tree/master/hardware/msp430/libraries/SPI/examples

 

I will note - there is a bug in the december copy of Energia - SPI runs kind of slow (there is an update you can download).  I ran into an issue where I needed a fast refresh rate for an LED matrix - it probably won't be an issue for your display unless you're passing a ton of data to it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...