Forum Update - Announcement about May 10th, 2018 update and your password.

Parallel Communication With Basic Stamp


Is it worth trying?

Or is it better to just know the difference between parallel and serial and move on?

Just leave parallel alone and use serial?

It's just the part that it doesn't need a bit shifter sounds interesting.Simpler.

Do know the parallel hardware is hard to track down now.



Comments

  • 27 Comments sorted by Date Added Votes
  • Is it worth trying?

    Or is it better to just know the difference between parallel and serial and move on?

    Just leave parallel alone and use serial?
    Depends on what you are doing. If you have I/O pins to spare and need high speed parallel may be the way to go.
    It's just the part that it doesn't need a bit shifter sounds interesting.Simpler.

    Do know the parallel hardware is hard to track down now.
    Parallel can be simpler for some applications. It can also be more complicated due to the number of signals and timing constraints. Parallel also requires more in the way of hardware such as more connector pins, more wires, and more shielding to prevent crosstalk between the multiple signal wires. All of this increases the cost of parallel connections, which is why many of the PC connections went from parallel to serial.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • microcontrollerusermicrocontrolleruser Posts: 958
    edited April 26 Vote Up0Vote Down
    Will this work?

    Send 8 bits through the cable to hardware lighting 8 LED's directly?

    Seems like you set 8 bits to 1's and outputs the signals go out.

    Into the cable and out the other end to LED's.


  • Will this work?

    Send 8 bits through the cable to hardware lighting 8 LED's directly?

    Seems like you set 8 bits to 1's and outputs the signals go out.

    Into the cable and out the other end to LED's.

    Sure, that would work as long as the microcontroller I/O pins can provide enough current and the cable resistance is not too high. Typically parallel connections like that are short (1 - 2 meters). The old parallel (centronics interface) printers are an example, as are the older hard drives, although their cables were typically less than 0.5 meters in length.

    I frequently used parallel connections when I refurbished instruments and upgraded the electronics by replacing discrete logic with a microcontroller or PC.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.

  • 'replacing discrete logic with a microcontroller or PC'

    That sort of fits with using a Stamp 1 or 2 with parallel uses up all the pins.

    If you use a 40 pin Stamp/PIC then you can 'afford' using extra pins and program memory for parallel interface.

    Same idea about LCD and serial interfaces for debugging.Serial provided on Stamp not on PIC.



  • 'replacing discrete logic with a microcontroller or PC'

    That sort of fits with using a Stamp 1 or 2 with parallel uses up all the pins.

    If you use a 40 pin Stamp/PIC then you can 'afford' using extra pins and program memory for parallel interface.

    Same idea about LCD and serial interfaces for debugging.Serial provided on Stamp not on PIC.

    For all but the simplest instruments I refurbished and upgraded a BasicStamp would not have been a practical choice, not even the 40 pin models. Not so much because of the number of I/O pins, but primarily because of lack of variable/code space, and speed. With the Propeller speed has never been a problem and memory limits rarely problematic.
    As for I/O pins, most of them require some form of driver to handle higher currents and voltages so in most cases the drivers can be used to reduce the number of I/O pins needed as well. The speed and multiple cogs makes that simple to do.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • microcontrolleruser,

    StampWorks Experiment #23: Expanded Digital Outputs with Shift Registers (74HC595) shows as easy way to free up I/O pins on a BASIC Stamp.
    Experiment #24 uses a 74HC165 Shift Register to add extra Digital Inputs and Experiment #25 uses both to expand both inputs and outputs.

  • ' With the Propeller'

    Little too different than Stamp/SX/PIC for us right now.

    'StampWorks Experiment #23'

    That manual has a whole bunch of useful stuff in it.That is a fact.



  • ' With the Propeller'

    Little too different than Stamp/SX/PIC for us right now.

    'StampWorks Experiment #23'

    That manual has a whole bunch of useful stuff in it.That is a fact.

    The Stamp along with all the documentation, tutorials, code, and circuit schematics is a great resource for learning about microcontrollers and how to interface them to a variety of hardware. I was not suggesting you switch to the Propeller, only outlining the the limitations of the Stamp for projects beyond a certain level of complexity.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.


  • Plan is to connect two Stamps.

    Once the simple hardwire connection is made what can we add to it?



  • Plan is to connect two Stamps.

    Once the simple hardwire connection is made what can we add to it?

    Depends on how you connect them and how many pins are used or left over. There are many possible ways to connect using parallel connections. They range from simple one way buses that output multiple bits and a clock signal to those with bidirectional data and multiple control and status signals. If you use a lot of pins to communicate between the Stamps you may also want to use those pins to connect to other hardware as well.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.

  • Okay to use all the pins.

    In fact I think that is what the PIC was originally developed for.But don't quote me on that.

    It is okay to build this as full 8 bits coming through in parallel.

    That is kind of the point of the experiment.



  • Okay to use all the pins.

    In fact I think that is what the PIC was originally developed for.But don't quote me on that.

    It is okay to build this as full 8 bits coming through in parallel.

    That is kind of the point of the experiment.

    Eight bits is a logical choice. Now you just have to figure out a way to determine which Stamp is outputting and which is inputting. Simplest way is to make one the master and the other a slave, but there are other options. Having both output at the same time may damage the pins. Best to have resistors on the pins to avoid that.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.

  • This might be better to wait until hardware is hooked up and then move forward.

    Could be sneaky and just use jumper wires in place of parallel cable.

    Sent you a PM.Off topic.



  • microcontrolleruser,

    The StampWorks text is great because you not only see what the BS2 can do but learn how to hook it up to stuff and program it.

    Another great resource are the Nuts and Volts articles.

    In fact, I didn't know that there were several articles on the Propeller.
    #132, #133, #134, and #136 in Volume 7.
    https://www.parallax.com/downloads/nuts-and-volts-basic-stamps-volume-7
    I started with the BS2 and now I use the Propeller so take a look at those 4 articles which are written by the same person who wrote StampWorks.

    I didn't know there was a volume 8 so who knows what other goodies are in there.
  • This might be better to wait until hardware is hooked up and then move forward.

    Could be sneaky and just use jumper wires in place of parallel cable.

    Sent you a PM.Off topic.

    Replied to your PM.

    Jumper wires should be fine, I have used them for Prop-Prop comms. I have a dozen or so long jumpers that I cut in half, soldered a resistor between the two pieces, and put some shrink wrap on the resistor. They protect the I/O pins of the two Propeller boards from possible code errors.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.

  • What is added to circuit when it's a connection from a PC coming in to Stamp?

    That should ring a bell with me.

    I think bad things happen if you just connect right to a Port on a PIC or 8 pins on a Stamp.

    That is with signals from a PC.Voltages?


  • What is added to circuit when it's a connection from a PC coming in to Stamp?

    That should ring a bell with me.

    I think bad things happen if you just connect right to a Port on a PIC or 8 pins on a Stamp.

    That is with signals from a PC.Voltages?

    The PC serial port signal could go as high as +12V and as low as -12V, so yes, a direct connection would be a bad idea. There are RS232 driver chips to convert the RS232 levels to 0-5V or 0-3.3V levels and vice-versa. Search for "RS232 drivers"
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.

  • Now it would be a parallel port not a serial port.

    There might be 12v on the parallel port.

    Think they were used for high voltage programming.

    The parts out said no stock of parallel DB25 breakout boards


  • Ah yes, most parallel interfaces are 0-5V so a series 3.9K resistor might be all that's needed. Worst case might require a level translator.

    I was under the impression this parallel interface was for the Stamp-Stamp communications.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • microcontrollerusermicrocontrolleruser Posts: 958
    edited April 29 Vote Up0Vote Down

    Still Stamp to Stamp.

    Will connect 8 pins to data lines of parallel breakout board and see what happens.

    Should be able to transfer between Stamps.



  • Still Stamp to Stamp.

    Will connect 8 pins to data lines of parallel breakout board and see what happens.

    Should be able to transfer between Stamps.

    You will need at least one more pin to use as a clock/strobe signal unless you use 7 bits of data and the 8th bit as a clock, or have some type of communication protocol.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • microcontrollerusermicrocontrolleruser Posts: 958
    edited April 29 Vote Up0Vote Down
    How about Stamp to typical LCD display.

    Like this one.

    http://www.futurlec.com/LED/LCD16X2BL.shtml

    Parallax sold them in the 90's.Chris Savage had some leftover ones.

    That has start and stop bits in it.



  • This code should work with the Futurlec LCD. It has the same controller.

    https://www.parallax.com/sites/default/files/downloads/603-00006-2x16-Parallel-LCD-Documentation-V1.4.pdf
    Infernal Machine

  • Thanks!

    Here's some info in here.

    http://gen.lib.rus.ec/search.php?req=PIC+Microcontrollers:+Know+It+All&open=0&res=25&view=simple&phrase=1&column=def

    Chapter 3

    It's from 1997 when parallel port was the way to go.

    It's for PIC but it has the why's and wherefor's in it.



  • Here's LCD display w/cable like Parallax one.

    https://www.futurlec.com/DevBoardAccessories.shtml

    Third one down.

    Pinout might be different.


  • How about Stamp to typical LCD display.

    Like this one.

    http://www.futurlec.com/LED/LCD16X2BL.shtml

    Parallax sold them in the 90's.Chris Savage had some leftover ones.

    That has start and stop bits in it.

    I got one from Chris. Great guy.

  • Yes.I almost bought one.

    But that other one fits the 16F628 Controller board we got from them plus it has serial port connection.

    Same era as Basic Stamp coming out.

    The idea is to have serial port to Terminal program and a connection to LCD.

    It's the old way of debugging.

    Parallax Stamp boards trimmed it down to full time always on Debug serial port.

    The Parallax serial LCD's are actually for debugging.

    Sending little messages to them is just a byproduct of that.



Sign In or Register to comment.