;********************************************************************* ;* 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+
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..+
file: /Techref/piclist/weedfreq8x2LCD.htm, 2KB, , updated: 2014/4/10 15:57, local time: 2024/11/27 23:47,
owner: JMN-EFP-786,
18.221.192.248:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/TECHREF/piclist/weedfreq8x2LCD.htm"> WEEDER FREQUENCY COUNTER</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.