Shop OBEX P1 Docs P2 Docs Learn Events
Can someone help me? — Parallax Forums

Can someone help me?

Boygenius32Boygenius32 Posts: 5
edited 2010-12-28 17:37 in General Discussion
I'm trying to interface a Parallax serial LCD to a PIC16F690, using the PICBasic compiler, but I can't get the LCD to do more than display the cursor. I'm not sure what I'm doing wrong. Can someone help me out?

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-12-27 11:37
    The documentation is at the bottom of the page you linked and there is sample code for several of the Parallax chips there also. As to the code for a pic you should check the picbasic forums http://www.picbasic.co.uk/forum/forum.php
  • Boygenius32Boygenius32 Posts: 5
    edited 2010-12-27 11:43
    Well, I've tried that code, and it didn't work. The PICBasic forums registration promised to send me an email, but I've seen nothing of it.
  • FranklinFranklin Posts: 4,747
    edited 2010-12-27 11:46
    The code won't work if you have not modified it (and you didn't say you did) What do you get when you try to compile your code?
  • Boygenius32Boygenius32 Posts: 5
    edited 2010-12-27 12:02
    Well, I'm using Microcode studio with PICBasic, and I tried the serout2 code, modified to output on the TX pin (B.7) but nothing shows.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-12-28 03:38
    The cursor means that the Parallax Serial LCD has powered up and initialized correctly. There is also a test feature (read documentation). On the other hand, you may have your defaults for RS-232 communication wrong, especially the baud rate. Another problem maybe that your PICBasic code may presume that the LCD needs an initialization sequence - that would be an unnecessary duplication. Finally, you may not have your wiring right.

    AT some point, you really have to get all the details right and not presume somebody else's code is just going to work without verification, especially when mixing examples that have not been intended for a given product. Parallax does provide demo code that confirms function on there micro-controllers in PBasic and detailed documentation about defaults, but it is rather impossible to do so for all the micro-controllers and any and all languages in the world at any one moment.

    It certainly would help if you posted the actual code you are trying to use as all we can do is guess.
  • Boygenius32Boygenius32 Posts: 5
    edited 2010-12-28 04:41
    The cursor isn't blinking, it's just there.
    I've tried a dozen or more variants of code. Here's the last one I tried.
    output portc.2 
    output portb.7
    
    Serout2 portb.7,396,["Hello",10,13]
    
    
            High portc.2        ' Turn on LED connected to PORTc.2
            Pause 500       ' Delay for .5 seconds
    
            Low portc.2           ' Turn off LED connected to PORTc.2
            Pause 500       ' Delay for .5 seconds
    
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-12-28 05:56
  • lardomlardom Posts: 1,659
    edited 2010-12-28 07:28
    Boygenious32, I got an answer within minutes of my first post in this forum. I was blown away. I said; "This place is alive!". But my focus was on the Propeller. Your question suggests you have a lot of basic code questions. You will become 'hooked' if you participate in this forum but I strongly suggest a switch to the Basic Stamp or the Propeller.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-12-28 08:12
    PJ Allen posted a link for examples in PICBasic. Serial2 looks like an odd choice when compared to that posting. The cursor is a sign that the Parallax LCD is working correctly. I am just wrong about it blinking on start up. There are several cursor initialization choices - underline, no cursor, block, and blinking with the underline and block.

    The problem seems to be RS-232 communication.
  • Boygenius32Boygenius32 Posts: 5
    edited 2010-12-28 17:37
    Alright, I got it working. My LM7805 was throwing it for a loop.
Sign In or Register to comment.