Communications Example : PC to PIC bi-directional dialogue


Closed Thread
Results 1 to 25 of 25

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    I would query first that perhaps you are not receiving 100% good Data...

    Replace ReadLoop with this code...

    Code:
    ReadLoop:
    	DEBUGIN [DataA]
    	DEBUG DataA," ",HEX2 DataA,10,13
    	Goto ReadLoop
    This will echo the HEX representation of what has been received... so if you type Richard you should get...

    R 52
    i 69
    c 63
    h 68
    a 61
    r 72
    d 64

    where the character is what you typed along with its HEX as confirmation of good data...

    If every 2nd character is not what you expected, then time to find out why...

  2. #2
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Smile

    thanks
    I will "play" some more
    I thought I mite have missed something when I converted

  3. #3
    Join Date
    Aug 2005
    Location
    down south
    Posts
    90


    Did you find this post helpful? Yes | No

    Default

    up date
    I tried using hyperterminal and everything works just as it should
    I then tried MCS serial communicator (again) with readloop get hex and all I got was R 52
    SOO the code is good , the hardware is good there is just something I'm missing using MCS comm. One big difference hyperterm. is real time key stroke to echo, MSC only after manual CR.
    I also tried realterm. sometime the echo worked but never the LED (BLINK, SWEEP, ON OFF ETC.) ideals.
    thanks

Similar Threads

  1. Send data PIC to PC
    By konter in forum Off Topic
    Replies: 6
    Last Post: - 25th December 2009, 23:04
  2. Replies: 67
    Last Post: - 8th December 2009, 03:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 15:46
  4. Replies: 11
    Last Post: - 12th July 2008, 03:36
  5. PC / PIC communications?
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th September 2005, 18:55

Members who have read this thread : 5

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