Shop OBEX P1 Docs P2 Docs Learn Events
SERIN Question — Parallax Forums

SERIN Question

kenwtnkenwtn Posts: 250
edited 2006-02-16 16:09 in BASIC Stamp
·· OK, So I am still a NEWBIE and they say no question is a dumb one, well I may be about to prove that wrong. Every example that I have seen with SERIN, SEROUT uses either PIN 0 or PIN 8 is there something special about those PINS or will any PIN work with SERIN, SEROUT?
·

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-02-16 12:07
    kenwtn -

    Also a newbie who hasn't found the PBASIC Stamp Manual or the Stamp Editor Help file, either of which would have answered this and many other forthcoming questions. Any pin port (0-15) can be used for SERIN and SEROUT. Pin port 16 can also be used, but should be considered a special case, as it operates slightly differently.

    Regards

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • kenwtnkenwtn Posts: 250
    edited 2006-02-16 12:19
    That was part one of the question. I have a board that I want to put to LCD on. One LCD is Serial and calls for use of PIN-0 tp be connected to RX and then I have another LCD that is Parallel and calls for PIN-0 to be connected to E (Connectino-6 on the LCD). So I was wondering if I should try to use PIN-0 as a dual function PIN or simply move the Seral LCD connection to another PIN that was being unused.
    It seems that the best bet is just to move the Serial connection to PIN-0 to another PIN and change the program.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-02-16 12:47
    kenwtn -

    Are you looking to use one or two LCD's on this board? It's hard to tell from your message.

    Are both of the LCD's serially accessed, or is one serial and one parallal. If you're not sure, just give us the Catalog Number of the Parallax LCD you're using, as that will answer the question.

    I suspect the Parallax LCD is parallel accessed, and you're looking to use the LCDOUT command available on the more advanced Stamp platforms. Is this correct?

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • kenwtnkenwtn Posts: 250
    edited 2006-02-16 13:01
    I have two LCD's one is the Serial 2 X 16 I purchased from Parallax, the other is 4 X 40 and has to be connected parallel. I got the 4 X 40 from a freind that works for Newhaven Displays and it is completly compatiable with Hitachi LCD that Parallax sells. I was told by a Tech at Newhaven the Hitachi is like the industry standard and that the pinouts and commands will all be the same. The only differance will be one will be connected serail and the other parallel.
    Why two LCD on one board? good question and my only answer is because I have two LCD's. The robot I am building of my own design will have individual modules each module powered by one of the BS2 series of stamps. This happans to be the display module for my robot and I thought I would give it two LCD displays. I may want to monitor information from two other modules at the same time or something like that.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-02-16 13:31
    kenwtn -

    The Parallax serial LCD can be used on any pin port that is not otherwise used. Just as a general matter, it might be wise to separate the two LCDs by a couple of Stamp pins, if possible, just to prevent any possibility of crosstalk.

    Where you place the Newhaven parallel LCD depends on whether you are planning to use the LCDOUT command found on the more advanced Stamps (BS2p, BS2pe, BS2pe and BS2px). If you ARE planning to use the LCDIN, LCDOUT or LCDCMD commands, you will need to check the PBASIC Stamp Manual or the PBASIC Help File for reserved pins used by those commands. A total of 4 pins are used when using that LCDxx command series.

    If you are NOT using the LCDOUT commands, the pin assignments are totally up to you. Same caveats mentioned above regarding potential crosstalk still apply.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • kenwtnkenwtn Posts: 250
    edited 2006-02-16 13:35
    That part of crosstalk did not occur to me and it makes sense so I will keep that in mind. You may have saved me alot of problems that would have been hard to isolate. Thank-you for all your help and advice.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-16 15:36
    Using the LCD commands on the BS2p series will cost you 8 I/O pins if you're not sharing anything on any of the pins.· 4 are used for data bits, and 3 for control.· But the 0/1 or 8/9 pin are lost together, hence 8 pins.· Now, a 4X40 Display (being Hitachi Compatible) requires 2 controllers and thus would have two enable pins.· The LCDxx commands only allow for a single controller, so accessing the other half of the display may require you to not use the LCDxx commands, if available, since you'd lose access to the second enable line.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • kenwtnkenwtn Posts: 250
    edited 2006-02-16 15:59
    This is why I start asking all these questions before I start building. It would now seem I have yet another problem. I was hoping to use just a BS2 but it will not support LCD commands. Is there anyway to control a parallel LCD without using LCD commands. I have 2-BS2, 1-BS2p24, 1-BS2px24, and 1-BS2pe. Since displaying info is not a real intense function I would rather save my BS2p's for another one of my modules that might require something a bit more powerful.

    HELP! Since I am a NEWBIE before the BS2p's there was no way to use a parallel LCD? I took a very quick look throught the book but did not see anything that might work and allow me to use just a BS2 to control a parallel LCD.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-02-16 16:02
    In fact I am encouraging you to not use the LCD commands.· You can certainly connect the LCD Displays to a BS2.· See the code examples on the following link, they should get you started.· There is one pin in the port group that is not being used and could be instead used to trigger the second enable line for the second controller.

    http://www.parallax.com/detail.asp?product_id=603-00006

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • kenwtnkenwtn Posts: 250
    edited 2006-02-16 16:09
    SUPER! I took a quick look and that looks like it will solve my problem and allow me to use a BS2 and not one of my other BS2p's. I can use that code to control the 4x40 parallel LCD I have connected, and I will go with SEROUT to control the 2X16 serial LCD I got. So anyone see any other problems I may run into hooking up two LCD to a single BS2 module?
Sign In or Register to comment.