No announcement yet.

Serial input conversion

  • Filter
  • Time
  • Show
Clear All
new posts

  • Serial input conversion

    Hello everybody,
    it there a pre-defined function (or macro) to convert a string (typically a number sent by a PIC micro with its serial interface to Picaso GFX display) into a number to make some calculation with the Picaso?

    Thank you advance

  • #2

    there is no need - you send a character example a zero (0) the display will see that as 48 (see an ascii table) - what are you trying to send from the PIC and I may be able to explain better


    • #3

      I'm trying to send a number between 0 to 1024 (resulting from ADC in the PIC)..
      Then this number has to be processed by Picaso (for example to adjust the contrast value or move a graphic bar on the display).



      • #4

        I assume you mean you have a number that is being transmitted as ASCII text? If so, have a look at the str_GetW() functions......
        Optionally, It would be easier if you transmitted the number as two bytes. If this is the case, myword := (msbyte
        Best Regards,


        • #5

          Yes, a number (in ascii format) need to be sent from the microcontroller to the display (via the serial interface).

          I looked at the str_GetW() function... this convert a string into a finite number?


          • #6

            you dont need to send it in ascii format - if the max is 1024 (I guess you mean 1023 8-bit) just send high byte, low byte from the PIC then receive the high byte in the display bit shift left 8 (