Searching \ for '%16F877 or 18F452?%' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: '16F877 or 18F452?'.

_Sub string match.
PICList Thread
'[PIC]: 16F877 or 18F452?'
2002\12\03@040540 by Peter McNulty

picon face
Hi,

I need recommendation on which PIC to choose. I am new to PIC programming, but over the last few days I've been programming a 16F877 until lets say it decided to reach about 100C :)

The 18F452 looks nice and easy to program like the 16F877 however, does it have banks? Looking through the datasheet, is says it does, but then all the PORTx, TRISx, ADRESx and other special functions are all in one table, maybe all in Bank 0? They are roughly the same price it looks like.

Using either chip, I will be converting to the lower model later on for cost/size reasons but would like to test on the 40 pins versions.  I'll be using ADC,  ~10+ outputs, 5V. So which do you recommend?

-Peter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@043054 by kben

picon face
Hi Peter,
You probably want to start with the newer chip 18F452.
As for banking issues goto piclist.com and look
for the Mailing List Archives, the differences in banking, etc...
were just discussed under the topic tag "[PIC]: 18Fxx2 help"
This thread should answer your questions. I think it started on
November 29th or 30th of this year.


{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@050854 by Claudio Tagliola

picon face
Go for the 18, definately. If you can switch, just do it. The 18 is at the
beginning of it's life cycle and all the new exciting things are happening
with the 18's. The 16's are now in the middle, probably only going downhill
from here.

I'm used to working with a compiler, so I don't give a rat's <ahum> a lot
for banking issues, they automagically disappeared when the compiler's done
with it.

Claudio
-----Oorspronkelijk bericht-----
The 18F452 looks nice and easy to program like the 16F877 however, does it
have banks? Looking through the datasheet, is says it does, but then all the
PORTx, TRISx, ADRESx and other special functions are all in one table, maybe
all in Bank 0? They are roughly the same price it looks like.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@055659 by Andy Kunz

flavicon
face
18F.  If you go with a C compiler (I prefer http://www.htsoft.com) then you can
literally use all the source code from one to the other.  The only things
needing changing are the OPTION and CONFIG registers.

Andy

At 05:06 PM 12/3/02 +0800, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@062230 by Michael Rigby-Jones

picon face
{Quote hidden}

I would recommend starting with the 18F series for a new design.  The
instruction set is better, they have a decent sized stack, loads of RAM, the
banking architecture is much better, some of the peripherals are improved
and you are future proofing yourself.

The 18F data memory does still have banks, but they are now able to access
256 bytes each, and setting the banks is a snap with the special
instruction.  Improvements to the PORT's mean you can set/clear port pins
using the new LATch register without worrying about Read-Modify-Write
issues.  The 18F's have on board programmable brownout reset, and a PLL to
multiply up the clock frequency by 4 times (if you want to).

About the only downside I have found so far is that the ADC S&H capacitors
are more leaky due to the reduction in feature size on the die.  This means
a maximum of 2.5KOhms source impedance is needed for datasheet performance.
The 16F series could use 10K.

Mike

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@064547 by Jan-Erik Soderholm

face picon face
Mike wrote :

"The 18F data memory does still have banks, but they are now able to access
256 bytes each, and setting the banks is a snap with the special
instruction."

Note that you can "switch" between one of the all-GPR banks
and the access-bank (with 128 GPR's and all SFR's) just by
setting a flag *IN* the instruction itself. You only have to
add the special bank-switching instruction when selecting
another of the 256 GPR banks.

So you can have access to 256+128 bytes GPR and all 128 SFR's
at the same time without any extra instructions or speed penalty.

And also, the MOVFF can access all 4096 data space addresses
directly. And on the 18F, the WREG is mapped as an SFR, so MOVFF
can move between  W and *any* GPR (or SFR) in *any* bank directly.

*MUCH* better then on the 16F !!

The only thing I miss is a 8-pin 18F :-)

Jan-Erik Svderholm.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@075522 by Hazelwood Lyle

flavicon
face
After spending a weekend with MPLAB 6.10 and 18F248,
Coming back to work and using the older MPLAB with 16F874
was a bit of a letdown.

Good thing I designed the board to support the 874 OR the
18F458. I told the boss this morning I need a software upgrade
and a few 458's to finish the project.

The RAM banking is much more civilized in the 18F's, but on
the 18Fxx8 (CAN) PIC's there's only 96 bytes of GPR in the
ACCESS register, and not all of the SFR's fit in the remaining 160
bytes. Unless I can keep my total RAM needs at or below
96 bytes, I still need to occasionally play with BSR.

Can anyone offer tips on ISR entry and exit routines with the 18F
chips? There is a bit more built in support, but more choices as well.

Having 2 interrupt vectors, and the option for "fast" register storage
looks real promising,(or confusing). Any suggestions would be
welcomed.

Lyle

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\12\03@140156 by Wouter van Ooijen

face picon face
> I need recommendation on which PIC to choose. I am new to PIC
> programming, but over the last few days I've been programming
> a 16F877 until lets say it decided to reach about 100C :)

short: in absense of other arguments (available tools, help etc.) just
take the most capable flash PIC, at the moment the 18F452, and
'downsize' later.

long: read http://www.voti.nl/swp

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads



'multiple 4x4 keypads to 16f877 or 18f452?'
2004\08\22@171509 by iain duncan
picon face
I am a newbie to pics and electronics, though I have no problems with
assembly programming. I get much more confused by what's going on
outside the pic. I would like to interface four 4x4 keypads to one chip
that will also do midi output, which i guess means multiplexing of some
sort, is this likely to be a terribly difficult project? Can anyone tell
me what other parts I will need to get more than one keypad into the
pic, or point me at any good resources for this? Is there anyone on here
who might have made a keypad-to-midi controller?

Also, will it be possible in such a situation to write the firmware so
that it can accept multiple simultaneous keypresses across the pads, or
is that reall hard?

Thanks
iain

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body

2004\08\22@181158 by Kevin

flavicon
face
Well, I would probably use a F877, because there are more
code examples on the net. However, the F452 is easier to
learn if you are new to PICs.
For code examples try http://www.piclist.com and also
www.drzyzgula.org/bob/electronics/frtom.shtml
Fr. Tom McGahee has a good solid example of a
4x4 Keypad project half way down the page.
The F877 is a 40 pin device so you might not have to
multiplex depending on you requirements.
Also try to use topic tags E.G. [PIC]: , [EE]:

Good luck,
Kevin

On Sun, 22 Aug 2004, iain duncan wrote:

{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

2004\08\22@183814 by Byron A Jeff

face picon face
On Sun, Aug 22, 2004 at 02:01:35PM +0000, iain duncan wrote:
> I am a newbie to pics and electronics, though I have no problems with
> assembly programming.

As I always say, learn PIC assembly so you can converse with folks, then
look to higher level languages.

> I get much more confused by what's going on
> outside the pic. I would like to interface four 4x4 keypads to one chip
> that will also do midi output, which i guess means multiplexing of some
> sort,

It does.

> is this likely to be a terribly difficult project?

Not really. It'll require some external hardware I'd guess off the top of my
head.

>Can anyone tell
> me what other parts I will need to get more than one keypad into the
> pic, or point me at any good resources for this? Is there anyone on here
> who might have made a keypad-to-midi controller?

It'll be an interesting device for sure.

>
> Also, will it be possible in such a situation to write the firmware so
> that it can accept multiple simultaneous keypresses across the pads, or
> is that reall hard?

That'll make it harder.

OK let's talk about organization. You can organize your keypads in 3
configurations:

1) 4 individual keypads.
2) A single 8x8 keypad.
3) A single 4x16 keypad.

Each will require a different amount of I/O

1) The 4 individual keypads would require 32 I/O lines
2) The 8x8 would require 16 I/O lines.
3) The 4x16 would require 20 I/O lines.

In each case a decoder and/or multiplexer can be used to reduce the lines to
the corresponding power of 2. So for the cost of a chip, you can greatly
reduce the number of lines required.

