4 line LCD with 16F88


Closed Thread
Results 1 to 2 of 2
  1. #1
    anj's Avatar
    anj Guest

    Default 4 line LCD with 16F88

    Gday All
    Ive just got a 16F88 and PBPro 2.43 ( awaiting 2.44 ).
    I have previously been mucking around with a 16F876 and PBP2.42
    On compiling a simple program to output "hello" to my LCD, i cant get it to work on a 4Line LCD with the 16F88.
    I have run the program through both the 16F876 and 16F88, and it works on the 876 no probs ( with a 2x16 and the 4x20 LCD ), but only on the 2x16 with the 16F88.
    ( 4 Line LCD is a Seiko L2034 B1J000 )
    I have downloaded the update patch for the 87/88 chips and i can flash leds etc no probs, so i know its programming OK, I just cant get it to start up the 4 line LCD.
    Reading the specs on the LCDs, they both appear to have identical initialisation routines an i am allowing a second at startup for this to occur
    Any ideas?

    Using PBP2.43 + 87/88 patch
    Mecanique MicroCode Studio 2.1.0.6 front end
    OSHON V1.4 programmer software
    Tait classic parallel programmer ( RB3 tied low whilst programming )
    config word1 3F65
    LCD is 4 data bits on RB4-RB7, RS on RB3 and E on RB2

    Andrew

  2. #2
    anj's Avatar
    anj Guest


    Did you find this post helpful? Yes | No

    Default 16F88 follow up

    Gday All
    Well i now have my 4 line LCD working, but now dont know why.
    ( And that hurts more )
    I tried using a 16F84a as well as the prior chips and this also worked perfectly with both LCDs, it was still only the 16F88 with the 4 line LCD that failed
    After several hours of frustration, i was grabbing at straws, so tried to forcibly reset the ANSEL register to 31 ( for the 16F88 chip ) and everything started working.
    All this does is set RB6 and RB7 to digital, and hence should have no effect that is different between LCDs, but it does.
    My test code is
    --------------------------------
    INCLUDE "modedefs.bas"
    Voltage VAR WORD

    DEFINE LCD_DREG PORTB ' Setup LCD 2x20 in 4 byte mode
    DEFINE LCD_DBIT 4 ' R/S on B.3, E on B.2
    DEFINE LCD_RSREG PORTB ' Data on B.4 - B.7
    DEFINE LCD_RSBIT 3
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 2
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 4 '4 line lcd mode ( but 2x16 works just as well???? )
    DEFINE OSC 4 '
    ANSEL = 31 ' force RB6 and RB7 digital (16F88 only)
    Pause 1000 ' Wait 1 second
    Voltage = 0
    Lcdout $fe, 1 ' Clear LCD screen
    loop
    Lcdout $fe, $C0, "Testing ", DEC Voltage, " "
    voltage = voltage + 1
    pause 1000
    goto loop
    end
    ---------------------
    I can get it to work, but dont know why.
    Is there a bug in the 16F88 preprocessing, or is something else happening, because i cannot figure it out now.
    Andrew

Similar Threads

  1. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  2. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  3. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  4. Simple 4 line LCD display with 18F4550
    By pic-ker in forum Code Examples
    Replies: 4
    Last Post: - 9th April 2007, 02:58
  5. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts