Searching \ for '[PIC] counters' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.org/techref/microchip/time.htm?key=count
Search entire site for: 'counters'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] counters'
2012\04\25@060033 by Lebtures

flavicon
face

Hello guys i was asking for a help, am new in microconcrollers so i was asing
help in writing a  program that will count from 0-30 am using P16F84a plz
guys....
-- View this message in context: old.nabble.com/counters-tp33745469p33745469.html
Sent from the PIC - [PIC] mailing list archive at Nabble.com.

2012\04\25@061238 by Jan-Erik Soderholm

face picon face
FOR I = 1 TO 30

Run it in your favourite BASIC compiler.

Best Regards



Lebtures wrote 2012-04-25 12:00:
>
> Hello guys i was asking for a help, am new in microconcrollers so i was asing
> help in writing a  program that will count from 0-30 am using P16F84a plz
> guys...

2012\04\25@064840 by IVP

face picon face
> Hello guys i was asking for a help, am new in microconcrollers so
> i was asing help in writing a  program that will count from 0-30 am
> using P16F84a plz guys....

More information from you will get you a better answer

For example -

What is causing the micro to count ?

What happens when you get to 30 ?

Why are you using such a very old micro as the 16F84 ?

What language are you using ?

Joe

2012\04\25@094810 by jim

flavicon
face

IMHO, all of these questions are valid except for the one asking about
why he is using such an old micro.
First, it has nothing to do with the request.  Second, if you write a
program for the F84, you can port it
to other micros in the PIC family with little to no changes.  And
third, who care?  What possible
difference could it make why he is using that particular part.  He
didn't ask if he was using the right
part or if it was a current part,  He was asking for help with
programming a counter.

Don't take this the wrong way.  I'm not trying to start a flame war. I'm just pointing out that a question
was asked inquiring about a fact that has nothing to do with the
request the OP made.


Regards,

Jim

> ---{Original Message removed}

2012\04\25@094837 by jim
flavicon
face

IMHO, all of these questions are valid except for the one asking about
why he is using such an old micro.
First, it has nothing to do with the request.  Second, if you write a
program for the F84, you can port it
to other micros in the PIC family with little to no changes.  And
third, who care?  What possible
difference could it make why he is using that particular part.  He
didn't ask if he was using the right
part or if it was a current part,  He was asking for help with
programming a counter.

Don't take this the wrong way.  I'm not trying to start a flame war. I'm just pointing out that a question
was asked inquiring about a fact that has nothing to do with the
request the OP made.


Regards,

Jim

> ---{Original Message removed}

2012\04\25@103214 by Byron Jeff

flavicon
face
On Wed, Apr 25, 2012 at 06:48:23AM -0700, spam_OUTjimTakeThisOuTspamjpes.com wrote:
>
>  IMHO, all of these questions are valid except for the one asking about
>  why he is using such an old micro.  First, it has nothing to do with the
>  request.  Second, if you write a program for the F84, you can port it to
>  other micros in the PIC family with little to no changes.  And third,
>  who care?  What possible difference could it make why he is using that
>  particular part.  He didn't ask if he was using the right part or if it
>  was a current part,  He was asking for help with programming a counter.

>  Don't take this the wrong way.  I'm not trying to start a flame war.
>  I'm just pointing out that a question was asked inquiring about a fact
>  that has nothing to do with the request the OP made.

Jim,

You have good points. But I do still think the question needs to be asked. There
are millions of pages of Microchip PIC discussions/projects that use the
16F84[A]. With a preponderance of them, newbies (and the OP stated that)
are not really aware that they are for the most part obsolete. So by asking
the question, it often gives an inrad to explaining that there are much
more capable and frankly cheaper parts.

A while ago I wrote some pages on the subject:

http://www.finitesite.com/d3jsys/16F88.html

I probably should do an update. The 16F enhanced parts are so much better.
I would push the 16F1847 (18 pin), 16F1829 (20 pin), and 16F1938 (28 pins)
as suitable replacements with the 12F1840 (8 pin) as the replacement for
the 12F508/509/629/675 series.

The debate has gone back and forth as to whether or not the added
complexity of the new parts (i.e. hardware support, banking, paging) are
useful to novices. The problem I see is that newbies quickly fall in love
with what they learn first. The 16F84 and its extremely limited hardware
resources forces novices to code everything (USART, I2C, PWM, ADC, multiple
timers, etc.) in software, which is in fact much more convoluted than the
basic practice of setting up a hardware peripheral and letting it do the
heavy lifting.

I always see the question as informative. If a novice actually knows what's
going on, then it's no harm, no foul. However, if it's possible to get a
novice tracked to a much better, and cheaper platform, then the question is
in fact a net win.

So personally I don't see a downside to it.

BAJ

>
>
>  Regards,
>
>  Jim
>
> > ---{Original Message removed}

2012\04\25@120630 by mcd

flavicon
face
Byron Jeff wrote:

> There are millions of pages of Microchip PIC discussions/projects that
> use the 16F84[A]. With a preponderance of them, newbies (and the OP
> stated that) are not really aware that they are for the most part
> obsolete. So by asking