Personally I'd organize in the 8x8 wiring the 4 keypads in a square. Then
I'd drive the rows with the outputs of a 74HC138 decoder, and read the outputs
from the columns using a 74HC151 multiplexer. It'll take 7 PIC I/O pins to do
the job: 3 to drive the HC138, 3 to drive the HC151, and one input to read the
HC151.

BAJ

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body

2004\08\22@191816 by Jinx

face picon face
I'd consider a remote control IC, something like the Philips
SAA3000 range for example (discontinued, just a reference
off the top of my head)

http://www.semiconductors.philips.com/pip/SAA3010_CNV_2.html

I used to use the SAA3004 for a 9x8 keypad. Very simple 2-wire i/f
(data and key press interrupt). The only problem for you is that the
SAA range wouldn't do multiple keypresses, but others may be able
to, perhaps those designed with Shift/Alt/Ctrl-type functions maybe

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2004\08\22@194818 by Vern Jones

flavicon
face
Hello Iain,

Pronanly not as difficult as you might think. I have several different types
of MIDI encoders. Some as kits.

I can provide DIY MIDI encoders and decoders. Perhaps even some Code.

Vern, http://www.sound-research.net
{Original Message removed}

2004\08\22@221610 by Denny Esterline

picon face
> Personally I'd organize in the 8x8 wiring the 4 keypads in a square. Then
> I'd drive the rows with the outputs of a 74HC138 decoder, and read the
outputs
> from the columns using a 74HC151 multiplexer. It'll take 7 PIC I/O pins
to do
> the job: 3 to drive the HC138, 3 to drive the HC151, and one input to
read the
> HC151.
>
> BAJ
>


Really? I'd have thought an 8x8 square with no external parts. Drive the
rows with portD and read the columns with portB interrupt on change. I'm
not familiar with MIDI, but certainly I'd have thought the other 17 IO
lines would be enough to implement it.

As others are fond of saying "engineering is the art of compromise"

-Denny

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email KILLspamlistservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2004\08\23@054904 by Howard Winter

face
flavicon
picon face
On Sun, 22 Aug 2004 22:18:02 -0400, Denny Esterline wrote:

> > I'd drive the rows with the outputs of a 74HC138 decoder, and read the
outputs
> > from the columns using a 74HC151 multiplexer. It'll take 7 PIC I/O pins to do
> > the job: 3 to drive the HC138, 3 to drive the HC151, and one input to
> > read the HC151.
> >
> > BAJ
>
> Really? I'd have thought an 8x8 square with no external parts. Drive the
> rows with portD and read the columns with portB interrupt on change.

