Serial LCD

BlocklyProp reference for SERIAL LCD blocks

For Activity Board, FLiP, and Other board types. Not available for Badge or Scribbler Robot board types. I/O pin availability will vary with board type. Use care if accessing I/O pins connected to built-in accessory circuits on your board. Refer to your board's product guide for I/O pin assignment details.

The SERIAL LCD blocks are used to set up and send information to be displayed (or played) on Parallax 2x16 (#27976 & #27977) and 4x20 (#27979) character LCD modules.

LCD initialize

This block launches a processor automatically. Use only instance of this block per project.

The LCD initialize block is used to set up a connection to a Parallax Serial LCD module. If you forget to use this block, other LCD blocks will remind you with a triangle-shaped warning icon:

  • PIN must be set to the Propeller I/O pin it is connected to. Options are 0-27; however, I/O pins 18-27 are connected to other circuits on the Propeller Activity Board and should not be used here.

    If you have defined a constant using the constant define block, the constant will show up in all of the pin menus and can be selected instead of a numbered pin:

  • baud must match the switches set on the back of the Parallax LCD module:

The module can be plugged into the breadboard on the Propeller Activity Board or Propeller Activity Board WX, and the +5VDC, GND, and RX wires can be connected as shown:

LCD print text

The LCD print text block sends the inserted text string to the serial LCD module.

LCD print number

The LCD print number block sends the inserted number value to the serial LCD module. Use the dropdown menu to choose how to display the value, as a decimal, hexadecimal, or binary number.

LCD print multiple

The LCD print multiple block can print several terms of different types on a single line. Click the gear icon to drag additional terms into the list, then attach appropriate values to the block.  Options are:

  • text
  • decimal number
  • hexadecimal number
  • binary number
  • floating point number
  • ASCII character

Checking the Specify Digits block adds a fill-in field next to all attached number values. 

Floating point number option

BlocklyProp uses integer numbers. The floating point number option allows an integer value to be displayed as a decimal number.  Use its drop-down menu to divide the integer by a multiple of 10 to scale and display the number appropriately. The Specify Digits checkbox activates an additional field by each numeric term.

LCD command

The LCD command block is used to issue specific commands to the LCD module. Select an option from the dropdown menu:

  • clear screen - erases the screen
  • move cursor left - by one character
  • move cursor right - by one character
  • move cusror down - to the next line
  • carriage return - places cursor at first character in the next line
  • backlight on
  • backlight off
  • display off
  • display on, cursor off
  • display on, cursor off, blink
  • display on, cursor on
  • display on, cursor on, blink

LCD set cursor

The LCD set cursor block sets the position of the cursor on the LCD screen. It can be used to print text or numbers at any location on the screen.

LCD play note

The LCD play note block is used to make the Parallax LCD module play a musical note from its onboard piezo speaker.

  • Set the note pitch (or rest) from the first dropdown.
  • Set the octave, 3rd to 7th, in the second dropdown.
  • Set the note duration in the third dropdown, ranging from a whole note (2 seconds) down to a sixty-fourth (31 ms).