I've said this before (a long time ago) ...
For a newbie, wanting to learn PIC16 assembler, there is no part that
comes close to the 16F84[A].  It is ABSOLUTELY the right part for that
first project.  Certainly, it is hard to defend for a second project, but
for the first project it is unequalled.

In developing my Elmer 160 course I of course exchanged many, many emails
with people just starting out.  The whole concept of the microcontroller
is intimidating, and all the other parts have additional complexities
that, while useful for the experienced programmer, are terrifying to the
newbie.  Yes, the enhanced PIC16 parts have nice features, the 18F's even
nicer.  But if you are approaching microcontroller development for the
first time, no 8-bit part presents a lower barrier than the 84.

That being said, in this day and age I would question the choice of any 8
bit part. The OP said he was a newbie, and presumably also a hobbyist.  In
2012 it is hard to defend the 8 bit parts when the 16 bit parts cost
barely any more, are infinitely more capable, far easier to use, and have
much better tool support.  The only downside to the 16 bit parts is that
the sheer weight of the datasheet can be a little intimidating.

Sure, when you are making a million of something the price difference is a
big deal.  But for a one-off, why not spend an extra fifty cents or a buck
and get a much more capable and easier to use device?

As a hobbyist, OP may well want to learn PIC16 assembler, and for someone
dipping his toe into that particular pond, especially if he has a limited
background in microcontrollers, the PIC16F84A is the right tool for the
job.  For other jobs, not so much.

--McD

2012\04\25@131154 by jim

flavicon
face
Byron,

I see your point. In light of this, I understand why the question was
asked.

Regards,

Jim

> ---{Original Message removed}

2012\04\25@134258 by Byron Jeff

flavicon
face
On Wed, Apr 25, 2012 at 09:21:54AM -0700, .....mcdKILLspamspam@spam@is-sixsigma.com wrote:
{Quote hidden}

Your last point is of course the problem. One of my former faculty members
that I worked with called it "love what you learn syndrome". When you learn
how to use a hammer, everything looks like a nail. In a lot of tech
systems, folks make it easy to get started, because they want to attract
novices. The problem is few regular users remain novices. They fairly
quickly become intermediate and advanced users. But they take the view even
as intermediate/advanced users that was presented to them as novices. It
colors their view of things for a significant amount of time.

What I've learned to do, and I teach students PIC programming, is to give a
gentle introduction with a forward view. I explain that the parts we are
using (in this instance 16F1938s) have a lot of facilities, and that as
they need new items, that they are available. But I also caution that it's
not necessary to memorize a 500 page datasheet. It's a comprehensive
reference manual that desribes every aspect of the usage of the part. But
few projects need every available tool. So it OK to learn it as you go. The
key is to implant an understanding that facilities to help are avaailable
and that before lauching into writing everything by hand, check to see if a
hardware resouce is available.

The problem with the 16F84 is that this is not possible. It has such a low
facilities bar, that as soon as you get to the second or third project,
that a novice is stuck with the choice of either changing parts, or trying
to write the facility in software.

So I disagree with the assertion that it's appropriate for the first
project, because rarely is the first project the end of the discussion.
It's better to pick a part that has a high growth ceiling, with a gentle
introduction (i.e. no paging, limited banking, only required setup of
ANSEL/TRIS registers) until growth requires looking at additional
facilities.

I know there's no right answer to this and that its all opinion. But I feel
that directing novices with a larger overall view will help them in the
end, even though there';s a bit more setup in the beginning.

Just my 2 cents.

BAJ

>
> --McD
>
>
> -

2012\04\25@141217 by Bob Blick

face
flavicon
face
On Wed, Apr 25, 2012, at 10:32 AM, Byron Jeff wrote:

> You have good points. But I do still think the question needs to be
> asked. There
> are millions of pages of Microchip PIC discussions/projects that use the
> 16F84[A]. With a preponderance of them, newbies (and the OP stated that)
> are not really aware that they are for the most part obsolete. So by
> asking
> the question, it often gives an inrad to explaining that there are much
> more capable and frankly cheaper parts.

I have found that everyone asking for programming help on an '84 is
working on a class assignment, nothing more, nothing less. So trying to
talk to them about their choice of part is a nonstarter, it is simply
noise to them, getting in the way of their task. Furthermore, they quite
often only have access to the chip when their turn comes around, if at
all.

Best regards,

Bob


-- http://www.fastmail.fm - Faster than the air-speed velocity of an
                         unladen european swallow

2012\04\25@145344 by Dwayne Reid

flavicon
face
At 11:42 AM 4/25/2012, Byron Jeff wrote:

>It's better to pick a part that has a high growth ceiling, with a gentle
>introduction (i.e. no paging, limited banking, only required setup of
>ANSEL/TRIS registers) until growth requires looking at additional
>facilities.

Hi there again, Byron.

I thought that I'd throw a little fuel on the fire, so to speak.