I'm not sure either technique allows for multiple simultaneous key depressions, which was mentioned by the OP.
As far as I can see, any simple x-y matrix will give ambiguity if two non-orthogonal keys are pressed at once.
I wonder if a keyboard controller chip (I know they exist, I just don't know any!) would be the answer, since
n-key rollover is part of what they do.

>  I'm not familiar with MIDI, but certainly I'd have thought the other 17 IO
> lines would be enough to implement it.

MIDI is basically serial I/O with a tightly-defined format specification.  I believe you can do it with 1
input and 1 output (there may be a clock too - can't remember) but half of a PIC I/O port is plenty.  It may
even be possible to use a UART on PICs that have it.

> As others are fond of saying "engineering is the art of compromise"

Indeed!  Any engineering that's straightforward with one obvious solution isn't really worth the name  :-)

Cheers,


Howard Winter
St.Albans, England

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2004\08\23@081048 by Kevin

flavicon
face
>On Mon, 23 Aug 2004, Howard Winter wrote:
> I'm not sure either technique allows for multiple simultaneous key depressions, which was mentioned by the OP.
> As far as I can see, any simple x-y matrix will give ambiguity if two non-orthogonal keys are pressed at once.
> I wonder if a keyboard controller chip (I know they exist, I just don't know any!) would be the answer, since
> n-key rollover is part of what they do.

How about a keyboard controller chip made from a picf84
Try Tony Kubeks
www.piclist.com/techref/microchip/picboard.htm
I was able to make a 4x4 keypad talk to an IBM PC with
Tony's project and Fr. Tom's Keypad Project both with full
source and fully commented.
http://www.drzyzgula.org/bob/electronics/frtom.shtml

That was my first pic project after blinking a led :)
I was able to enter a two digit hex character and have the
F84 talk to the ps2 keyboard port on the pc and produce any
key character I wanted from a look up table.

~Kevin

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespammitvma.mit.edu

2004\08\23@081049 by Bob Ammerman

picon face
MIDI in and out work fine on a traditional UART. The baud rate is 31 250,
which works out perfectly when using an crystal that is an exact number of
MHz (as opposed to some funny number).

However, rather than using conventional RS232 levels, proper MIDI uses an
opto-isolated connection.

Bob Ammerman
RAm Systems

> >  I'm not familiar with MIDI, but certainly I'd have thought the other 17
IO
> > lines would be enough to implement it.
>
> MIDI is basically serial I/O with a tightly-defined format specification.
I believe you can do it with 1
> input and 1 output (there may be a clock too - can't remember) but half of
a PIC I/O port is plenty.  It may
> even be possible to use a UART on PICs that have it.

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestEraseMEspamspam_OUTmitvma.mit.edu

2004\08\23@134018 by Vern Jones

flavicon
face
Hello Iain,

There are different kinds of MIDI events. For keyboaed use it needs to scan
multiple keys. Keeping in mind it is possible for 10 fingers to play more
than 10 notes. The scan rate needs to be fast enough to keep up with a
player without noticable delay. A PIC chip can do this. For other controls,
one can use the same keys as Patch control and other controllers like
Sustain pedal by using other PIC pins to control the mode of the input keys,
or extend the matrix past the keyboard range, and assign those scan points
to controller inputs. MIDI, unlike computer keyboards needs to be able to
handle multiple input scan points simultaniously.

Using a PIC with analog inputs, allows for continuos controllers.

After doing the learning exercises for using the pic, also download a copy
of the MIDI specification at:
http://www.borg.com/~jglatt/tech/midispec.htm

For a site dedicated to the DIYs there is: http://www.ucapps.de/ . This site
is run by Thorsten Klose. He has released most of the software to the
public. There is Source code and Hex code with lots of discussion about the
applications as well as discussion groups. So both of these sites have good
data. If you are interested in specific types of controllers, send me a
private E-Mail, and I'll try to answer your questions.

Musically yours,

Vern Jones, RemoveMEvernjonesspamTakeThisOuTsound-research.net

{Original Message removed}

2004\08\23@134846 by iain duncan

picon face
Bob Ammerman wrote:
> MIDI in and out work fine on a traditional UART. The baud rate is 31 250,
> which works out perfectly when using an crystal that is an exact number of
> MHz (as opposed to some funny number).
>
> However, rather than using conventional RS232 levels, proper MIDI uses an
> opto-isolated connection.

Bob, what's the deal with the opto-isolation? I've noticed some examples
on line have it, some don't. Do I *need* to include opto-isolation to
just get simple output, or is there some other way? And why is
necessary, ie why can't I just bring down the voltage level on the pins
to acceptable midi range using diodes or what not? ( Am very much a
beginner with electornics. I am more scared of external chips than I am
of bit banging serial i/o myself, ha ha. )

Iain

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestEraseMEspam.....mitvma.mit.edu

2004\08\23@144207 by Vern Jones

flavicon
face
Hello Iain,

The MIDI outputs are not opto isolated, but the MIDI inputs are. From the
MIDI OUTPUT pin connect a 220 to 270 ohm resistor to pin 5 of the female DIN
output connector, and a 220 Ohm resistor from PIN 4 of the din output
connector to +5 Volts. This will interface to any standard MIDI cable and
MIDI instrument.

The PIC can drive the MIDI out just fine...connect PIN 2 of the DIN
connector to ground.

On my website see the MIDI encoder sections, some of the encoders also have
data sheets in .pdf format. Just click on technical information (Gree
highlight) to down load. The PEDMUX series, abe about as simple as you can
get with a MIDI encoder.

Vern
{Original Message removed}

2004\08\23@163725 by Bob Ammerman

picon face
The optical isolation is intended to eliminate any problems with the various
devices in the midi chain having different ground potentials.

Bob Ammerman
RAm Systems

{Original Message removed}

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