Hi, "ke" wrote: > Are there any who has a simple routine to get > > Ones on digit 1 > Tens on digit 2 > Hundreds on digit 3 > Thousands on digit 4 > displayed on four LED-displays output from 16F84? > > Grateful for help! What you need is a binary to BCD converter. Here is a 16 bit version: bin2bcd: movlw .16 movwf ctr clrf bcd1 clrf bcd2 clrf bcd3 goto start adjdec: movlw 0x33 addwf bcd1,f addwf bcd2,f addwf bcd3,f movlw 0x03 btfss bcd1,3 subwf bcd1,f btfss bcd2,3 subwf bcd2,f btfss bcd3,3 subwf bcd3,f movlw 0x30 btfss bcd1,7 subwf bcd1,f btfss bcd2,7 subwf bcd2,f btfss bcd3,7 subwf bcd3,f start: rlf bin2,f rlf bin1,f rlf bcd3,f rlf bcd2,f rlf bcd1,f decfsz ctr,f goto adjdec return 1s digit will be on the lower nibble of bcd3, 10s on the upper nibble of bcd3 and 100s and 1000s will be on the lower and upper nibbles of bcd2, respectively. The lower nibble will contain 10,000s up to 6. regards, Reggie