Jump to content
43oh

Library for the in-store LCD boosterpack


Recommended Posts

Firstly I must say thank you for porting the Arduino stuff onto MSP430. You've done such a great job!

 

I've made a first attempt of porting the library for the LCD that's available in the 43oh.com store onto Energia. (Edit: See a post below which display this is for, since there are several LCD boards in the store).

 

It's C-based, not C++. Should I port it to C++? Would that be better?

 

I've tested on the 2452, in which case the bitbanging code should be triggered. I have not yet tested on 2553.

 

Here's the example code of using the library. Please say if you'd like it to be different. Within the multi-library environment, my naming doesn't quite seem appropriate.

 

#include 

void setup() {                
 pinMode(P2_5, OUTPUT);   
 SPISetup();
 clear();
}

void loop() {
 digitalWrite(P2_5, HIGH); // Backlight connected to P2_5 (differs)
 writeString(0,0,"Hello");
 writeString(0,1,"How are you?");
 writeString(0,2,"Good!");
 writeString(0,3,"Energia Rocks!!");
 writeString(0,4,"Buy an LCD in");
 writeString(0,5,"43oh.com store");
 delay(10000);              // wait for a second
 digitalWrite(P2_5, LOW);   // Backlight connected to P2_5 (differs)
 delay(100);

}

LCDBoosterpack.zip

Link to post
Share on other sites

Here is one in C++. Edit: uses bitbanging for both types of chips.

 

Example code:

 

#include 

LCDBoosterPack lcd;

void setup() {                
 pinMode(P2_5, OUTPUT);   
 lcd.init();
 lcd.clear();
}

void loop() {
 digitalWrite(P2_5, HIGH); // Backlight connected to P2_5 (differs)
 lcd.writeString(0,0,"Hello");
 lcd.writeString(0,1,"How are you?");
 lcd.writeString(0,2,"Good!");
 lcd.writeString(0,3,"Energia Rocks!!");
 lcd.writeString(0,4,"Buy an LCD in");
 lcd.writeString(0,5,"43oh.com store");
 delay(10000);              // wait for a second
 digitalWrite(P2_5, LOW);   // Backlight connected to P2_5 (differs)
 delay(100);

}

LCDBoosterPack-cpp-bitbanging.zip

Link to post
Share on other sites

No, haven't done that yet. Should be quite simple to port to that I guess. How would I include the SPI-library inside my LCD-library?

 

For some reason the SPI-code didn't work for 2553, so I'm now defaulting to bitbanging on both the chip-types. Bitbanging works.

 

I need the MOSI to be on the P1.7 for both chips because of the boosterpack. I would guess your SPI switches them, if it uses the HW-pins?

Link to post
Share on other sites

These also use bitbanging, right?

 

And just so our readers don't get confused, the library I added is for a different display. The ones in the store on the following links (display is an SPI-based Powertip PE9665WRF with the ST7579 controller)

 

http://store.43oh.com/index.php?route=p ... duct_id=78 and

http://store.43oh.com/index.php?route=p ... duct_id=79

 

Lars_lcd_btton_boosterback_msp430_lanchpad_top-228x228.PNG

 

Lars_lcd_cap_touch_boosterback_msp430_lanchpad_front-228x228.PNG

 

CorB's RF meter (not using the Energia library directly, but his code is embedded into it)

 

file.php?id=2481

Link to post
Share on other sites
  • 4 months later...
  • 2 weeks later...

I'm a newb here, and I can't seem to figure out how to write a string variable to the LCD.

 

String Input;

 

 

while (Serial.available() > 0) {
        int Receiver = Serial.read();
        Input += (char)Receiver; 
        if (Receiver == '\n') {
          Input.replace("\n", "");
          lcd.writeString(0,4,Input);
          Input = ""; 
    }
  }
 
results in error

 

lcdboosterpack.h:24:6: note:   no known conversion for argument 3 from 'String' to 'char*'

 

What am I doing wrong here?

 

Thanks !

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...