hi & thanks for sparing the time between the ****** is the code with a single value that works in a counter routine in an16f84 ;******************test value *********************** ; movlw 25 ;one single counter value ; movwf strttmr ;load 25 into strtmr reg. ;**************************************************** i am stuck with trying to use the lookup table below to replace the above value with selectable values i am using 2 switches to give one of four possible values this switch code is to be passed upon power up swA -----/ -----| rb0 gnd | |--------\/\/\/------------/ -----| rb1 10k swB ; ============= new select values for counter setup ============== ;code below is used for the 2 switches ; initiate strttmr from input pins & lookup table movf PORTB,w ;get values of RB0 & RB1 andlw 0x03 ; extract out bits 0,1 of PORTB (strttmr value) CALL table ; use look up table movwf strttmr ;move selected value from table to strttmr table addwf PCL,f retlw d'25' ; 00 = 250ms (switch position 1) retlw d'50' ; 01 = 500ms (switch position 2) retlw d'75' ; 10 = 750ms (switch position 3) retlw d'100' ; 11 = 1000ms (switch position 4) where am i going wrong please ? thanks very much for your help i appreciate it glen