Shop OBEX P1 Docs P2 Docs Learn Events
LCD problem — Parallax Forums

LCD problem

danielreisdanielreis Posts: 16
edited 2010-07-13 15:25 in Propeller 1
Hi guys,

I'm with a problem in a project that uses LCD

First, I tried it in a Basic Stamp and everything worked fine.

Now, using the propeller and the OBJ: "LCD_16x2_4Bit", some strange things happens.

If I load the program into the EEPROM, some random characters appears at the screen, so I turn the propeller off and on again, and the correct characters appear at the screen.
In this project, I'm using a push button to switch between the menu options, and even if I reset the propeller, so that the correct characters are shown, when I press the push button to go to another menu option, again some random characters appear at the screen.

The connection that I'm using for the LCD and Propeller is the one explained in the "LCD_16x2_4Bit" OBJ

Does someone know what is happening?

Thanks,

Daniel Reis

Comments

  • DynamoBenDynamoBen Posts: 366
    edited 2010-07-12 16:40
    BasicStamp is 5V prop is 3.3V, is your display able to operate at 3.3V? If you are running it at 5V do you have resistors inline? We may need a schematic and more info on the display to troubleshoot this.
  • T ChapT Chap Posts: 4,223
    edited 2010-07-12 16:43
    The Prop will drive the Parallax 2x16 directly. Posting your code and schematic would help. What Prop pins are you using for the LCD?
  • danielreisdanielreis Posts: 16
    edited 2010-07-12 17:39
    DynamoBen said...
    BasicStamp is 5V prop is 3.3V, is your display able to operate at 3.3V? If you are running it at 5V do you have resistors inline? We may need a schematic and more info on the display to troubleshoot this.

    I'm running it at 5V, but without resistors. I attached the schematics that I'm using, that is from the "LCD_16x2_4Bit" (obex.parallax.com/objects/106/).
    For tests, I'm using the 2x16 ParallelLCD from Parallax (www.parallax.com/StoreSearchResults/tabid/768/txtSearch/lcd/List/0/SortField/4/ProductID/49/Default.aspx), but my project uses a 2x8 LCD, that works in the same way, so it doesn't matter by the moment. I just need to do the 2x16 LCD work.

    As the 2x16 ParallelLCD doesn't have backlight, pins 15 and 16 of the propeller are free.
    Also, I'm using a potentiometer to adjust the contrast.

    Thanks,

    Daniel Reis
    1018 x 492 - 48K
    680 x 492 - 18K
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-07-12 18:32
    The MSB of your LCD data buss is the LSB of the pin group -- does your LCD object account for this? I've written a 4-bit LCD driver that I use all the time, but my object wants the lowest-pin of the buss to be connected to DB4.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • DynamoBenDynamoBen Posts: 366
    edited 2010-07-12 18:33
    Its sounds like you have a pin floating, maybe r/w or something like that.
  • danielreisdanielreis Posts: 16
    edited 2010-07-13 15:25
    Jon,

    I downloaded your OBJ "jm_lcd4_ez" (obex.parallax.com/objects/474/) and tested it.
    With your demo, it works fine, even if i reset the propeller.

    When I try my program, everything works fine, and I can switch between the menu options perfectly, until reset the propeller. If I reset or turn it off and on, nothing appears at the screen.
    I'm using the schematics shown at your code, with 2.2k resistors in DB4 to DB7
    I will post here the start of my code:

    [code]

    CON

    'ClkFreq: 80 Mhz

    _XINFREQ = 5_000_000 'necess
Sign In or Register to comment.