Display binary with LCD out


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Location
    Missouri, USA
    Posts
    2

    Default Display binary with LCD out

    I'm a new user of PBP and have been playing with the LCDOUT instruction.
    Is there a simple way to display a variable as binary instead of the numeric ASCII value? I'm moving bits around and would like to see the results directly.

    BTW This is my firsting posting to the forum.
    Thanks in advance,
    Bob B.

  2. #2
    fronkensteen's Avatar
    fronkensteen Guest


    Did you find this post helpful? Yes | No

    Default

    Look through the LCDOUT section in your manual for the keyword BIN, specifically BIN8.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Hi and Welcome

    Assuming your variable is called MyByte...

    LCDOUT $FE,1,BIN8 MyByte

    Will clear the LCD, locate to Column 1, Line 1 and display all eight bits of MyByte.

    ie... if MyByte=65, the LCD will show 01000001

    Look in the SEROUT2 section of your manual... BINx can be any number from 1 to 16, so you can display a whole word with LCDOUT BIN16 MyWord.

    See also the HEX and DEC modifiers whilst you're there...

  4. #4
    Join Date
    Nov 2008
    Location
    Missouri, USA
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Lcd bin

    OH, That part of the manual
    Thanks much,
    Bob B.

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. Replies: 14
    Last Post: - 26th September 2007, 05:41
  3. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  4. How do I display binary on an LCD?
    By kitcat in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd March 2005, 13:25
  5. A/D display result on LCD
    By winsthon in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 10th January 2004, 10:09

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts