RPC-000-DIL RADIOMETRIX [Radiometrix Ltd], RPC-000-DIL Datasheet - Page 22
![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 OUT_BYTE
;OUT_BYTE
;
;
;
;
;
;
;
;
;
OUT_BYTE
;
;
WACCEPT
;
;WE GOT ACCEPTANCE SO IT'S OK TO DRIVE BUS
;
;
WDUN
;
;LS NIBBLE OF (FSR) IS SENT , NOW DO MS NIBBLE
;
;
;
WACCEPT1
;
;
WDUN1
;
;
;
;--------------------------------------------------------------------
; SUBROUTINE - LISTEN_BUS , SET DATA BUS TO INPUT
;
LISTEN_BUS
;
;--------------------------------------------------------------------
Radiometrix Ltd, RPC2A
WRITE A BYTE FROM FILE POINTED TO BY FSR TO RPC2A
W IS DESTROYED
NOTE
WARNING
DETECTING A TXA FROM THE RPC2A.
(i.e. call LISTENBUS)
SWAPF INDF,W
ANDLW B'11110000' ;JUST THE NIBBLE
IORLW B'00000010' ;SET TXR LOW, LEAVE RXA HIGH
MOVWF RPC2A
BTFSC RPC2A,TXA
GOTO
BSF
MOVLW B'00001001' ;DRIVE BUS
MOVWF RPC2A_DDR
BCF
BSF
BTFSS RPC2A,TXA
GOTO
MOVF
ANDLW B'11110000' ;JUST THE MS NIBBLE
IORLW B'00000010' ;SET TXR LOW (BIT 2), RXA STAYS HIGH
MOVWF RPC2A
BTFSC RPC2A,TXA
GOTO
BSF
BTFSS RPC2A,TXA
GOTO
RETURN
BSF STATUS,RP0
MOVLW B'11111001' ;BUS TO INPUT
MOVWF RPC2A_DDR
BCF
RETURN
BYTE IS SENT TO RPC2A
BUS IS LISTENING TO RPC2A
THIS ROUTINE WILL HANG THE HOST UNTIL THE RPC2A
ACCEPTS THE TRANSFER OF TWO NIBBLES
WACCEPT
STATUS,RP0
STATUS,RP0
RPC2A,TXR
WDUN
INDF,W
WACCEPT1
RPC2A,TXR
WDUN1
STATUS,RP0
OUT_BYTE WILL SET THE DATA BUS TO DRIVE AFTER ;
THE CALLING ROUTINE MUST SET 4 DATA LINES
BACK TO I/P ON COMPLETION OF PACKET TRANSFER ;
;GET LS NIBBLE FROM FILE (VIA FSR) INTO
;BITS 4 to 7 of W
;SET TXR LOW, OUTPUT NIBBLE
;WE GOT A TX ACCEPT BACK YET?
;NO, SO LOOP BACK AND WAIT
;SELECT PAGE 1
;SELECT PAGE 0 BUS IS NOW DRIVING
;REMOVE REQUEST, DATA IS ON BUS
;HAS DATA BEEN READ?
;WAIT TILL RPC2A REMOVES ACCEPT
;GET MS NIBBLE FROM FILE (VIA FSR)
;OUTPUT NIBBLE + TXR LOW
;WE GOT A TX ACCEPT BACK YET?
;NO, SO LOOP BACK AND WAIT
;REMOVE REQUEST, DATA IS ON BUS
;HAS DATA BEEN READ?
;WAIT TILL RPC2A REMOVES ACCEPT
;SELECT PAGE 1
;SELECT PAGE 0
page 22