RPC-000-DIL RADIOMETRIX [Radiometrix Ltd], RPC-000-DIL Datasheet - Page 21
![no-image](/images/no-image-200.jpg)
RPC-000-DIL
Manufacturer Part Number
RPC-000-DIL
Description
UHF Radio Packet Controller
Manufacturer
RADIOMETRIX [Radiometrix Ltd]
Datasheet
1.RPC-000-DIL.pdf
(27 pages)
;SUBROUTINE IN_BYTE
;
;IN_BYTE
;
;
;
;
;
;
:
;
;
IN_BYTE
;
;
;
;
AWAITDATA
;
;
;
;
;
;
;
;
;
INNIBBLE
;
;
AWAITD1
;
;
;
;
;
;
;
;
;--------------------------------------------------------------------
;
Radiometrix Ltd, RPC2A
A BYTE HAS BEEN READ FROM THE RPC2A INTO ADDRESS POINTED AT BY FSR
READ A BYTE FROM THE RPC2A INTO FILE POINTED TO BY FSR
W IS DESTROYED
NOTE
BTFSC RPC2A,RXR
GOTO
BCF
BTFSS RPC2A,RXR
GOTO
NOP
MOVF
BSF
ANDLW B'11110000' ;JUST THE DATA
MOVWF INDF
SWAPF INDF
BTFSC RPC2A,RXR
GOTO
BCF
BTFSS RPC2A,RXR
GOTO
NOP
MOVF
BSF
ANDLW B'11110000' ;JUST THE DATA
IORWF INDF
THIS ROUTINE WILL HANG THE HOST UNTIL THE HOST
COMPLETES THE TRANSFER OF TWO NIBBLES
THIS SUBROUTINE CAN BE CONFIGURES TO RUN AS PART OF
ANINTERRUPT HANDLER IF THE
IS USED TO TRIGGER A HOST INTERRUPT
IN-BYTE
RPC2A,RXA
AWAITDATA
RPC2A,W
RPC2A,RXA
NOW GET MS NIBBLE FROM THE RPC2A
INNIBBLE
RPC2A,RXA
AWAITD1
RPC2A,W
RPC2A,RXA
;WE GOT A RX REQUEST YET?
;NO , SO LOOP BACK AND WAIT
READ THE LS NIBBLE FROM THE RPC2A
;ACCEPT THE REQUEST (SET ACCEPT LOW)
;HAS REQUEST GONE UP? data is present
;LOOP BACK TILL IT DOES
;TIME DELAY TO ENSURE DATA STABLE
;BEFORE READ
;TELL RPC2A WE GOT NIBBLE (ACCEPT = 1)
;SAVE LS NIBBLE IN TARGET FILE (VIA
;FSR)
;RIGHT JUSTIFY LS NIBBLE
;WE GOT NEXT RX REQUEST YET ?
;NO , SO LOOP BACK AND WAIT
;ACCEPT REQUEST (SET ACCEPT LOW)
;HAS REQUEST GONE UP? data is present
;LOOP BACK TILL IT DOES
;TIME DELAY TO ENSURE DATA STABLE
;BEFORE READ
;TELL RPC2A
;COMBINE MS NIBBLE WITH LS NIBBLE
;ALREADY
;IN THE FILE (VIA FSR)RETURN
;READ THE LS NIBBLE FROM THE BUS
;READ THE MS NIBBLE FROM THE BUS
WE GOT NIBBLE (ACCEPT=1)
:RXR LINE FROM THE RPC2A
page 21