;********************************************************************* ;* WEEDER FREQUENCY COUNTER ;* Fix for 2 line (8x2) displays that were sold as 16x1 displays ;* ;* Because most of these displays lack a controller chip :* it is required that the code manually sets the address for the :* 9th char. That is what this code does. ;* ;* Questions? ;* Drop me an e-mail cklymko@hotmail.com ;* ;* Scroll through your code and locate "Shift". ;* Paste the following code starting with "Shift" and ending ;* just before the first "sub" command. ;* ;********************************************************************* shift btfsc addcnt,6 ;added for 8x2 displays goto shift2 ; ; btfsc addcnt,3 ; ; goto line2 ;end the 8x2 code btfss addcnt,0 ;shift to opposite side of display? retlw 0x00 btfss addcnt,1 retlw 0x00 btfss addcnt,2 retlw 0x00 goto line2 ; btfss addcnt,3 retlw 0x00 line2 movlw 0xB8 ;Force the second line. addwf addcnt,f bsf addcnt,7 movf addcnt,w goto inst ;********************************************************************* ; added to move back to home position. ;********************************************************************* shift2 btfsc addcnt,3 ; goto line1 btfss addcnt,0 ;shift to opposite side of display? retlw 0x00 btfss addcnt,1 retlw 0x00 btfss addcnt,2 retlw 0x00 ; btfss addcnt,3 retlw 0x00 line1 movlw 0x39 addwf addcnt,f bsf addcnt,7 movf addcnt,w goto inst
Questions:
Comments:
Thank-you, this is a very nice patch and once I corrected my original WCT5 program with the added config statements it works great on JHD161 displays..