How do I display binary on an LCD?


Closed Thread
Results 1 to 2 of 2
  1. #1
    kitcat's Avatar
    kitcat Guest

    Default How do I display binary on an LCD?

    Hi there.
    I can send a number to my lcd display like this:
    serout portc.0,6,[#number]
    and it shows up as a nice decimal number.
    What I want to be able to do is display it so it looks like this 01011010.

    if I just send this: serout portc.0,6,[number] it comes up as some nonsense character.
    I was expecting to be able to send this:
    serout portc.0,6,[%number]
    but it ain't having it. Bad token or some such thin.

    Can anyone help?

    thanks

  2. #2
    rastan's Avatar
    rastan Guest


    Did you find this post helpful? Yes | No

    Talking

    serout doesnt support modifiers, you will have to use serout2. gives you more control anyway.
    then you can just use

    Modifier Operation
    {I}{S}BIN{1..16} Send binary digits
    {I}{S}DEC{1..5} Send decimal digits
    {I}{S}HEX{1..4} Send hexadecimal digits
    REP c\n Send character c repeated n times
    STR ArrayVar{\n} Send string of n characters

    vuala.

    phil

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. Display binary with LCD out
    By pinbender in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 4th December 2008, 20:38
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35
  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