Announcement

Collapse
No announcement yet.

Font Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Font Problem

    Hello everybody.

    I have a 32028-P1T touchscreen, and I meet some problem to change the size of the font. In fact, I've made a code to display on my screen some informations passing by the serial port (RS232). In font "1", there's no problem all is OK, but when I try to make it a bit larger for more visibility, some characters are replaced by some "?". I've made some pictures for a better explanation of my problem.

    There's the code i use :
    Code:
    #platform "uOLED-32028-P1T"func main()var ch;gfx_Cls();txt_Set(FONT_SIZE, FONT1);setbaud(BAUD_115200);  // reglage 115200 bits par secondeto(COM7); print("Station Meteorologique\n");  //on envoie sur le port COM7repeatch := serin();if (ch != -1)print( [CHR] ch);   // Affichage sur l'ecran de la touche presseeendifforeverendfunc
    And there is the pictures of my screen :

    With font 1
    With a larger font

    Can someone help me please ?

    Regards
    Nicolas


  • #2
    Hi Nicolas, try changing com port to COM0, Picaso is only equipped with COM0 (PC link) and COM1 , the other COM ports are not available. Other than that, the only thing I can think of is that maybe because the larger font takes longer to print that you maybe over-running the com port. Try this code


    var combuf[100]; // buffer for up to 200 bytes

    func main()
    var ch;
    func com_Init(combuf,200,0);
    gfx_Cls();
    txt_Set(FONT_SIZE, FONT1);
    setbaud(BAUD_115200); // reglage 115200 bits par seconde
    to(COM0); print("Station Meteorologique\n"); //on envoie sur le port COM0

    repeat

    ch := serin();
    if (ch != -1)
    print( [CHR] ch); // Affichage sur l'ecran de la touche pressee
    endif
    forever
    endfunc
    Regards,
    Dave

    Comment


    • #3


      Yeah, that works fine, thanks so much !
      But I can run my code with COM7 ...
      Thank you for your helpful advice

      Regards
      Nicolas

      Comment


      • #4


        Glad it worked for you.
        Yes it will just ignore COM3 to COM7 and default to COM0.
        Regards,
        Dave

        Comment

        Working...
        X