Shop OBEX P1 Docs P2 Docs Learn Events
Brand new to Micros a few q's — Parallax Forums

Brand new to Micros a few q's

T ChapT Chap Posts: 4,217
edited 2006-05-21 05:43 in BASIC Stamp
I have a product I am developing that is currently logic based that sends commands to a servo motor controller that recieves a 4 bit address for 16 positions, program finished, start, stop(interrupt). It needs 14 inputs(0/5volts) that are simple high/low logic pulses.

As far as experience, I can build a board no problem, the chip selection and programming I have to learn fromn scratch.

The motor controller needs 6 inputs, and there are 3 LEDs to drive so I need 9 outputs at least.

I want to program in the simplest manner possible simple if then commands,

ie if input 1 is high, output a 100 ms pulse on pins a,b,c,d (hex 0000) and after 50 milliseconds output start command for 100 ms on pin x

ie if input 1 is high, and input 2 then goes high, ignore input 2


I don't know how to write the commands but I'll cross that bridge later. I just put the MAC version on my comp, but not sure how to interface to the chip when I get it. Is there a USB interface available?

Here is the main issue: What is the best and cheapest product to do this simple task of managing the inputs and outputting the results?

Is there a difference between the end result of programming on PC versus the MAC version? I dont have serial ports on the MAC but can add a card I suppose. Is there a reason to choose one over the other for programming as I have both, but prefer the MAC.

Thanks for any advice on getting up and running. I'd like to order a chip right away and get going.

