Serial help


Closed Thread
Results 1 to 4 of 4

Thread: Serial help

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: Serial help

    Hi,
    Never used one of those and I don't quite understand what "nothing happens" actually means. Are you saying that you have data on the screen but when executing the Clear Screen command the screen does not clear?

    Anyway, the PBP equivalent of the following Arduino code
    Code:
    Serial.write(0x76);  // Clear display command, resets cursor
    Serial.write(0x01);  // Hex value for 1, will display '1'
    Serial.write('2');   // ASCII value for '2', will display '2'
    Serial.write(0x0A);  // Hex value for 10, will display 'A'
    Serial.write('B');   // ASCII value for 'B', will display 'b'
    would be something like:
    Code:
    SEROUT2 PortB.3, 84, [$76]  'Clear the display
    SEROUT2 PortB.3, 84, [$01, "2", $0A, "B"]   ' Display 12AB
    What if you try:
    Code:
    For i = 0 to 1000
    SEROUT2 PortB.3, 84, [$76, DEC4 i]
    PAUSE 1000
    NEXT
    /Henrik.

  2. #2
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159


    Did you find this post helpful? Yes | No

    Default Re: Serial help

    Thanks Henrik. I looked over what I wrote, and I was tired at the time. Yes, what I meant was that clear screen did not work, but if I sent decimal numbers, they showed up in the display. I am at work and will try your suggestions tonight.

    Thanks
    Andy
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159


    Did you find this post helpful? Yes | No

    Default Re: Serial help

    Thank you so much Henrik. Your knowledge has once again saved me and I understand it now.

    Works great!
    "I have noticed that even those who assert that everything is predestined and that
    we can change nothing about it still look both ways before they cross the street"


    -Stephen Hawking

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