Shop OBEX P1 Docs P2 Docs Learn Events
"SEROUT" command to a LCD display, to change the font size, need help. — Parallax Forums

"SEROUT" command to a LCD display, to change the font size, need help.

mctdimctdi Posts: 2
edited 2008-05-07 21:37 in General Discussion

I am trying to do a "SEROUT" command to a LCD display, to change the font size. I think I am missing something small to correct the issue.

Running a SGX-120 LCD display with a Parallax SX28AC/DP.

Text control code such as backlight on & off work fine.

But, graphics instructions [noparse][[/noparse] escape sequences ], such as "ESC F n" do not work from the SX28. From the PC with a serial sender program to the LCD, the font size can be changed.

In SX28

Use: SEROUT LCD_Pin, LCD_Baud, ESC F3··· Get: BYTE PARAMETER EXPECTED "ESC"

Use: SEROUT LCD_Pin, LCD_Baud, ESC F 3··· Get: BYTE PARAMETER EXPECTED "ESC"

Use: SEROUT LCD_Pin, LCD_Baud, ESC-F 3··· Get: BYTE PARAMETER EXPECTED "ESC"

Use: SEROUT LCD_Pin, LCD_Baud, ESCF3··· Get: BYTE PARAMETER EXPECTED "ESCF3"

Use: SEROUT LCD_Pin, LCD_Baud, <ESC>F3··· Get: BYTE PARAMETER EXPECTED "<"

Use: SEROUT LCD_Pin, LCD_Baud, 27 F3··· Get: display is same size and order of read out is messed up

Use: SEROUT LCD_Pin, LCD_Baud, 27-F3··· Get: display is same size and order of read out is messed up

Thanks for any help.

Comments

  • PJMontyPJMonty Posts: 983
    edited 2008-05-07 16:45
    mctdi,

    Check the SX/B help file on "Serout". It only lets you send a single character per call, not multiple characters. Also, the letters "ESC" are just a mnemonic for the escape character. You need to send the value 27, or define a constant called "ESC" to equal 27.

    Thanks,
    PeterM
  • BeanBean Posts: 8,129
    edited 2008-05-07 17:25
    Use:
    [color=#0000ff]SEROUT LCD_Pin, LCD_Baud, 27    [/color]
    [color=#0000ff]SEROUT LCD_Pin, LCD_Baud, "F"    [/color]
    [color=#0000ff]SEROUT LCD_Pin, LCD_Baud, 3 ' You may need to put quotes around the digit three.    [/color]
    

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Did you know that 111,111,111 multiplied by 111,111,111 equals 12345678987654321 ?

    www.iElectronicDesigns.com

    ·
  • mctdimctdi Posts: 2
    edited 2008-05-07 21:37
    Thanks to all for turning the light on for me. Have a great day.
Sign In or Register to comment.