[Elecraft] Angle of attack - PIC Question - WAY off topic!

John J. McDonough John J. McDonough" <[email protected]
Mon Jun 2 13:08:01 2003


Dan,

You might think a little about the design.  With most microcontrollers, the
math is a little tough.  They are pretty simple devices and dealing with
sensor data takes quit a bit of thought (and programming).

The most popular, by far, PIC is the 16F84.  This part needs only to have a
crystal and +5 applied and away you go.  (You can get away with an RC
circuit or a resonator, but with teeny crystals at less than a buck at
DigiKey, why bother.)  There are better parts, but the 16F84 has remained
popular because there are simple programming circuits out there, and no cost
assembly and programming code.  Some of the other PIC parts are actually
easier to program, and can be programmed in-circuit (actually, the F84 can
too, but typically isn't).  However, the free software for these generally
only works with expensive programmers, so getting started cheap is a bit of
a challenge.

The problem is, for your application, the F84 doesn't have any analog I/O.
Sounds like you don't need any analog output, so there are quite a number of
parts with analog in which you could use, but you may find actually
programming them to be an expensive proposition.

I wonder, though, if comparators on your sensors to provide go/no-go to the
micro wouldn't be a better plan.  This would allow you to adjust the
setpoints (via trimpots) in the field as it were, without having to go back
and reprogram the part.  It would up the parts count some, but would allow
you to get started with minimal pain.

The programmer for the 16F84 can be built out of parts that you should have
in the junk box. (http://covingtoninnovations.com/noppp/index.html)  The
toughest part is the 18 pin socket.  A year or so ago I priced out building
one entirely from new parts at Radio Shack, and it came to around $15.  You
would have to search pretty far to find a way to get the price much higher
than that.  If I recall, I built mine entirely from the junk box.

If you go to Microchip's website, they have a tech note on in circuit
programming.  This could be a great convenience, but you need to plan for it
in your original circuit.  The available freeware, however, expects you to
have a purpose-built programmer.

Actually programming the part isn't all that painful, so if you're willing
to spend the time to write the actual programming software, you could open
yourself up to some of the other parts, and have the added advantage of in
circuit programming.  Not only is this a great convenience, but you could
also choose surface mount flavors, saving some weight.

Another little detail ... the most obvious flavor is the 16F84A-20/P.  This
is a 20 MHz part, and is about the cheapest of the 84's.  However, if your
design requires writing to the EEPROM frequently, you may choose the
16F84-10/P.  The EEPROM on the A part can stand significantly fewer write
cycles.  The 10 MHz not-A part is about a buck more than the 20 MHz A part.

Hope this helps.

72/73 de WB8RCR    http://www.qsl.net/wb8rcr
didileydadidah     QRP-L #1446 Code Warriors #35

----- Original Message -----
From: "Dan Barker" <[email protected]>
To: "Elecraft" <[email protected]>
Sent: Monday, June 02, 2003 12:35 PM
Subject: [Elecraft] Angle of attack - PIC Question - WAY off topic!


> I know this is the wrong forum, but there's so much brain-power here, I
just
> had to ask.
>
> Answers could include:
>
>  a) the <right> forum, or
>
>  b) a part number<g>.