Jump to content


  • Content Count

  • Joined

  • Last visited

  1. It works! I modified the initialization procedure a bit, similar to what you suggested and as the Raystar's documentation sheet said. Did not pay attention to that before, looks like the wrong initialization was the most likely culprit - not |'ing the command with Enable. Anyways, here's the init procedure for blinking, backlight on, right incrementation: sendCommand(0x30); //function set sendCommand(0x40); //function set sendCommand(0x34); sendCommand(0x40); //function set sendCommand(0x34); sendCommand(0x0); //display on sendCommand(0x3C); sendComma
  2. Great, thanks for your help! I'll test this as soon as possible and report back with some further questions (probably some further problems too) .
  3. CCS doesn't support MSP432 Energia sketches yet, so for the time being in just trying different write options. I managed to get some letters displayed randomly (hex values sent not matching letter values), so the LCD is initialized okay, I just can't seem to get the right sequence. For writing command I'm doing the following: #define Rs 0x1 #define En 0x4 HighNibble = (byte_data & 0xF0); LowNibble = ((byte_data << 4) & 0xF0); I2C_masterSendSingleByte(EUSCI_B0_MODULE, (HighNibble|Rs)); __delay_cycles(1000); I2C_masterSendSingleByte(EUSCI_B0_MODULE, ((HighNibble|Rs) | En
  4. Okay, thanks for the answer. I'll check out your link. About the pseudocode, I was just going through the procedure of 4 bit mode operation. Anyways, I'll aks again if I have some more questions!
  5. I could use some further explanation: in LiquidCrystal_I2C.cpp (line 231 or so) there's a function Send(), which takes in 2 parameters, byte as a value and mode. Mode is Rs (0b00000001), as far as I can tell, which enables the write command to LCD. So for example, if I wanted to send a write 0x9 command over to LCD, the following would occur: 0b00001001 gets chopped up into 2 pieces: High nibble: 0000 Low nibble: 1001 Each nibble gets OR-ed with Rs, which enables writing: HN | Rs = 0b00000001 LN | Rs = 0b00001001 Each nibble is then sent to LCD and pulsed with En (0b00000100) (HN | Rs)
  6. Hey! Yes, I'm in the process of analyzing the Energia libraries and the PCF8574T documentation. In the mean time, the good sign is that the LCD at least initializes and shows something, so I'm guessing I'm not that far away from the solution. Question about the I2C_masterSendSingleByte() routine though. Does it send 8 bits, i. e. 0x9 is sent as 0b00001001, or does it simplify to like 0b1001? I'm assuming it starts with MSB.
  7. The LCD comes with I2C backpack, the same setup works in Energia, I'm just trying to make it work in CCS. I'm using a voltage level conversion between MSP and LCD for logic (3.3 V <-> 5 V).
  8. Hello, I'm writing a program for interfacing a 1602 LCD to MSP42 with the use of I2C protocol. I'm not writing my own routines, so I decided to go with DriverLib ones. LCD successfully initializes and after I try with different combinations of signals to get different characters, only some appear. Let me start from the beginning. I initialize the LCD to 4 bit mode with the code below: void lcdInit(void){ I2C_masterSendSingleByte(EUSCI_B0_MODULE, 0x30); __delay_cycles(10000); I2C_masterSendSingleByte(EUSCI_B0_MODULE, 0x30); __delay_cycles(10000); I2C_masterSendSingleByte(EUSCI_B
  9. Blairo

    MSP432 1602 LCD

    Since I2C LCD interface isn't in working order just yet, I tried to quickly make the LCD work in standard 4 data pin + EN and RS mode. I got the following code from http://cacheattack.blogspot.si/2011/06/quick-overview-on-interfacing-msp430.html, where the code posted is for MSP430 , however it is simple enough that I figured it should work on MSP432 too with just a few adjustments (should be even simpler because 432 has a 5 volt power supply) - to spare you the suspense, I was wrong: Code (compiles in CCS 6.1) #include "msp.h" #define LCM_DIR P4DIR #define LCM_OUT P4OUT // // Define s
  10. Okay, thanks for all the help regardless
  11. Thanks, will take a look at it. What I noticed though was that CSS doesn't yet support importing MSP432 Energia sketches. I tried importing a blink example, but there's no MSP432 on the available device list and choosing anything else gives me an error when uploading ("No USB FET was found"). For clarification: I don't just want to import Energia sketch into CCS, because then I'm just changing IDE's. What I want to do is to find a way to make a main.c file which includes LiquidCrystal_I2C.h and can make an LCD work, since my project, which needs the LCD functionality, is already written in
  12. It works! I did a level conversion for SDA and SCL while using 5 volts for power. Thanks a lot, now I only need to make this work in my CCS project. Seeing this uses some energia libraries, would I do this just by including the appropriate Energia headers in my CCS project? Update: Okay, so I naively tried to include the necessary header files (like print.h, wire.h, ...) into my CCS project in order to try and make the LCD code compile, but it doesn't seem to work that way since I get all kinds of errors. Any ideas? Thanks.
  13. Thanks a lot, I'll try it out tomorrow morning. Will update of course
  14. I tried the examples using Arduino's Liquid Crystal I2C library (LiquidCrystal_i2C.h) but that doesn't seem to work in energia, will not compile at all.
  15. Hello, I'm trying to get a standard 1602 LCD (16x2 from Raystar) connected to MSP432 with the I2C interface. Are there any existing libraries which could help me out? I've found some I2C libraries for Arduino but naturally they're not compatible, and the only existing Energia examples deal with CogLCD which uses a SPI interface (emerging question: is there a way to make SPI and I2C compatible?) or standard 16 pin connection. MSP432 is still a relatively fresh chip, so I can't find any examples whatsoever. Thanks!
  • Create New...