PIC to PIC BYTEs divided by 2

Discussion in 'General Software' started by Camerart, Sep 18, 2019.

  1. Camerart

    Camerart New Member

    I have a PCB with 2x PICs on 18F4620 MASTER and 18F4431 SLAVE.

    The SLAVE READs an Incremental encoder, then the MASTER CALLs for the 2xBYTEs.

    The SLAVE SEROUT, also a Digital analyser, shows correct BYTEs being SENT.

    Once in the MASTER, both BYTEs are now 1/2 of what they should be.

    I'm using:
    pz = 10

    ss = 0
    WaitUs pz
    SSPBUF = mastout.HB
    While Not SSPSTAT.BF
    qeiazi.LB = SSPBUF

    WaitUs pz

    SSPBUF = mastout.LB
    While Not SSPSTAT.BF
    qeiazi.HB = SSPBUF

    WaitUs pz
    ss = 1
    Any ideas of what is happening please?
    Cheers, Camerart.

Share This Page