Shop OBEX P1 Docs P2 Docs Learn Events
Serial Cable? Really? — Parallax Forums

Serial Cable? Really?

HobiwanHobiwan Posts: 10
edited 2008-04-06 15:16 in BASIC Stamp
I bought the Super-Beginner's "What is a Microcontroller?" package from Radio Shack yesterday, and was surprised to see it came with a serial cable.

I have a 2006 iMac, and a 1995 Toshiba laptop. One of these machines has a serial port. The machine that has a serial port also has a USB port. It also runs linux (obviously any remotely version of windows is out on a 500Mhz machine), which makes getting the Stamp to work kind of a pain, especially for a newbie like me.

I'm not saying that most customers have the sort of setup I do, I'm aware that I'm in the tiny minority, but I have to wonder, given that even modern PCs are shipping sans-usb, what could be the use of including a serial -> serial cable, instead of a serial -> usb cable when Parallax sells a converter already? I think Parallax does good stuff (from what I can tell), and I'm not irritated enough yet to suspect that they are forcing a substantial amount of their customer base to go buy a converter, but, really, from what I've seen on the forums, it seems a lot of people have to get the converter.

People who work with this tend to be people who have new computers, I would speculate, and from a cost perspective, serial cables are more expensive to produce (and buy) than usb. I'm not rich, and so forking over an additional $15-$30 (plus shipping and the wait [noparse];)[/noparse]) isn't too appealing to me either.

If it's a technical reason, which I could understand, how do the usb->serial converters work?

So long story short, I have to get the converter to use the Stamp with my mac (and the unsupported mac Stamp software, or a virtual machine of windows), or get the serial connection on linux to work with the knowledge of someone who had to buy the "What is a microcontroller?" book. =)

Sorry for the rant, but I really am curious. I'll post the technical question about getting it to work on linux in another thread.

