Menu

lcd issue

Anonymous
2007-11-21
2013-05-30
  • Anonymous

    Anonymous - 2007-11-21

    I have entered a program to print a message on an lcd using 4 bit mode on a 16f84a. I get an error message when trying to assemble.
    message reads - lcd.h(386) : syslcdtemp.0 is not valid I/O pin or port
    .
    My program is similar to the one in the LCD LIBRARY thread previously on this page.
    Pins used are portb 4-7(db4-7), porta.2(rs),porta.0 (en). Assigned because that is the device available to test this pic.
    any clues?
    regards
    Bob

     
    • kent_twt4

      kent_twt4 - 2007-11-21

      You need to hook up the R/W pin, because GCBasic checks the busy flag of the lcd controller.

       
    • Nobody/Anonymous

      Thanks Kent. So what your saying is I can not write a program for this device using gcbasic- is that correct? The r/w pin is earthed in this particular device and does not come back to the pic.
      regards
      Bob

       
    • kent_twt4

      kent_twt4 - 2007-11-21

      My lcd's have all their pins available, so they work just fine with GCBasic.  In your case, if the pins are not available, then that is a hurdle.  I am inclined to lift the ground and solder/route the extra wire back, but that's just the way I work.  Others would say do it in software, substitute some arbritary delay instead of checking the busy flag, and call that good.  Just depends on what you are most comfortable with.

      If its really important to not change the device, maybe a 2 wire routine would work?  Its been a long time since I've looked at that, so could be way off base.  The implementation is based on a Mike Predko design mentioned in an earlier post.

       
    • Nobody/Anonymous

      Thanks,I will look into that method.
      regards
      Bob

       
    • Nobody/Anonymous

      I've made some alterations to the LCD routines in the latest update of GCBASIC. If you download the update. then adding this:

      #define LCD_NO_RW

      to your program will stop GCBASIC from using the R/W line.

      The update is available in two files - http://gcbasic.sourceforge.net/newfiles/update.zip or http://gcbasic.sourceforge.net/newfiles/update-nochipdata.zip . The latter does not include the newest chip data files.

       
      • Nobody/Anonymous

        Just wanted to thank whoever started this thread and the person who updated GCBASIC.  This fixed my problem!

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.