no text on LCD


Closed Thread
Results 1 to 31 of 31

Thread: no text on LCD

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dj tempo View Post
    code in attatchment:
    That doesn't look much like PicBasic to me...why not download the PicBasic demo from melabs and see how much easier it is to use that?

  2. #2
    Join Date
    Jun 2007
    Location
    SW England
    Posts
    7


    Did you find this post helpful? Yes | No

    Default

    Dj:

    I could be barking up the wrong tree here, and confess to having little knowledge of the 4 x 20 LCD. But from looking at your two attached photos a possible cure might be that you need to connect LCD pin #5 to ground?

    Good luck.

  3. #3
    Join Date
    Jun 2007
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    yup, pin 5 is deffo connected to ground, its on the back of the lcd,
    one question i must ask is: should the crystal be making a square wave?
    (im running a 4 MHZ with 2x33pf caps) the signal measured between the 2 crystal legs pin 15-16 is more like a saw tooth waveform but with about 5 ms of flat at 0v, im assuming the problem is within my code.

    im just getting frustrated now.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dj tempo View Post
    one question i must ask is: should the crystal be making a square wave?
    (im running a 4 MHZ with 2x33pf caps) the signal measured between the 2 crystal legs pin 15-16 is more like a saw tooth waveform but with about 5 ms of flat at 0v, im assuming the problem is within my code.
    That's roughly about the normal for a crystal output. The 'amplifiers' inside the PIC take care of squaring off the edges and generating the clock signal. But are you sure it's 5ms of flat around 0v? and not possibly 5ns?
    If you've got that 'rounded off sawtooth' looking waveform, you're in good shape....get it....good shape....Ha! Ok, I'm done...

  5. #5
    Join Date
    Jun 2007
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    That doesn't look much like PicBasic to me...why not download the PicBasic demo from melabs and see how much easier it is to use that?
    cheers bud, couldyou point me in the right direction for this software, poss a download link.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If you post a SCHEMATIC of how you've got your hardware connected, along with the PIC you're using, I'm sure someone on this forum could throw a few lines of code together to write to your LCD and perhaps also flash a confidence LED to prove your hardware is working and post you a HEX with which you could program your PIC. That at least would prove if it's your hardware or software that's causing you grief. Then you could buy PICBasic and become a fully paid-up member... gives you status... people give up their seat for you on the bus... women will want you to kiss their babies (or claim you're the father)... you can run for president... etc etc...

  7. #7
    Join Date
    Jun 2007
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    the schematic is in the pic below, the only difference in my circuit is that i am using a 4 MHZ crystal instead of 32khz, i have compensated for this in my code, correct me if i am wrong.

    can some one please compile a code or send me a hex file to try.
    Attached Images Attached Images  
    Attached Files Attached Files

  8. #8
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Sorry......

  9. #9
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    I'm not that experienced enough to resolve this issue, especially as the code is assembly and not PicBASIC pro, but looking at the schematic it shows the values for the crystal capacitors being 68pf. If you look at the datasheet for then 16F84 ( http://ww1.microchip.com/downloads/e...Doc/30430c.pdf ) it states in table 8-1 that for a 4 MHz crystal the preferred values are 15pf - 33pf. Maybe having the higher values which are suitable for Khz timing xtals does not suit the PIC and its not actually running ?

  10. #10
    Join Date
    Jun 2007
    Posts
    19


    Did you find this post helpful? Yes | No

    Default

    the crystal seems to be timing as i have checked on an oscilloscope

    how is pic basic pro different from what i am doing?
    and is it easier to learn?

  11. #11
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Easier with PicBasic Pro ... yes indeed...
    Code:
        '
        '    LCD setup
        '    =========
    DEFINE LCD_DREG PORTB     ' LCD data port
    DEFINE LCD_DBIT 0         ' LCD data starting bit
    DEFINE LCD_RSREG PORTA    ' LCD register select port
    DEFINE LCD_RSBIT 1        ' LCD register select bit
    DEFINE LCD_EREG PORTA     ' LCD enable port
    DEFINE LCD_EBIT 2         ' LCD enable bit
    DEFINE LCD_BITS 4         ' LCD data bus size
    DEFINE LCD_LINES 2        ' Number lines on LCD
    DEFINE LCD_COMMANDUS 2000 ' Command delay time in us
    DEFINE LCD_DATAUS 50      ' Data delay time in us
    
    
    LCDOUT "HELLO WORLD"
    There's still some mistake in your code so far... not sure it's working @32KHz anyways

    V0 to to GND? not sure, should be connected to a POT wiper or PWM driven or voltage divider.
    Last edited by mister_e; - 18th June 2007 at 23:18.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Replies: 2
    Last Post: - 5th November 2009, 17:07
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. LCD issue with EasyPIC5
    By manwolf in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 15th June 2008, 09:17
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 0

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