Comments

  • JonathanJonathan Posts: 1,023
    edited 2006-05-20 15:30
    Orig,

    Have you looked into the SX series of chips? Siince this is to be a production thing, the price of the SX is very attractive. It's not *quite* as easy to program as the Stamp, but it sounds like your program will be very simple anyway. You do have to buy a programmer for the SX, but the IDE is free and like all Parallax products, easy to use.

    http://www.parallax.com/sx/index.asp

    If you do want a Stamp, sounds like the BS1 would do it for you, with a shift register input to expand I/O.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 15:48
    You can easily do software development for the BS2 series using a Mac, look at the free 3rd party IDE called MacBS2. If you get the USB Board of Education from Parallex for a development board, it has the USB to Stamp interface built-in. You just have to install the FTDI Mac USB driver from the FTDI website. It's harder to do development for the BS1 or SX with a Mac. You actually have to run Windows using Guest PC or Virtual PC. If you have one of the newer Intel Macs, there are other programs that will allow you to run Windows programs on the Mac
  • T ChapT Chap Posts: 4,217
    edited 2006-05-20 17:45
    Thanks for the tips. For the price the SX makes sense, expecially sinvce I need around 20 i/o's and it does not appear that the Stamps offer moe than 16, plus they are very pricey for production. The SX seems it will do far more than my simple app, but as it grows maybe that would mean I'd not need to always be upgrading chips.

    I downloaded the Macbs2 already and as far as the BS2 it seems straightforward, get a USB to serial and you are running. As far as the SX chip, what wuld be different than using the BS2SX for $49 over the SX chip alone for 3 bucks? Since the macBS2 supports the BS2SX, is it as simple as getting a USB to Serial plus a board to plug in the stamp, and that is all there is to it? How much more is involved to program the SX without the stamp? The Pbasic seems very easy to learn for my simple needs, does the SX need a diffrent software for programming that is more complicated?
  • T ChapT Chap Posts: 4,217
    edited 2006-05-20 18:08
    Hey I just noticed that I can get the OEM set for much cheaper than the Stamp, and it can be programmed with the Windows editer. Since I am using this for production in a board I am already building, this OEM embedding makes much more sense cost wise. I just need the fastest and easiest way to get up to speed. If using the BS2SX oem modeule, I'd be able to programn on the MAC or PC right? I am assuming that programming a stamp in the Windows or PC editor is much easier than compiling for the SX directly?

    Thanks for the help
  • ForrestForrest Posts: 1,341
    edited 2006-05-20 18:15
    You'll need a SX Blitz www.parallax.com/detail.asp?product_id=45170 or an SX Key www.parallax.com/detail.asp?product_id=552-00007 along with an SX development board www.parallax.com/detail.asp?product_id=45205 or a Professionial Development board to program an SX processor.
    Another option is to purchase a bundled kit that contains the SX Key plus a development board www.parallax.com/sx/programming_kits.asp

    The SX can be programmed in assembly language or a version of BASIC called SX/B - which is similar to Parallax Basic.

    You'll also need to be running Windows on a PC (or a PC emulator) to program the SX chip.

    The big difference between a BS2SX and an SX processor is the BS2SX contains a SX preprogrammed with the Parallax BASIC interpreter, a voltage regulator circuit, EEPROM, crystal and RS232 to TTL serial circuitry all built into a DIP24 module. If you want to use the SX, you'll need to buy a development board (like the SX Tech board) or design your own board that contains these elements.
  • ForrestForrest Posts: 1,341
    edited 2006-05-20 18:19
    You can program the BS2SX or the BS2SX OEM module with a Mac or PC - it costs $59 www.parallax.com/detail.asp?product_id=27294
  • T ChapT Chap Posts: 4,217
    edited 2006-05-20 19:14
    It looks like the options are limited to the Basic 2P 40 to get the I/O's I need. I need at least 20 i/o's and room to expand afterwards. Since there is an oem interpretter board available, does it make sense just to get a 2p 40 stamp plus the Pro Dev Board and and get up to speed. learn the programming and getting my system coded, then at some point switch to the OEM setup which should be identical as far as operation and cheaper?

    The macbs2 shows the BS2p40 as an option for programming, so with the pro dev board I can be running right away?

    Thanks again
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 19:30
    If you can order both the BS2p40 module and the BS2p40 Demo Board this weekend from the Parallex website, you can get a huge discount. You'll also need a USB to serial adapter ($34 for FTDI from Parallax #800-00030) if you don't have one already and a power supply (7.5 to 12V at 500-1000mA). I have one of the BS2p40 Demo Boards and a Keyspan #USA-19QW USB to serial adapter and a "wall wart" from Radio Shack for 9V at 1A. I takes more time to unpack the box than to install the serial driver and MacBS2, plug it all together and start working with the BS2p40.
  • T ChapT Chap Posts: 4,217
    edited 2006-05-20 20:16
    Very good, I am odering that stuff now. Does the Parallax USB to serial run on mac or do I need the Keyspan to get Mac drivers?
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 20:25
    The drivers are different between the Keyspan unit and the FTDI units that Parallax uses. Download the Mac FTDI drivers from their website <http://www.ftdichip.com/FTDrivers.htm>. I haven't used the Parallax FTDI USB to serial adapter, but the chip is the same as that built into the Propellor Demo Board and that works fine with the FTDI driver.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 20:30
    The Parallax USB2SER adapter also uses the FTDI chip and works just fine on my PowerBook with the FTDI driver. It turns out I bought the Keyspan adapter several years ago for Stamp development before other USB to serial adapters were in widespread use.
  • T ChapT Chap Posts: 4,217
    edited 2006-05-20 20:41
    I can pick up the keyspan USA 19hs that works on mac os x nearby, does it make a difference really? If not I'll just go get this one at Compusa.

    As for the chip in testing purposes, do you float all i/o's not in use, or just set them all to outputs instead of letting the inputs float around?

    Waiting on new gadgets to arrive is the worst.
  • ForrestForrest Posts: 1,341
    edited 2006-05-20 21:08
    The Parallax Professional Development Board has a FTDI USB to Serial adapter built-in - so there's no need to buy another one. You many need to install an older version of the FTDI drivers for Mac use according to www.muratnkonar.com/otherstuff/macbs2/faq.shtml#FTDI
  • Mike GreenMike Green Posts: 23,101
    edited 2006-05-20 21:14
    1) Either the Keyspan or the Parallax adapter should work fine .. whatever's convenient.
    2) For testing purposes, I just leave the inputs floating. It may increase the current draw of the chip, but that's really an issue only if you're running it off batteries. For production purposes, I'd tie each unused port (data) pin to 5V using a 10K resistor. For that matter, for production purposes, I'd put a 220 ohm resistor in series with any input going "off board" (for protection purposes) and a 10K resistor to ground or 5V (depending on what's considered "off") in case you disconnect the signal.
    3) The Stamp manual is excellent, very thorough, and full of examples. Parallax's website has lots of examples as well, particularly in the Nuts and Volts articles that are on-line. Most anything you will want to know has already been written about and is somewhere on the website.
  • T ChapT Chap Posts: 4,217
    edited 2006-05-20 21:17
    Ok I just ordered the Parallax usb to serial, BS2p40, demo board, cable, I should be able to turn on some LED's with this setup right? Now to get going on learning the programming. Thanks for the halp everyone.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-05-21 05:43
    The best place to start is the "What's a Microcontroller" text. You can download a copy of it from the Parallax website. Note, however, that it is based on the standard BS2, so there will be minor variations in the code examples.
Sign In or Register to comment.