savnik said:i change the number from 32 to 40
Movlf .32,N ; Init Loop counter
Movlf .40,N ; Init Loop counter
; Bin To BCD conversion ( 32 bit word -> 8 digits )
; Bin in Result, Result+1, Result+2, Result+3
; BCD in BCD3, BCD2, BCD1, BCD0
Bin2BCD
clrc
Movlf .40,N ; Init Loop counter
clrf BCD3 ; Init result
clrf BCD2
clrf BCD1
clrf BCD0
when i measure 99mhz show on lcd 99.000.000
but when i measure 102mhz show on lcd [1] 02.000.000
why ;
hi,
By changing the 'bit counter' value to 40 from 32 you are trying process 5 bytes, but you only have 4 bytes to work with, so you are overflowing the conversion and so you are 'losing' the MSD ie: the "1".