Microchip's 10F322 is, in my opinion, one of the nicest little PICs that I've ever worked with.  Yeah - it has only 1- input-only and 3- i/o pins but it has a LOT of really neat features in that little package.  I've actually written Microchip and asked them to do two things: 1) Release an 8-pin (6-i/o) version; and 2) Add a comparator.

I'd be even happier if they released a 10-pin version with all 8 i/o pins made available <grin>.

The really cool thing about this chip is that it has absolutely NO RAM paging whatsoever.  The first 64 locations in the RAM map are the special function registers (ALL of them) and the last 64 locations are user RAM.  It also has some the niceties of the newer PICs - including a LAT register for the port pins.

I would be using these parts by the tens of thousands if only they had a comparator.

dwayne

-- Dwayne Reid   <dwaynerspamKILLspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
http://www.trinity-electronics.com
Custom Electronics Design and Manufacturing

2012\04\25@180506 by alan.b.pearce

face picon face
> Microchip's 10F322 is, in my opinion, one of the nicest little PICs
> that I've ever worked with.  Yeah - it has only 1- input-only and 3-
> i/o pins but it has a LOT of really neat features in that little
> package.  I've actually written Microchip and asked them to do two
> things: 1) Release an 8-pin (6-i/o) version; and 2) Add a comparator.

They already have, its known as a 12F15xx series chip ...

> I'd be even happier if they released a 10-pin version with all 8 i/o
> pins made available <grin>.

They already have, it's the 16F15xx series chips (there are about 4 of them so far).

>
> The really cool thing about this chip is that it has absolutely NO RAM
> paging whatsoever.  The first 64 locations in the RAM map are the
> special function registers (ALL of them) and the last 64 locations are
> user RAM.  It also has some the niceties of the newer PICs - including
> a LAT register for the port pins.
>
> I would be using these parts by the tens of thousands if only they had
> a comparator.

Not sure if the 1x15xx have a comparator. I haven't had occasion to look at that bit of the data sheet.

-- Scanned by iCritical.

2012\04\25@184854 by IVP

face picon face

> I have found that everyone asking for programming help on an
> '84 is working on a class assignment

Probably right. It seems unlikely that an 84 was chosen over the
hundreds of new sparkly PICs, unless the OP is restricted to 84
material

I hope he calls bac

2012\04\25@191431 by Dwayne Reid

flavicon
face
At 04:04 PM 4/25/2012, .....alan.b.pearceKILLspamspam.....stfc.ac.uk wrote:
> > Microchip's 10F322 is, in my opinion, one of the nicest little PICs
> > that I've ever worked with.  Yeah - it has only 1- input-only and 3-
> > i/o pins but it has a LOT of really neat features in that little
> > package.  I've actually written Microchip and asked them to do two
> > things: 1) Release an 8-pin (6-i/o) version; and 2) Add a comparator.
>
>They already have, its known as a 12F15xx series chip ...

I've looked at the 12F1501 in the past and it is indeed most of what I mentioned above.  However, it has the enhanced 16 register set of 32 RAM banks instead of all of the RAM being on a single RAM page.

I can live with fewer peripherals (like what the 10F322 has) if it has all RAM located on a single RAM page (like the 10F322).


> > I'd be even happier if they released a 10-pin version with all 8 i/o
> > pins made available <grin>.
>
>They already have, it's the 16F15xx series chips (there are about 4
>of them so far).

OK - I'll go looking for them.  I looked at the 16F1503 at the beginning of this year but it is similar to the 16F676 in that it is in a 14-pin package.  And, like the 12F1501, it also has 32 RAM banks.


>Not sure if the 1x15xx have a comparator. I haven't had occasion to
>look at that bit of the data sheet.

The 12F1501 has a single comparitor, the 16F1503 has two.  What I really want, though, is a variant of the 10F322 in SOT23-6 package - but with a comparitor added.  Those I would use by the bushels-full.


Also note that what I find so likeable about the 10F322 is that single RAM page.  64 RAM locations for special-function registers and 64 bytes for user RAM.  No RAM bank bits - not a single one.  What's not to like? <grin>.

Don't get me wrong - I've been dealing with PICs for so long that setting the appropriate RAM bank bits is like second nature to me.  And - Byron Jeff's help over the past day in dealing with more RAM banks than the 4 that I'm currently used to means that I can do all of the cool things I'm already used to doing with the enhanced-core PICs.  But from a newbie point of view, having NOT to deal with RAM bank issues would be invaluable.

dwayne

-- Dwayne Reid   <EraseMEdwaynerspam_OUTspamTakeThisOuTplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
http://www.trinity-electronics.com
Custom Electronics Design and Manufacturing

2012\04\26@060403 by alan.b.pearce

face picon face
> Also note that what I find so likeable about the 10F322 is that
> single RAM page.  64 RAM locations for special-function registers and
> 64 bytes for user RAM.  No RAM bank bits - not a single one.  What's
> not to like? <grin>.

I guess the thing to do is to keep hammering your FAE then, saying "I want that with these features ..."

-- Scanned by iCritical.

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