> Code page banking is gone with the 18F parts, but
memory banking is
> still there (darn it!) - Then there is the access page and the linker
> files. Hmm, maybe the 18F isn't the place to start.
>
The 16F874 is a nice part. It has a lot of the cadillac features but is still
the PIC16 architecture. You can also get new ones cheap.
I had a hard time with linker scripts. They're not documented very well
and
they're really intended for the C compiler. I do not recommend that a
beginner
try to work with the C compiler. It's complicated. You really need some
experience with the parts before you start working with it.
Mike Harpe
Reply by Dennis Clark●April 29, 20082008-04-29
>
> ----- Original Message -----
> From: "dlc"
> To:
> Sent: Monday, April 28, 2008 11:18 PM
> Subject: Re: [piclist] Problem in assembling
>>> Ditto with the F84. It is *THE* PIC to learn on, but once you have,
>>> every
>>> other PIC is cheaper or better, most are both.
>>
>> I don't see any reason to use this part. It is a real PIC
dinosaur.
>
> It is kind of a dinosaur, but it has a couple of advantages over almost
> all
> other PICs for learning:
> - Each pin only does one thing
> - All the RAM is echoed in all banks
>
> For a lot of people, learning any microcontroller is kind of intimidating.
> With only 35 instructions, the PIC16 isn't rocket science to be sure,
but
> many of people approach it with a lot of uncertainty. While the step up
> from the 84 to anything else isn't a big one once you have your head
> around
> the PIC, trying to learn the PIC while your variables disappear every time
> you do the mysterious banksel to access a register, and remembering to
> turn
> off peripherals you don't yet understand makes it a lot harder for the
> newbie.
>
> Once you know what you are doing, these things are, at worst, minor
> irritations, but when you first approach the PIC, they add to a barrier
> that
> already appears to be a lot higher than it is.
> [snip]
> That being said, I wonder if the newbie in this day
and age shouldn't be
> heading right for the 18F anyway. No banking, a lot of the 16F
> irritations
> are gone, and prices have reached the point where it is hard to tell the
> difference. There is no 84 equivalent so you need learn to turn off the
> analogs right away, but there is none of that annoying banking, and most
> of
> the quirky instructions have been fixed. The main thing lacking is
> example
> projects.
Code page banking is gone with the 18F parts, but memory banking is
still there (darn it!) - Then there is the access page and the linker
files. Hmm, maybe the 18F isn't the place to start.
Reply by Wouter van Ooijen●April 29, 20082008-04-29
> > I don't see any reason to use this part. It
is a real PIC dinosaur.
>
> It is kind of a dinosaur, but it has a couple of advantages over almost all
> other PICs for learning:
> - Each pin only does one thing
The fact that a pin *can* do other things does not mean you have to be
bothered by that feature (except for the disabling of some analog
functions, which can easily be done 'by recepy' without knowing what
exactly you are doing).
> - All the RAM is echoed in all banks
The only reason for going to other banks when using a PIC in
'16F84-mode' is to set the TRIS registers, which can (contrary to what
uChip seems to advocate) still be done with TRIS instructions.
So using a 16F628A, 16F630, etc. Has zero (or very little) technical
disadvantage, one one big advantage: killing the chip does not hurt your
wallet so much!
> That being said, I wonder if the newbie in this day
and age shouldn't be
> heading right for the 18F anyway.
The 16-bit-cores still lack low pincount chips. And the cute little SMD
10F's (12-bit cores) are much like the 14-bit cores (but with a few
quircks added to the already impressive list for 14-bit cores), so they
are easy to explain to someone who knows his way around with a 14-bit core.
--
Wouter van Ooijen
-- -------
Van Ooijen Technische Informatica: www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: www.voti.nl/hvu
Reply by "John J. McDonough, WB8RCR"●April 29, 20082008-04-29
----- Original Message -----
From: "dlc"
To:
Sent: Monday, April 28, 2008 11:18 PM
Subject: Re: [piclist] Problem in assembling >> Ditto with the F84. It is *THE* PIC to learn on,
but once you have,
>> every
>> other PIC is cheaper or better, most are both.
>
> I don't see any reason to use this part. It is a real PIC dinosaur.
It is kind of a dinosaur, but it has a couple of advantages over almost all
other PICs for learning:
- Each pin only does one thing
- All the RAM is echoed in all banks
For a lot of people, learning any microcontroller is kind of intimidating.
With only 35 instructions, the PIC16 isn't rocket science to be sure, but
many of people approach it with a lot of uncertainty. While the step up
from the 84 to anything else isn't a big one once you have your head around
the PIC, trying to learn the PIC while your variables disappear every time
you do the mysterious banksel to access a register, and remembering to turn
off peripherals you don't yet understand makes it a lot harder for the
newbie.
Once you know what you are doing, these things are, at worst, minor
irritations, but when you first approach the PIC, they add to a barrier that
already appears to be a lot higher than it is.
For people still married to the 84, the other PIC16s are practically the
same. All offer more peripherals than the F84, and almost all offer more
memory. Except for some of the 40 pin parts, all are cheaper. There are a
couple of little coding things to watch out for, but with a little care you
can use the same code across all the PIC16s. (except the PIC16F54/84 which
is a PIC12 with a PIC16 number). My latest Elmer 160 lesson addresses these
differences, and the experiments run on all the 18 pin 16Fs except the 716
which has no EEPROM (the experiments use EEPROM). Unfortunately, with a
bunch of different PICs and 3 development environments, and on the larger
parts, over 1000 meaningfully different ways to organize memory, every
little change requires a ton of testing, so it is going very slow.
That being said, I wonder if the newbie in this day and age shouldn't be
heading right for the 18F anyway. No banking, a lot of the 16F irritations
are gone, and prices have reached the point where it is hard to tell the
difference. There is no 84 equivalent so you need learn to turn off the
analogs right away, but there is none of that annoying banking, and most of
the quirky instructions have been fixed. The main thing lacking is example
projects.
John J. McDonough, WB8RCR wrote: > ----- Original Message -----
> From: Guy Martin
> To: p...
> Sent: Thursday, April 17, 2008 11:44 AM
> Subject: Re: [piclist] Problem in assembling
>> You have to tell it that when you write PORTA you mean register 5
>>
>> use:
>>
>> #define PORTA 0x05
>>
>> at the start of your prog
>> Not sure about your loop statements. I normally put loop
>> statements in col 1, operator on col 2 etc
>
> DO NOT DO THIS. DO NOT EVER DO THIS. I'm not sure why so many hobbyists
do
> this, the only thing I can see is that it is a leftover from back in the
> days when we assembled from a floppy disk and we could save a few seconds by
> not using the include file. Hand coding #defines that are in the include
> file make the program harder to read, less maintainable, and are a potential
> for many errors. Microchip provides an include file, use it.
>
> Now, here's the actual problem:
>
>> ----- Original Message -----
>> From: chadalawadabalakrishna
>> To: p...
>> Sent: Tuesday, March 18, 2008 8:09 AM
>> Subject: [piclist] Problem in assembling
>> I use Microchip MPASM to assemble. But it doesn't accept keywords
like
>> PORTA etc. Kindly inform me if there is any error in the logic of the
>> program:
>>
>> #include This isn't C. The include does not require a #,
it is preceeded by
> whitespace, and the filename does not have angle brackets surrounding it.
>
> include p16f84a.inc
>> ORG 00H
>> Get over this as soon as possible. Absolute code is OK for your first
> outing or two, but once you have your head around the PIC, learn relocatable
> code. It can be a little weird getting your head around it at first, but it
> will make you far more productive in the long run.
Lets be more clear. The interrupts and reset address are fixed and
there is NO problem with "ORG" when you want direct access to them - And
very often you _do_.
Sometimes you aren't writing relocatable code, sometimes you are
doing a very discrete thing in a small PIC. We're not always writing
libraries to use with other programs.
> Ditto with the F84. It is *THE* PIC to learn on, but
once you have, every
> other PIC is cheaper or better, most are both.
I don't see any reason to use this part. It is a real PIC dinosaur.
Reply by "John J. McDonough, WB8RCR"●April 28, 20082008-04-28
----- Original Message -----
From: Guy Martin
To: p...
Sent: Thursday, April 17, 2008 11:44 AM
Subject: Re: [piclist] Problem in assembling > You have to tell it that when you write PORTA you
mean register 5
>
> use:
>
> #define PORTA 0x05
>
> at the start of your prog
> Not sure about your loop statements. I normally put loop
> statements in col 1, operator on col 2 etc
DO NOT DO THIS. DO NOT EVER DO THIS. I'm not sure why so many hobbyists
do
this, the only thing I can see is that it is a leftover from back in the
days when we assembled from a floppy disk and we could save a few seconds by
not using the include file. Hand coding #defines that are in the include
file make the program harder to read, less maintainable, and are a potential
for many errors. Microchip provides an include file, use it.
Now, here's the actual problem:
>
> ----- Original Message -----
> From: chadalawadabalakrishna
> To: p...
> Sent: Tuesday, March 18, 2008 8:09 AM
> Subject: [piclist] Problem in assembling
> I use Microchip MPASM to assemble. But it doesn't accept keywords like
> PORTA etc. Kindly inform me if there is any error in the logic of the
> program:
>
> #include
This isn't C. The include does not require a #, it is preceeded by
whitespace, and the filename does not have angle brackets surrounding it.
include p16f84a.inc >
> ORG 00H
>
Get over this as soon as possible. Absolute code is OK for your first
outing or two, but once you have your head around the PIC, learn relocatable
code. It can be a little weird getting your head around it at first, but it
will make you far more productive in the long run.
Ditto with the F84. It is *THE* PIC to learn on, but once you have, every
other PIC is cheaper or better, most are both.
You have to tell it that when you write PORTA you mean register 5
use:
#define PORTA 0x05
at the start of your prog
Not sure about your loop statements. I normally put loop statements in col 1,
operator on col 2 etc
loop1 movlw 0
movwf portb
so on
Cheers, Guy
----- Original Message -----
From: chadalawadabalakrishna
To: p...
Sent: Tuesday, March 18, 2008 8:09 AM
Subject: [piclist] Problem in assembling
I use Microchip MPASM to assemble. But it doesn't accept keywords like
PORTA etc. Kindly inform me if there is any error in the logic of the
program: