From: Spehro Pefhany
Subject: Re: PIC/Microcontroller recommendation?
X-Newsreader: Forte Agent 1.92/32.572
Date: Tue, 17 Dec 2002 05:36:33 GMT
NNTP-Posting-Date: Tue, 17 Dec 2002 00:36:33 EST
On 16 Dec 2002 20:58:15 -0800, the renowned firstname.lastname@example.org (Mike)
>I figured I'd get the extra 2 outputs and add both an extend and
>retract LED, to indicate the relative position of the arm with respect
>to the limit stop potentiometers; this would allow the user to set the
>limit pots without actually initiating movement of the arm (i.e, the
>LED would indicate if movement would occur).
Seems you'd need an additional input then, to disable the actual
outputs, or perhaps you plan to disable the relay drivers in which
case you might be able to do with the two outputs.
>Yes, but going with discrete logic components would incurr way to many
>components; I figured performance of the uP would not be an issue.
Yes, and as Frank noted, it's a good first project.
>> 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)
>Without thinking about it too much, how do I get by with my three
>inputs by only comparing 2 voltages?
There are two comparators, so you can actually compare 2 pairs of
voltages. You can common up one of the inputs on each comparator
(inside the chip, by configuring it) so only 3 I/Os are used) and
connect that common to your position input, then use the remaining
input per comparator for your two limit inputs.
Note that these comparators will not handle common-mode voltage
up to the +ve rail so you will have to energize your position
pot from a lower voltage if you wish to use them.
"it's the network..." "The Journey is the reward"
email@example.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com