LCD Template Code For PIC16F84A (Help)

Status
Not open for further replies.

Nigel,

Im sorry if this has upset you.. changing your code and all.. I should have asked you first.

Thanks for bringing up the include. file .. I had forgot about them from the MPLAB tutorial.

Its all good and dandy on PortB now ..if it means anything

Good Deal

PW
 
I haven't looked too very closely at your code so I apologize ahead of time if I'm off base here.

I'm just wondering if one of your lookup tables may be causing problems by straddling a 256 byte boundary since you're only manipulating PCL and not PCLATH?

Also, speaking of tables, may I show you a very tight and simple alternative for your LCD_HEX routine (from Myke Predko) that doesn't use a lookup table?

Code:
;
LCD_HEX movwf   tmp1            ; save temporarily
        swap    tmp1,W          ; hi nybble in b3..b0
        call    HEX2ASC         ; 
        movf    tmp1,W          ; lo nybble in b3..b0
HEX2ASC andlw   h'0F'           ; 
        addlw   h'36'           ;
        btfsc   STATUS,DC       ;
        addlw   h'07'           ;
        addlw   0-6             ; ($FA)
        goto    LCD_Char        ; print ASCII nybble
There are also much better ways to manage, store, and print strings to your LCD but we'll save those suggestions until after you get past your current problems.

Good luck. Mike
 
Peter_wadley said:
Im sorry if this has upset you.. changing your code and all.. I should have asked you first.

No problem, and I'm not upset, the code is there for anyone to use and change as they require - just that you changed known working code, and then wonder why it doesn't work?.
 
All systems GO
 

Attachments

  • PC060008.JPG
    362.2 KB · Views: 172
  • PC060010.JPG
    354.9 KB · Views: 136
  • PC060011.JPG
    359.3 KB · Views: 148
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…