Comments

  • ForrestForrest Posts: 1,341
    edited 2008-03-29 16:16
    Parallax sells a USB to serial adapter here - it's pretty inexpensive ($17.95 including USB cable) and works with PC's and Macs www.parallax.com/Store/Accessories/CablesConverters/tabid/166/List/1/ProductID/379/Default.aspx?txtSearch=usb+to+serial&SortField=ProductName%2cProductName

    If you want to buy one locally, the Keyspan USB to serial adapters works well with PC's, Macs and the Basic Stamp www.keyspan.com/products/usa19hs/

    Note some of the USB to serial adapters on the market don't handle the handshaking signals properly, so they can't be used to program a Basic Stamp. Belkin is one of the problem brands.
  • HobiwanHobiwan Posts: 10
    edited 2008-03-29 16:26
    I did see that Parallax sells them, and I'm not entirely opposed to getting one, it just seems somewhat more complicated to me. I'm not sure if this is a good hobby for me yet, and I don't want to throw more money after it until I can get something to work. =)

    Thanks for the tip on the keyspan. For $40, though, it's a bit steep to get something I already have to work. Also a good tip on the handshaking, I won't buy one without some research.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-29 16:37
    To more directly answer your rant ...
    The serial programming port and the serial to serial cable is the single solution that works for all cases (as long as you have a compatible USB to serial adapter). There are still a lot of PCs out there with serial ports although you are unlikely now to find a PC without a USB port as well. Parallax does sell the same board with a built-in USB to serial adapter and they include a USB to serial adapter now in their Discovery Kit which is the basis for the kit sold by RadioShack. I suspect that RadioShack will eventually carry the newer kit that includes the adapter.

    You could always return the RadioShack kit (if it's in returnable condition) and buy the Discovery Kit from Parallax or the combination of the USB Board of Education, Stamp, and What's a Microcontroller Text and Parts Kit.
  • HobiwanHobiwan Posts: 10
    edited 2008-03-29 17:58
    You know, I think I might do that, if I can't get any output to the Stamp. I surmise that this particular Radio Shack is just selling off old inventory (they probably haven't sold one of these in a while) and what you said about Parallax having a new serial/usb version makes a lot of sense. However, the serial to serial cable doesn't work in all cases, as my own case attests. My 13-year-old laptop has a USB port on it, so this was a real head-scratcher.

    Thanks a lot for the assist. I'll keep this posted, for posterity.
  • ForrestForrest Posts: 1,341
    edited 2008-03-29 20:45
    Before you return the Radio Shack kit - check the prices on those other kits. The Discovery Kit is $159.95 and the USB Board of Education plus the What's a Microcontroller kit will set you back $140! The Radio Shack kit is a real deal at $79.95 in my opinion, and it's NOT an obsolete kit.

    Post Edited (Forrest) : 3/29/2008 9:03:00 PM GMT
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-03-29 21:20
    I bought my first Basic Stamp in the same form you did, at Radio Shack as well. Later I bought the Parallax USB/Serial adapter. I'm quite happy with both, and now besides that Homework Board, I own a Board of Education with a 2PX in it, two BS2 OEM modules that I soldered together myself (and yes, they both work fine), a 2pe MoBo (great unit!), a BS1· protoboard, and a Propeller protoboard. Several of those devices (notably the OEM modules, which don't have a USB option) have serial interfaces: the adapter works with any of them, and also with several other non-Parallax items I regularly use (for example, a Garmin Etrex Legend GPS unit, some rocket altimeters and radio telemetry devices, and an OpenTracker APRS device). If I hadn't bought the USB/Serial adapter for the Homework Board, I'd have eventually bought one for my other uses anyway.

    My advice: Keep the Homework Board, buy a USB/Serial adapter, and have a blast.

    Post Edited (sylvie369) : 3/29/2008 9:25:14 PM GMT
  • HobiwanHobiwan Posts: 10
    edited 2008-03-29 22:11
    As fate would have it, I lost the receipt anyhow. So I think I'm going to try running the windows software under wine (I'm a computer nerd first, then an electronics nerd. Getting software to work is a hobby in and of itself), and then probably just cave in and use someone else's computer while I work through the book, which shouldn't take more than a week. Great advice here, by the way, even though I doubt I'll be buying too many components in the future with serial connections, that was something that I hadn't thought of. The other kits are expensive, as you say, Forrest, but I can't help but think I bought an IBM PS/2 in the time of Core2Duos - same instruction set, severely limited =)

    Thanks again - I'll keep posted.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-29 22:27
    I haven't had too much luck running the Windows software under Wine. It mostly runs under CodeWeavers' Crossover which is an augmented commercial Wine implementation. You might do better following the instructions for running the Linux version of the compiler (tokenizer): bstamp.sourceforge.net/
  • ForrestForrest Posts: 1,341
    edited 2008-03-29 22:45
    >>The other kits are expensive, as you say, Forrest, but I can't help but think I bought an IBM PS/2 in the time of Core2Duos - same instruction set, severely limited =)

    You may feel underwhelmed with the serial port, but let's keep things in perspective. The Basic Stamp 2 has 32 bytes of RAM, 2048 bytes of program space, executes about 4000 instructions per second and it's programmed at 9600 baud. You don't need too much of a computer to program it!

    There's a good chance that you'll run across some other device in the future that has a serial port - might as well buy a USB to Serial adapter now.
  • HobiwanHobiwan Posts: 10
    edited 2008-03-29 23:10
    No, I know, just making a little joke. I didn't know there were different, um, levels? of Stamps until I cracked open the book and saw that there were 5, and that I had gotten the low end one. Since my programs are limited to DEBUG statements and turning on LEDs at the moment, it's really not a big deal. And it's not the port speed or any features of USB that I desperately need (though power over USB would be nice for the future), just the forward-compatibility.
  • ForrestForrest Posts: 1,341
    edited 2008-03-30 00:28
    If you got this www.radioshack.com/product/index.jsp?productId=2117994&cp
    then you did NOT get the bottom end model (BS1), You got the Homework board that has a built-in BS2, which is the most popular Basic Stamp.

    By comparison, the BS1 has half the RAM (16 bytes), 1/8 the program space (256 bytes) and runs 1/2 the speed (2000 instructions per second) than the BS2.

    Congratulations

    cool.gif
  • CactiiCactii Posts: 14
    edited 2008-03-30 03:14
    I bought the Basic Stamp Homework Board from Radio Shack as well just last week.

    I run a MacBook and it works fine with the Radio Shack USB-Serial converter.

    Search for the driver with Google it is called "osx-pl2303-0.3.1-10.4-universal.dmg" and it works great.

    I also run a Ubuntu 64 bit laptop and even though I didn't try very hard to get it running on it I'm sure it will work if you find a compatible adaptor. The Radio Shack one doesn't seem to be the way to go for a Linux box.

    By the way - Serial port is still the norm for this type of work.
  • HobiwanHobiwan Posts: 10
    edited 2008-03-30 14:07
    Yes, I think I'm beginning to see that, but I think my question has morphed more into a more contemplative "why is that so?", rather than "WHY IS THAT SO?!?!", if you see what I'm saying. I'm also kind of curious as to whether Parallax has a support plan for Linux in the works or not. Educationally speaking, it makes a lot of sense, especially in non-US countries.

    I might just bite the bullet and go get the one from Radio Shack. What's $30, anyway? Thanks for the tip on the driver. Have to be honest, I'd much rather do the coding on my iMac. =)

    Also thanks to Forrest for pointing out which chip I have. Puts it in perspective. Lots to learn...
  • DgswanerDgswaner Posts: 795
    edited 2008-03-30 14:45
    Why not Dual boot you Linux box, you could buy a big enough hard drive for next to nothing. if the dual boot part is that difficult, swap drives manually.

    As far as cost of adapters and such, This tends to be a very expensive hobbie. I'd plan on adding "bot parts" as a line item in your budget.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • CactiiCactii Posts: 14
    edited 2008-03-30 16:39
    The MacBS2 is a really nice environment too!

    The Linux command line tools seem to be a bit too archaic to use for me to develop something on it.

    Have fun!
  • HobiwanHobiwan Posts: 10
    edited 2008-03-30 21:40
    I had considered dual-booting. It might be the most effective way of doing it, but this computer originally shipped with Win95. Anything newer than that is basically unusable, and it's a laptop, so swapping HDDs is out. I'll know how expensive it is, I think, when I figure out why I'm doing it in the first place! [noparse];)[/noparse]

    I haven't tried out the MacBS2, though I saw it on Make, and it did look good. I was very close on the linux tools, but without diagnostics, I had no idea what was happening. I went to Radio Shack, and asked if they had Serial to USB adapters, to which the guy replied "our usb cables are over here", and showed me to the printer cables. Suffice to say, they didn't have the adapter, which is a shame.

    Poor Radio Shack. So much for specialty stores!
  • TheCowGodTheCowGod Posts: 1
    edited 2008-03-31 05:25
    I think the reason that serial is still the standard is that it's a very lightweight, bare-bones protocol. There are no drivers needed, no adapters to power. You simply connect the cable and start talking. As a result, it requires a lot less hardware and software on the microprocessor side to communicate with the computer. And, as other people said above, simple is the name of the game when you're working with such limited hardware and trying to keep costs low. When you start realizing that you have to buy a new board to include in every new robot/etc you build, you come to appreciate paying $35-50 for one rather than $150 or whatever it might cost for something more complex [noparse]:)[/noparse]

    Dan
  • HobiwanHobiwan Posts: 10
    edited 2008-03-31 14:44
    That's thoughtful analysis, Dan. But I have to beg to differ on a couple of points. First, the basic stamp is supposed to be basic, that is, a very low-end, simple beginner's chip. The fact that it CAN be used for all sorts of brilliant things by experienced users is remarkable, but in terms of its intended use, it's supposed to be a plug and play solution, which, in this day, means USB. Serial ports are no longer the norm. I'd venture that, based on my own experience, any computer that's modern enough to run the stamp's IDE might have a serial port, but will have a usb port. Second, the interface is handled not by the chip itself, but by the operating system. In other words, the very fact that I can get a serial to USB converter, from Parallax, which works under the big three modern OSs shows that the chip, which would have no knowledge of this change in form factor, is pretty agnostic, because it's your x86 processor that's handling the hard stuff.

    I'm aware this is taking it to the extreme, but USB itself might be on the way out in a few years. Even now, specialty laptops that have serial ports are being produced to communicate with legacy PBXs and routers and such things. I realize that the "Board of Education" not having a USB connection is not the end of the world, and since there's nothing I can do about it, I've gotten into the sort of shrugging of shoulder acceptance that comes with hardware hacking.

    What a great community. You'll all be interested to know, or not, that I've simply borrowed a windows computer from a few years ago, and am working my way through the book. The book itself is well-written and clear, but strangely it assumes a lot of knowledge about electronics from one moment, to nearly none the next. Still, it's very fun, and I appreciate the help here. =)
  • allanlane5allanlane5 Posts: 3,815
    edited 2008-03-31 14:53
    Actually, for $20 to $40 you can get a USB to Serial adapter that gives you a serial port good enough to talk to the BS2.

    And yes, the serial port protocol IS quite simple and straight-forward, so especially for low-end applications the BS2 is good for, RS-232 Serial is a good choice.

    And the main "problem" with USB is that it's a "master-slave" protocol -- you have a "master" device with a large hard disk for keeping drivers on, and a relatively simple "slave" device which tells the "master" what device it is so the "master" knows which driver to load.

    This is great for PC's with large hard disks. This is not so great for a small real-time embedded devices. Some people ARE trying to make small embedded "USB Master" chips, but it's STILL overkill compared to a simple RS-232 link.

    Bottom line -- I think RS-232 will continue to be supported as a very simple, but robust interface for sending small amounts of data. Probably through USB to serial adapters for 'large' devices like PC's. RS-232 has been around a LONG time already, and has a niche not easily filled by other standards.
  • XyviusXyvius Posts: 4
    edited 2008-04-06 11:47
    Hobiwan,

    I wanted to add a little food for thought to your earlier question. In addition to the "Keep it simple" reason others have mentioned, I would add this.· You have been evaluating the question of USB Vs. Serial purely from an individual stand point.· Many plant and production facilities, use BS2 (or similar) devices to operate and control logic functions of equipment.· Of the literal hundreds of these I have encountered not a single one uses USB.· The PLC (program logic controller) world is ALL serial. And remember, these are the guys that buy these things by the hundreds, not one or two here and there for various projects like us. So it doesn't suprise me that the standard is based off of their needs, and not ours. [noparse]:)[/noparse]
  • HobiwanHobiwan Posts: 10
    edited 2008-04-06 15:16
    I agree with the fact that serial has the lock on the industrial segment dead-to-rights. I used to work on PBXs and Routers. I'm not sure what the applications are of the Basic Stamp 2 itself in industry - I'm sure I could figure out with a little research, but I'm feeling lazy - but my overall point is this. The Board of Education, and some might argue even more so for the Homework Board, is meant to be an end-user consumer, basic-level product. It's the BoE and Homework board that I'm talking about, really, since they supply the interface to the BS2. Again, the fact that it *CAN* be controlled by a USB-adapted cable proves that it's possible.

    I think it's a sales and marketing issue more than a technical one. I imagine that no one is seriously looking at the BoE or Homework to use in their machining facility (I could be wrong, if I am, please let me know!). I for one would gladly pay the extra $15 for the usb connection over the serial if it requires one less adapter. I don't think it's a cost issue, because they could not include a usb cable on the assumption that everyone has one, and save themselves the surprisingly high cost of the bundled serial cable.

    The argument for having an always-handy extra adapter around makes sense for some, and not for others, I'm not debating that. For those for whom this is a big (expensive! [noparse];)[/noparse]) hobby, the adapter has probably saved their bacon a few times over. But, not to beat a dead horse, I can imagine a few scenarios where someone might be peeved to find out out that their new Radio Shack kit won't work with their computer, but not a single one where the new hobbyist comes home to find that, darn it, all of his or her computers have serial and parallel ports and now a usb->serial adapter is needed.

    To be clear, I'm not blaming parallax or radio shack. At the top, I was frustrated after spending a day trying to figure out how to get it to work with my scenario. I'm better now. =) I also know I'm talking out of my hat - this is literally my first foray into it (I'm on chapter 3 and already stuck!) - so I appreciate the indulgence.
Sign In or Register to comment.