Assistance Required with VB.net


Results 1 to 33 of 33

Threaded View

  1. #18
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi Henrik,

    Success, but..........!

    First of all the success. I changed the PIC code to:

    Code:
    SEROUT2 PORTC.3, 16780, [ z]
    Then changed this line in the VB program:

    Code:
     Me.AddListBoxItem(SerialPort1.ReadExisting)
    To:

    Code:
    Me.AddListBoxItem(SerialPort1.ReadByte)
    And away it went reading and displaying Random Bytes, brilliant

    Now for the but part. I actually want the VB program to read a WORD sent from the PIC (a short in VB?) however for the AddListBoxItem(SerialPort1.Readxxxx there is:

    ReadByte
    ReadChar
    ReadExisting
    ReadLine
    ReadTo

    No ReadShort

    Now I'm thinking somehow it's send a High Byte from the PIC then a Low Byte and join them together in VB, unless there's a 'ReadShort' option.

    Dave
    Last edited by LEDave; - 10th September 2010 at 00:01.

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