Shop OBEX P1 Docs P2 Docs Learn Events
Problem using LCDdemo in Object Library — Parallax Forums

Problem using LCDdemo in Object Library

kenmackenmac Posts: 96
edited 2007-07-03 00:21 in Propeller 1
Hi folks,
I wanted to test the use of a 2 x 16 LCD on the Prop, so I tried the object that seemed most suitable, although it was really intended for a 4 x 16 LCD.
I used DemoLCD.spin/LCDdemo.spin from the library.
With everything connected correctly and using a known "OK" LCD, I couldn't get any response at all.
Although the program was meant for 4 line LCD's, it should have displayed something.
So, I had a closer look at the LCDdemo.spin and found a couple of what looked like errors.
First was in the CON block, defining the data group - it didn't match the actual connections!
According to me, it should read msb = 0, lsb = 3 (data bits were reversed)
"
The second was in the 'PUB init' block - I cross-checked with some Picbasic code which does the same job, and found that another command was required.
The following command line should be inserted above the current first command line:
commandOut(40) '4bitmode, 2lines, 5x7 format.

I edited the file accordingly, and loaded the main file - result is a working LCD!
The original file was more designed to show off the functions of an LCD, rather than a basic test.
I have made a simplified version for myself to just display text on the two lines to confirm the operation is OK.
It is named testLCD_2x16_4bit.spin and should be attached to this post.

kenmac

Comments

  • RichardFRichardF Posts: 168
    edited 2007-06-27 14:34
    Kenmac,
    Try modifying this object:

    Debug_LCD Test.spin
    It works just fine on my 4 X 20 LCD
    but the 2 x 16 may have a completeky different protocal.
    If I were you, I would just call Parallax on the phone.

    Richard
  • kenmackenmac Posts: 96
    edited 2007-06-28 01:53
    I raised this subject more to point to the fact that the example file didn't work.
    It was just luck that I picked that particular file to try.
    The Library file was actually DEMOLCD.zip, which holds the files that were used.
    I'm happy that I managed to get it working, to prove the method of using the Prop.
    The LCD can now be incorporated into a small project that I am planning.

    kenmac
  • LoridanLoridan Posts: 12
    edited 2007-07-02 23:56
    I brought this thread up in a search. I have installed the prop tool and the library but shockaroo, I do not have lcddemo.spin anywhere on my machine, did they actually remove it??? I would really like to look at that source because I'm trying to figure out how to wire up an HD44780.

    All I have is a spin file for the parallax lcds... Interesting... [noparse]:([/noparse]
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-07-03 00:21
    It's bundled in one of the visual object exchange items, named LCDDEMO.zip. There are several other files in object exchange, maybe they will fit your needs.
Sign In or Register to comment.