Thread: CGROM table

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    37

    CGROM table

    Hi,

    I am writing a program that takes user input from a WinXP machine and sends it through a Serial Com Port to an LCD Screen.

    The LCD screen has an in-built CGROM table for example the "tab" command \137 represents superscript 9 on LCD screen.

    My program takes 1 character at a time from user input on stdin and adds it to a char string.

    Does anyone know how I can send the \137 to the screen to get a superscript 9? at the moment it takes it at face value, converts the "\" to ö to give ö137?

    my user input code is
    Code:
             printf("Enter line %d(<=20 chars): ", line);
             c = getchar();
             char_count = 0;
             while((c != '\n') && (char_count < MAXBUFFERSIZE)) {
                  buffer[char_count++] = c;
                  c = getchar();
                  }
             buffer[char_count] = 0x00;
    Any help would be greatly appreciated.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Is this one of those "I want to send a string to the system, so to send the \ char, I have to send two \\ char's", kind of things?

    It's system("dir C:\\*.*"), not system("dir C:\*.*")

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  2. progarm doesnt compile
    By kashifk in forum Linux Programming
    Replies: 2
    Last Post: 10-25-2003, 05:54 PM
  3. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  4. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM
  5. help with operator <
    By kashifk in forum C++ Programming
    Replies: 1
    Last Post: 10-21-2003, 03:49 PM