​ ​ ​ ​ Picaxe to Picaxe Serial communications withe hsersetup
Results 1 to 2 of 2

Thread: Picaxe to Picaxe Serial communications withe hsersetup

  1. #1

    Question Picaxe to Picaxe Serial communications withe hsersetup

    E have to send data from Pic-A to Pic-B and then from Pic-B to the PC terminal. when i look at the output of Pic-A withe the terminal it is fine but when i look at the output of Pic-B it is not OK Peace help me to fix this code it is a urgent matter.

    Pic-A code:

    '----------------- Disply to PC and Pic-B ------------------------

    hsersetup B9600_8,%10 'For pc conection

    sertxd (cr,lf,"MSG in MEMMORY= ")
    high B.6 'Turn Radio on
    pause 2000 'Wate 2seconds for radio to stabalise
    hserout 0,(cr,lf)

    for w2=1 to Last_Ram
    'on startup (symbol Char1=b16)
    readi2c w2,(Char1)
    pause 10
    sertxd (Char1)
    pause 10
    hserout 0,(Char1)
    next w2
    hserout 0,(cr,lf)
    hsersetup B9600_8,%00

    sertxd (cr,lf)
    Low B.6 'Turn Radio off


    The output:

    Pic_A out.jpg

    Pic-B code:

    hsersetup B9600_8,%00
    hserin [10000],0,65

    b1 = hserptr - 1 'the hserptr holds the number of bytes rcved

    sertxd (cr,lf,#b1,cr,lf)
    if b1=52 then
    for b2 = 0 to b1 'iterate through the data
    get b2,b3
    sertxd (#b3) ' re-transmit the item ro PC
    next b2
    end if

    goto main ; loop

    The output:

    Pic_B out.jpg

  2. #2
    Senior Member
    Join Date
    Feb 2010
    Don't Mess With My Texas!
    Blog Entries


    Your code mentions the word "radio." Your text does not mention how your PICAXE parts are connected; just that there is "serial communication."

    Sending data over an RF link is not exactly trivial. Many things could be going on here.

    Please explain more, including a schematic and photos would be nice.
    - Tex
    __________________________________________________ _______________________
    These words are my opinion, WYLION. Any resemblance to truth or fiction is accidental at best.
    "Truth lies dormant in our future history." ― Tex Clodhopper LXVI
    "Confidence is ignorance. If you're feeling cocky, it's because there's something you don't know." ― Eoin Colfer, Artemis Fowl


Posting Permissions

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