Searching \ for 'porting 16f84 code to something bigger' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/microchip/ios.htm?key=port
Search entire site for: 'porting 16f84 code to something bigger'.

Truncated match.
PICList Thread
'porting 16f84 code to something bigger'
1998\02\05@044238 by Richard & Carolyn

flavicon
face
Hi All,
I've been following this list for some time now and I am Really
impressed by the questions and the indepth asswers that follow.

I have a project based on the 16F84 that uses 8 inputs in an automotive
application. I developed it to learn about pics, now I have a Customer
who wants 15 inputs. I have about a week to make it happen.
which pic is the easiest to port to, and the easiest to learn in the
shortest possible time? Nothing beats Learning by necessity.

Thanks in advance.

Richard Wells
------------------------------
Max Instruments
Automotive, Commercial and Marine Instrument Specialists
662 Beaudesert Road
Salisbury 4107
61 7 3277 7844
61 7 3277 4127 Fax

1998\02\06@044232 by paulb

flavicon
face
Richard & Carolyn wrote:

> I have a project based on the 16F84 that uses 8 inputs in an
> automotive application. I developed it to learn about pics, now I have
> a Customer who wants 15 inputs.

 Recommend two 74HC165 shift registers in tandem to multiplex 16 inputs
onto three lines (Latch, Clock, Data( in)) on the PIC.  The Clock and
Latch lines can be used for other purposes also with certain
restrictions.  A simple subroutine is called once to ripple in each 8
bits of data.  If you REALLY want I can give "starter" (notional) code.

 This assumes of course that you have a few dozen clock cycles to spare
on each read and three or four RAM locations.

 Cheers,
       Paul B.

1998\02\07@012131 by Russell McMahon

picon face
If speed of input is not critical, as an alternative to a
"bigger" PIC consider using a simple port extender. This can
take a number of forms. I squared C i/o ports are common and
code to implement the associated protocol is readily
available. A cheaper alternative is the use of serial shift
registers such as the 4021. Code for this has also been
discussed on the PIClist previously and I imagine that there
are people using this method who would be willing and able
to provide routines. (I use the 4021 as inputs and the 4094
for outputs to port extend an ST6 processor so my code would
not be of great use to you :-)).




{Original Message removed}

1998\02\07@215855 by Tom Gretton

flavicon
face
I like Paul's suggestion of the shift registers because it would be fully
extendable to more than 16 inputs (given sufficient program memory, RAM and
time).

An alternative that I have been exploring is the use of the 74xx148 8-Line
to 3-Line Priority encoder.

The TI datasheet (http://www-s.ti.com/sc/psheets/sdls053/sdls053.pdf page 6)
describes a method of cascading two encoders with a 74xx00 to build a 16 to
4 line priority encoder.

It's three chips instead of two chips and uses 4 inputs instead of 3 but it
only requires a single port read to acquire the switch setting.  It could be
used with the "interrupt on change" for RB<7:4>.  Another benefit is that
the hardware will automatically preclude the condition of two buttons being
pressed simultaneously.


Tom
{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...