Shop OBEX P1 Docs P2 Docs Learn Events
pBasic Displays — Parallax Forums

pBasic Displays

Guys,
Now that I can program my Propeller Controllers in pBasic, I would like to send system data to a flat screen display. What, in your opinion, would be the most compatible display for the Propeller and the pBasic micro controller?
I would like to display alphanumeric characters...about sixty, at any location on the display. Color would be nice but not required. A sample data set would be

MAIN Pump Output Tank A Level: 0 to 100%
Pressure: 0 to 4,000 psig Tank B Level: 0 to 100%
Temperature: -20 to 200 Degrees F Mixing Tank Level: 0 to 100%
Flow Rate: 0 to 2 Gallons per Minute

Reactor Humidity: 0 to 100% CO2: 0 to 500 ppm

One-wire data will be gathered by the Propeller and displayed. Calculations will be performed by the Propeller and displayed.

All micro controller code will be developed on a computer, downloaded to the micro controller then the USB cable disconnected.

Your assistance will be helpful.

Discovery

Comments

  • For years, I have been using the LCD's from Scott Edwards..Seetron,Inc. You can google them. These displays are 4X20 and 4X40, coming in different colors...(screen colors). They are a serial input type. I find that using them with the Basic Stamp, and the SEROUT out command, much easier to use then the Propeller. Having said that, I have been also learning propbasic...pbas...and using Bpp 4X20 from Seatron. The learning curve is much harder, using the SEROUT command in .pbas, as the SEROUT command will only except one command per line...see example. Where as, the SEROUT command in pbasic..(aka the stamp) will take multiple comments, delimited with a comma...

    But, after it is all said and done, the display from Seetron is very easy to use, and I should add that the 3.3 volt out from the propeller is enough to run the display, as the input to the display, requires 5 volts.

    THe following is a code snippit that I use to send data to the propeller....to give you an example...notice the CONSTANTS list, as I like to set alot of them, to make the code easier to read..hope this helps...
    DEVICE P8X32A, XTAL1, PLL16X
    XIN 5_000_000
    
    '========CONSTANTS============
    baud                   CON "N9600"
    carr_return            CON  13   
    clrLCD                 CON  12          'clear the screen on the lcd
    posCMD                 CON  16          'position the curser command
    hideCUR                CON   4           'hide the curser command
    blinkCUR               CON   6           'blink the curser command
    degreeSYM              CON 223           'the "degree" symbol
    receive_data           CON 255
    backLTon               CON  14          'turn the back light on
    backLToff              CON  15          'turn the back light off
    brightness_ctl         CON  27
    quarter_bright         CON  48
    half_bright            CON  49
    three_quarter_bright   CON  50
    full_bright            CON  51
    beep                   CON   7           'beep command
    right_align            CON  18          'RIGHT ALIGN COMMAND
    start_big_char         CON   2
    end_big_char           CON   3
    astrike                CON  42
    block_char             CON 134
    carReturn              CON  13          'carriage return command
    blank_char             CON  32
    left_arrow             CON 127
    right_arrow            CON 126
    LR_arrow               CON 131
    LL_arrow               CON 128
    UR_arrow               CON 129
    UL_arrow               CON 130
    down_arrow             CON 132
    up_arrow               CON 133
    equal_sign             CON  61
    first_line             CON  64
    second_line            CON 104 
    no_char                CON 0    
    
    TASK LCD_1         'this TASK is running in COG 7   
      temp_1   VAR  LONG  'the temp_1erature data, itself..
      temp_2   VAR  LONG
      stringVOLT VAR LONG
      integerVOLT  VAR  LONG
      stringVOLTtenth VAR LONG
      stringVOLThundreds  VAR  LONG
      LCD_data_out  PIN 2   
      
    'Define a string variable:
    '   string1  HUB STRING(3)
    'Use STR to place the ASCII' representation of temp_1's value into a string
    '   string1 = STR temp_1,3
    'THEN display it.
    '   SEROUT LCD_data_out, baud, string1 
         SEROUT LCD_data_out, baud, clrLCD
         SEROUT LCD_data_out, baud, beep
         SEROUT LCD_data_out, baud, backLTon
         SEROUT LCD_data_out, baud, posCMD
         SEROUT LCD_data_out, baud, 64
         SEROUT LCD_data_out, baud, "TEMPERATURE IS"
         SEROUT LCD_data_out, baud, posCMD
         SEROUT LCD_data_out, baud, 84
         SEROUT LCD_data_out, baud, "TEMPERATURE IS"
         SEROUT LCD_data_out, baud, posCMD
         SEROUT LCD_data_out, baud, 104
         SEROUT LCD_data_out, baud, "VOLTAGE IS"
     DO  
         RDLONG degrees_1, temp_1  'reading the temperature data that is in the HUB
         PAUSE 200
         temp_1DEC = STR temp_1,3
         RDLONG degrees_2, temp_2  'reading the temperature data that is in the HUB
         PAUSE 200
         temp_2DEC = STR temp_2,3
         RDLONG volt_location, stringVOLT
         RDLONG tenth_location, stringVOLTtenth
         RDLONG hundreds_location, stringVOLThundreds
         PAUSE 200
         actualVOLT = STR stringVOLT, 1''2''3''4
         actualVOLTtenth = STR stringVOLTtenth,1
         actualVOLThundreds = STR stringVOLThundreds,1
         SEROUT LCD_data_out, baud, posCMD
         SEROUT LCD_data_out, baud, 79
         SEROUT LCD_data_out, baud, temp_1DEC
         SEROUT LCD_data_out, baud, degreeSYM
         SEROUT LCD_data_out, baud, posCMD
         SEROUT LCD_data_out, baud, 99
         SEROUT LCD_data_out, baud, temp_2DEC
         SEROUT LCD_data_out, baud, degreeSYM
         SEROUT LCD_data_out, baud, posCMD
         SEROUT LCD_data_out, baud, 115
         SEROUT LCD_data_out, baud, actualVOLT
         SEROUT LCD_data_out, baud, "." 
         SEROUT LCD_data_out, baud, actualVOLTtenth
         SEROUT LCD_data_out, baud, actualVOLThundreds
      LOOP 
    ENDTASK LCD_1  
    
    
  • Yes...this helps.

    Thank you.

    Discovery
Sign In or Register to comment.