No announcement yet.

Text button (b) command

  • Filter
  • Time
  • Show
Clear All
new posts

  • Text button (b) command

    I have a problem with the text button command.
    I use a µLCD-320-PMD2 with the PmmC rev 6.
    Here are the bytes I send :
    send_char(0x62); //cmd
    send_char(0x01); //state
    send_char(0x20); //x
    send_char(0x00); //y msb
    send_char(0x20); //y lsb
    send_char(0x0f); //button colour msb
    send_char(0x02); //button colour lsb
    send_char(0x02); //font
    send_char(0x03); //text colour msb
    send_char(0x1f); //text colour lsb
    send_char(0x20); //text width
    send_char(0x20); //text height
    send_char(0x66); //char1
    send_char(0x65); //char2
    send_char(0x67); //char3
    send_char(0x68); //char4
    send_char(0x00); //terminator
    A text button is placed at the good position but its size is very small (less than 10 x 10 pixels) with no text inside. I also get back a NAK.
    I don't have the problem with other commands.

    Thanks for your answer.

  • #2


    If I remember right, I had a similar problem. I think that the "text width" and "text height" parameters are actually scaling factors. I think your code is asking the fonts to be scaled by a factor of 32, not a size of 32 pixels. Try a value of 2 or 3 for those parameters and see if that fixes the problem. Also, the Opaque setting for text effects the appearance of text buttons. If text is set to Opaque, then your text will have a backgrounf color that matches the screen background color, not the color of the button. For example if you want white text on a red button and your background color is set to black, you need to set text to Transparent or you will get white text on a black background on a red button.

    Any technology, sufficiently developed, is indistinguishable from magic. A.C. Clark(RIP)

    NEW! Lower prices on all 4D Systems products for 2009 and continuing into 2010!


    • #3

      I just tried to put 0x01, 0x02, 0x03 or 0x04 for "text width" and "text height" parameters and it didn't fix the problem. Top border and left border are white (state up) while the button color is black as the background color. The first 3 parameters (state, x & y) are the only ones that work when I change them.

      Is it possible to read ACK or NACK between each byte sent? For now, I only read it after the last byte of a command.



      • #4


        We've tried it here and it works. Make sure Opaque/Transparent Text command is set to zero (0x4F, 0x00).


        • #5

          OK, problem fixed. I set the Opaque/Transparent Text command to zero (0x4F, 0x00).
          Thank you all!