This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

3310 LCD with Digital Pins

Other Parts Discussed in Thread: MSP430FG439

Hi;

I worked on the msp430fg439 and it has only one spi channel and i used sd card interface at this spi channel pins.  I have to use 3310 lcd but it works spi interface. I have extra 8 digital pins (not spi pins) for 3310 lcd but i dont know how can i adjust  these pins for spi with lcd.

  • You have to connect four GPIO output pins to the display controller's SDIN/SCLK/DC/SCE pins, and write zeros/ones to them in the correct sequence so that the other chip sees the correct SPI signals (this is called bit banging). The exact protocol is described in the PCD8544 datasheet.

    Also see SPI experiments with the MSP430.

  • thank for reply, its so complicated for me but i'll try bit banging, i thought, i can find a library but i didnt find anywhere, i wish i solve this problem
  • Give it a try - it is the easiest you can do, but: If you have large amount of data to send, then bitbanging can cause problems because your program cannot do other things while it is sending the data. With using interrupts, the program handles other tasks while the communication is running in the background, only interrupting the program flow to place the next byte into the buffer, then returning to the normal program. But no problem if you want to send a few bytes. You could also send the data in packages, still running through your program between those, but then the transmission lasts longer, of course. And look at the maximum SPI speed of your slave (might be more critical with processors running faster than the MSP). When using the USCI module you might set a specific clock speed for the transmission. This is not applicable for bitbanging.

    Another option would be the sharing of the SPI. That is why SPI devices have chip select lines. Communicate with the one, then with the other and so on. But this depends on your application and the usage of the SD-card and the display regarding data exchange rate.

    Dennis

**Attention** This is a public forum