Hi there,

I've altered the receiver_demo program to suit my application. - I took in the data from rfRxd0420 drom RC2 and try to take it out serially from RC0 of the pic16f676 so that I can
probe the data transmitted.

Currently, I'm simulating the program using MPLAB IDE. Pardon me if I'm wrong.
The receive_demo program that I understand, will check for header. But,
it does says that if the data is high before 6ms, therefore the header is valid.
What if the data is also 'LOW'?
I'm actually having problems with simulation coz it does not want to
come out of the loop - unless I put '1' in between.

When it came out of the loop, I should be able to record that and then output that
to the RC0 but it seems that the program didn't even jump to search for a guard time,
instead it continue the process to find for high or low pulse.

I just altered the receive demo of the dev kit. Can anyone help me please?
Or do you suggest a better way to simulate this program?

MAIN
call CLOCK ; to update TRMLOW and TMRHIGH
; TMRLOW ~=4us TMRHIGH ~=1ms

movlw HIGH STATEM
movwf PCLATH
movf STATECNTR, W ; Mask out the high order bits of
andlw B'00001111' ; STATECNTR (a noise guard)

addwf PCL, F ; The program clock (PCL) is incre-
STATEM
; check for possible start of data stream
goto BEGIN ; mented by STATECNTR in order
goto BEGIN1 ; to go to the appropiate routine
goto HEADER ; header is being ignored
goto HEADER1 ; just count up the time and then takes the data
goto HIGHPLSE ; times the width of Hi Pulse
goto LOWPULSE
goto RECORD ; record the 8 byte data
goto WAIT4END ; wait for guard time to be greater than 8ms

goto FIRST0 ; check whether DATA0 of bit 0 is 0 or 1
call SENDOUT ; to send out the serial data out through portc pin 0
goto RESET ; These RESET commands correct
goto RESET ; erroneous values of STATECNTR
goto RESET ; not caught by the mask above.
goto RESET
goto RESET
goto RESET