Brand new to Micros a few q's
T Chap
Posts: 4,223
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.
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
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
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?
Thanks for the help
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.
The macbs2 shows the BS2p40 as an option for programming, so with the pro dev board I can be running right away?
Thanks again
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.
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.