;23JUL07 ;DEVICE = 16F628A ;The purpose is to output the "REQA" command to a 13.56 MHz modulator to elicit a response from a ISO14443 RFID card. ;Added blanking output LIST P=16F628a, F=INHX8M #include __CONFIG 0x3F09 ; XT (Ext) Clock, No Nuthin' ; Equates RESET_V EQU 0x00 ; Address of RESET Vector OSC_FREQ EQU D'1695000' ; Oscillator Frequency is 13.56 MHz /8 ; Registers Counter EQU 0x0F ; Delay Counter Register ;************************************************************** ; Begin Program ;************************************************************** ORG RESET_V ; RESET vector location RESET GOTO START ORG 4 ; INT vector ;************************************************************** ; Initialization Routine ;************************************************************** START ; POWER_ON Reset (Beginning of program) CLRF STATUS ; Do initialization, Select bank 0 CLRF INTCON ; Clear int-flags, Disable interrupts CLRF PCLATH ; Keep in lower 2KByte BSF STATUS, RP0 ; Select bank 1 MOVLW 0xFF MOVWF TRISA ; RA7-0 Inputs CLRF TRISB ; RB7-0 Outputs BCF STATUS, RP0 ; Select bank 0 MOVWF PORTB ; Make all PORT B outputs high CLRF PORTA ;************************************************************** ; De botte bijl methode, hij werkt altijd! ;************************************************************** Begin BSF PORTB,1 ; Blank detector NOP BCF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BCF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BCF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BCF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BCF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BCF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BSF PORTB,0 BCF PORTB,0 BSF PORTB,0 BCF PORTB,1 ; Enable detector MOVLW 0xFF MOVWF Counter ; Delay for coupla milliseconds Delay NOP ; 2.39 us delay NOP NOP NOP DECFSZ Counter, 1 GOTO Delay GOTO Begin END