Im trying to display the information stored on a proximity card using a clock an data HID proximity reader. I used the sense pin on the reader to start the programe off. The problem is the lcd displays the same information all the time even if the data line is disconnected from the reader. Im using a pic18f252 at 4mhz ,ive also tried changing the mode on the shift in command and still the same problem. Ive included my code below.

Can anybody help on this one Sphere.


'--------------------------------P18F252----------------------------------------
@CONFIG_REQ
@ __CONFIG _CONFIG7H, _EBTRB_OFF_7H
@ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
@ __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
@ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
@ __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
@ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
@ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
@ __CONFIG _CONFIG3H, _CCP2MX_OFF_3H
@ __CONFIG _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
@ __CONFIG _CONFIG2L, _BOR_OFF_2L & _BORV_42_2L & _PWRT_ON_2L
@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
'--------------------------------PROXIMITY READER TEST--------------------------
DEFINE LCD_DREG PORTC 'LCD data port
DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4
DEFINE LCD_RSREG PORTC 'LCD register select port
DEFINE LCD_RSBIT 4 'LCD register select bit
DEFINE LCD_EREG PORTB 'LCD enable port
DEFINE LCD_EBIT 3 'LCD enable bit
DEFINE LCD_RWBIT 2 'LCD read/write bit
DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 2 'Number lines on LCD

B0 var BYTE

lcdout $FE,$80,"READER "
lcdout $FE,$C0,"TEST "
PAUSE 2000

START:
IF PORTC.7 = 0 THEN GOSUB GETDATA 'TO SENSE OUTPUT ON READER
GOTO START

GETDATA:
Shiftin PORTC.6,PORTC.5,0,[B0\10] 'CLOCK & DATA PINS ON READER
PAUSE 1
lcdout $FE,$80,#B0
LOW PORTB.2 'READER LED
PAUSE 3000
HIGH PORTB.2'READER LED
lcdout $FE,$80," "
RETURN