Jump to content


  • Content Count

  • Joined

  • Last visited

Reputation Activity

  1. Like
    biza reacted to enl in LCD backlight off   
    What model s the LCD? Many have software control for the backlight.
    If not SW control, then transistor switch is appropriate. Traditional is an NPN transistor to ground... the anode of the LED is connected to power, resistor cathode to transistor collector, emitter to ground. Current to base turns on. Use a limit resistor to control base c urrent.
  2. Like
    biza reacted to roadrunner84 in How can I write Symbols into LCD with MSP430G2553?   
    I wrote this method as an extension on Energia's LCD module. You can use it in here as well. Though the Energia interface is not available, I rewrote this code for your purpose:
    void LCD_SetCharacter(unsigned char index, const unsigned char bitmap[8]) { unsigned short iter; lcdWriteCmd(0x38); lcdWriteCmd(0x40 | (index << 3) & 0x3f); for(iter = 0; iter != 8; ++iter) { lcdWriteData(bitmap[iter]); } lcdWriteCmd(0x02); } Usage would be as such:
    LCD_SetCharacter(1, corazon); This would load the heart symbol in character 1.
    This is only needed during setup, after pin assignment and LCD reset.
    Now you can write to the screen as before
    LCD_SetText("I \x01 MSP430", 0, 0); // print "I [heart] MSP430" Note that \x00, \x01, \x02... \x07 will corresond with the characters you loaded.
    \x00 is also the end-of-string marker, so when writing to the display you should replace it with \x08, but not when writing to character memory!
  3. Like
    biza reacted to bluehash in character to LCD and buttons events   
    Could you give us some more info on hardware? What buttons, board, LCD.
  4. Like
    biza reacted to enl in character to LCD and buttons events   
    An unsigned holds a number--well, a representation of one, anyway. It is when you convert the numeric value to printable that you need to concern yourself with two digits.
    Most print tools do not include leading zeroes by default. You can do this a number of ways, but you will need to do it.
    One way is to test before output and put the leading zero yourself (if i<10).
    Another is write your own int to chars tool (my usual method... special tools can be more efficient than general ones much of the time)
    Another is use a tool that allows you to specify a format with the leading zeroes, such as sprintf() in C
  5. Like
    biza reacted to nemetila in LCD backlight off   
    There are 3.3V and 5V type LCDs.
    If you use 5V type LCD, the LCD LED forward voltage might be higher than 4V (for example 4.1V).
    This is higher than your LaunchPad Vcc voltage (3.4V). I think It wont work unless you get 5V from the LauncPad or from an external supply.
    Backlight on/off (with 3.3V LCD)
    an example:
    connect: LCD_VLED  --> Vcc connect: LCD_VLSS ---> current limiter resistor pin(1) connect: current limiter resistor pin(2) --> N_MOSFET(logic level type) drain connect: N_MOSFET(logic level type) source --> Gnd connect: N_MOSFET(logic level type) gate --> any MSP430 I/O pin This solution might be improved with additional resistors.
  • Create New...