From: Jonathan Kirwan
Subject: Re: PIC/Microcontroller recommendation?
X-Newsreader: Forte Agent 1.92/32.572
NNTP-Posting-Date: Mon, 16 Dec 2002 22:58:57 GMT
Organization: AT&T Broadband
Date: Mon, 16 Dec 2002 22:58:57 GMT
On Mon, 16 Dec 2002 21:11:02 GMT, Spehro Pefhany
>On Mon, 16 Dec 2002 17:18:54 GMT, the renowned Jonathan Kirwan
>>I see three digital inputs:
>> "extend" momentary pushbutton
>> "retract" momentary pushbutton
>> "stop" momentary pushbutton
>>and three analog inputs:
>> "extend limit" potentiometer
>> "retract limit" potentiometer
>> "arm position" potentiometer
>>I assume the four outputs are for the motor control?
>Yes, what's the deal? Are there two motors? If so, are they
>run exactly at the same time? Why are there not just two
>outputs- extend and retract?
>For only 100 units, I'd suggest something like the PIC16F87x
>series. There are cheaper parts, but that one is reasonable
>($2.74 in 100 qty for the 870), supports the ICD (since much of
>your cost will be development) and has an 10 bit ADC, which
>will give you resolution of better than 1 part in 700. With
>28 pins and 2K x 14 words of code memory you shouldn't be
>worrying about running out of capacity.
That was a PIC group I was thinking about, though I think I was
thinking about the 873 at the time. But they aren't as cheap,
being $3.87 in 100s. Actually, what I had in mind was the
PIC16F628, in the PIC family, but you mention it below.
>>Whatever you pick, you should make sure that the ports support
>>weak pullups, which is probably adequate for your momentary
>>buttons, without the need for an external pullup or pulldown.
>If you try this, better have some filtering on those inputs,
>with only 50-400uA, long leads to the switches and those 1A
>inductive motors being switched by relays...
I guess he'll have to judge whether parts count is more
important. I've had good success with software debouncing. But
it's no panacea. Stronger, external pullups and filtering may
be useful. Or optoisolation. Or a host of other options.
>I'd also mention that the MSP430 is limited to 3.6V Vdd and
>(IIRC, could be wrong) is not offered in DIP package, only
>SMT packages, which may or may not be an issue.
Yes, it *is* limited to 3.6V. That's a slight problem for me,
just now. Solvable, but there it is. And the packaging is
limited. But with 100 boards, I don't imagine it's a problem.
I like DIP because I still wire wrap somewhat or use protoboard.
But I'm getting used to SMT, more. And SMT isn't the trouble to
do, it once seemed. It's BGA that kills me, now.
By the way, even the ($1.46/ea in 100's at Digikey) MSP430F1101
can do the job. It'll run from 2.2V to some 3.6V, can use its
internal DCO (no external crystal, resistor, cap, or other part
needed), and has a comparator. Of course, there are three pots
to read. But if those low resistance pots can be connected to
digital outputs, when needed to be read, and those outputs
turned to high impedence inputs, when not needed to be read, it
may work out. Just barely enough pins, I think, but maybe I'm
being incautious. TI's SLAA104 is titled, "An MSP430F11x1
Sigma-Delta Type Millivolt Meter" and might be worth a look.
>BTW, almost anything you could come up with would be overkill
>for this application.
>Another possibility would be to use the 18-pin PIC16F628, which
>has no ADC, but it does have two analog comparators, which is all
>you really need if you think about it. It costs $1.92 in 100's,
>but no ICD (ISP, though, so you can do crash and burn
>development if you like)
Anyway, I think it'll be easy enough to find a candidate. It'll
be more about the other issues than finding the only device that