ON 20060904@9:45:50 PM at page: http://www.piclist.com/microchip/math/radix/index.htm#38964.2184837963 James Newton[JMN-EFP-786] removed post 38964.2184837963 |Delete ' /techref/piclist/questions.htm PICList.com Questions: ' ON 20060914@11:39:24 AM at page: http://piclist.org/microchip/math/radix/b2bu-24b9d-xx.htm#38973.8797453704 James Newton[JMN-EFP-786] Published and replied to post 38973.8797453704 |Insert 'All these authors are wrong? How did you test?' at: '' NON OF THEM WORKS
What a wate of time to tyr them !!!
|Delete 'P-' before: '' but after: ' With Mplab 7.42
pic15f877a and the 18f452
I gues the problem is in the Indirect Addressing !

Steve
|Delete 'P-' before: '' but after: '
BIN2DEC	
	MOVLW	0XFF
	MOVWF	BIN1
	MOVLW	0X04
	MOVWF	BIN2
	MOVLW	0XFF
	MOVWF	BIN3
	MOVLW	0X04
	MOVWF	BIN4
	MOVLW	.32		; 32-BITS
	MOVWF	II		; MAKE CYCLE COUNTER
	CLRF	DIGIT1
	CLRF	DIGIT2
	CLRF	DIGIT3
	CLRF	DIGIT4
	CLRF	DIGIT5
	
B2BCD2	LFSR	FSR0,DIGIT1		; MAKE POINTER
	MOVLW	.5
	MOVWF	CNT

; MIKE'S ROUTINE:

B2BCD3	MOVLW	0X33		
	ADDWF	INDF0,F		; ADD TO BOTH NYBBLES
	BTFSC	INDF0,3		; TEST IF LOW RESULT > 7
	ANDLW	0XF0		; LOW RESULT >7 SO TAKE THE 3 OUT
	BTFSC	INDF0,7		; TEST IF HIGH RESULT > 7
	ANDLW	0X0F		; HIGH RESULT > 7 SO OK
	SUBWF	INDF0,F		; ANY RESULTS <= 7, SUBTRACT BACK
	INCF	FSR0L,F		; POINT TO NEXT
	DECFSZ	CNT
	GOTO	B2BCD3
	
	RLCF	BIN4,F		; GET ANOTHER BIT
	RLCF	BIN3,F
	RLCF	BIN2,F
	RLCF	BIN1,F
	RLCF	DIGIT5,F		; PUT IT INTO BCD
	RLCF	DIGIT4,F
	RLCF	DIGIT3,F
	RLCF	DIGIT2,F
	RLCF	DIGIT1,F
	DECFSZ	II,F		; ALL DONE?
	GOTO	B2BCD2		; NO, LOOP
	RETLW	.0		; yes
<blockquote></blockquote><blockquote></blockquote><u>
|Delete 'P-' before: '' but after: ' OK THIS ONE WORKS FINE. After some modification !!!\ BIN2DEC MOVLW 0XFF MOVWF BIN1 MOVLW 0X04 MOVWF BIN2 MOVLW 0XFF MOVWF BIN3 MOVLW 0X04 MOVWF BIN4 MOVLW .32 ; 32-BITS MOVWF II ; MAKE CYCLE COUNTER CLRF DIGIT1 CLRF DIGIT2 CLRF DIGIT3 CLRF DIGIT4 CLRF DIGIT5 B2BCD2 LFSR FSR0,DIGIT1 ; MAKE POINTER MOVLW .5 MOVWF CNT ; MIKE'S ROUTINE: B2BCD3 MOVLW 0X33 ADDWF INDF0,F ; ADD TO BOTH NYBBLES BTFSC INDF0,3 ; TEST IF LOW RESULT > 7 ANDLW 0XF0 ; LOW RESULT >7 SO TAKE THE 3 OUT BTFSC INDF0,7 ; TEST IF HIGH RESULT > 7 ANDLW 0X0F ; HIGH RESULT > 7 SO OK SUBWF INDF0,F ; ANY RESULTS <= 7, SUBTRACT BACK INCF FSR0L,F ; POINT TO NEXT DECFSZ CNT GOTO B2BCD3 RLCF BIN4,F ; GET ANOTHER BIT RLCF BIN3,F RLCF BIN2,F RLCF BIN1,F RLCF DIGIT5,F ; PUT IT INTO BCD RLCF DIGIT4,F RLCF DIGIT3,F RLCF DIGIT2,F RLCF DIGIT1,F DECFSZ II,F ; ALL DONE? GOTO B2BCD2 ; NO, LOOP RETLW .0 ; yes
  • ' ON 20060915@3:50:04 PM at page: http://piclist.org/microchip/math/radix/b2bu-24b9d-xx.htm#38974.8391782407 James Newton[JMN-EFP-786] removed post 38974.8391782407 |Delete ' THERE ARE MANY SINTAX ERRORS TO !!!

    I gues the author just theorysing !!!

    Show me a working code !
    Or beter just read up on it and make my own !
    STEVE
  • ' ON 20060915@3:50:20 PM at page: http://piclist.org/techref/microchip/math/radix/b2bu-24b9d-xx.htm#38974.8405208333 James Newton[JMN-EFP-786] removed post 38974.8405208333 |Delete ' What a waste of time ......rmmrmrmrmr

    Band me from this site please.
    Bunc of untested non working kode..
  • '