Searching \ for '[PIC:] Getting started' 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/begin.htm?key=pic
Search entire site for: 'Getting started'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] Getting started'
2004\08\03@223537 by Vince Herman

picon face
I have been mostly lurking, trying to absorb enough to
get started.  Here it goes...
I purchased a serial programmer from picallw.com
(P16Pro40), a breadboard, a package of various
resistors and LEDs.
A few 16F84A and 16F877A samples.
I have MPLAB installed, I assembled sample code and
programmed an 877 with an LED blinker sample.  Looking
at the schematic that came with the code, I see that I
need to get crystals and caps.  The caps I can get
form Radio Shack.  The crystals I cannot find.  Where
do I order them from?

(sorry for the basic question, I have been reading
trying to see someone else ask)



__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

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

2004\08\03@225651 by Herbert Graf

flavicon
face
On Tue, 2004-08-03 at 22:35, Vince Herman wrote:
> I have been mostly lurking, trying to absorb enough to
> get started.  Here it goes...
> I purchased a serial programmer from picallw.com
> (P16Pro40), a breadboard, a package of various
> resistors and LEDs.
> A few 16F84A and 16F877A samples.
> I have MPLAB installed, I assembled sample code and
> programmed an 877 with an LED blinker sample.  Looking
> at the schematic that came with the code, I see that I
> need to get crystals and caps.  The caps I can get
> form Radio Shack.  The crystals I cannot find.  Where
> do I order them from?

First question is where are you located. Most major centers have shops
that cater to people "like us". :)

You mention Radio Shack, that limits you to certain areas of the world,
and chances are if there is nothing local to you one of the mail order
companies will work out. I prefer digikey, they serve the US and Canada,
are EXTREMELY fast, and have never screwed up an order. There are others
though.

Now, with that said, might it surprise you to find out you don't NEED a
crystal! :) Since you only care about "blink an LED" right now the RC
osc config is more then up to the task, check the PIC datasheet for
details. Only change you need to make with your program is the config
fuse section.

TTYL

-----------------------------
Herbert's PIC Stuff:
http://repatch.dyndns.org:8383/pic_stuff/

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

2004\08\03@231557 by Denny Esterline

picon face
<snip>
> The caps I can get
> form Radio Shack.  The crystals I cannot find.  Where
> do I order them from?
>

Instead of crystals, I'd recommend ceramic resonators. Their simpler and
more rugged, and usually a few cents cheaper.

As to where to get them (or crystals) I buy mine from Randy Jones. You can
find his web site at http://www.glitchbuster.com/ He has those as well as
PICs and most of the common parts you'll want. His prices are fine but best
of all his shipping costs are less than $2 for little stuff like this.

Just a happy customer,

-Denny

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

2004\08\03@232843 by Russell McMahon

face
flavicon
face
> Looking at the schematic that came with the code, I see that I
> need to get crystals and caps.

If you want to get it running in a hurry you could consider running in RC
mode if the PIC you have supports it (most do AFAIK).


       RM

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

2004\08\03@232844 by Jason S

flavicon
face
From: "Herbert Graf" <EraseMEmailinglist2spam_OUTspamTakeThisOuTFARCITE.NET>
Sent: Tuesday, August 03, 2004 7:57 PM


> I prefer digikey, they serve the US and Canada,
> are EXTREMELY fast, and have never screwed up an order. There are others
> though.

For a crystal and caps, I'd recommend glitchbuster.com.  I believe the
site's owner is on this list.  For a crystal and the 2 caps, he charges 59
cents, and he has a flat rate shipping of $1.85.

It's a great place to get pics and support components.

Jason

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

2004\08\04@003109 by Byron A Jeff

face picon face
On Tue, Aug 03, 2004 at 07:35:50PM -0700, Vince Herman wrote:
> I have been mostly lurking, trying to absorb enough to
> get started.  Here it goes...

Well welcome aboard.

> I purchased a serial programmer from picallw.com
> (P16Pro40), a breadboard, a package of various
> resistors and LEDs.

Good start.

> A few 16F84A and 16F877A samples.

Lose the 16F84A's and get yourself some 16F88 samples. My page here talks about
the advantages, one of which you refer to later on in your post:

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

I just updated it last week.

BTW the 16F877A is cool to work with.

> I have MPLAB installed, I assembled sample code and
> programmed an 877 with an LED blinker sample.  Looking
> at the schematic that came with the code, I see that I
> need to get crystals and caps.

Well it's a bit more complicated than that. You need some way to clock the
PIC. There are several:

1) The aforementioned crystal/caps combo. Essential for any precisely timed
  operation.
2) ceramic resonator. Cheaper. Often comes with built in caps.
3) Crystal osciallor. More expensive but only a 3 wire hookup.
4) Internal oscillator. All Pics with nanowatt technology has them. One reason
  why I like the 16F88. With it, you need no external connections.

5) RC oscillator. You have resistors. You have capacitors. Hmmmmm.

The interesting thing is that there's isn't much of anything out on Google
on the subject. I spent a whole 7 minutes looking! ;-)

The 16F877A datasheet figure 18-8 describes the effects. Try a 100 pF cap and
a 3.3Kohm resistor wired as Figure 14-3 on page 146. Should be good for the
ballpark of 2 Mhz, which will let you do all the testing you need while you
get around to getting resonators or crystals. Resonators are easier to wire
(dur to built in caps) and are cheaper. You only need crystals if you need
very precise timing resolutions.

>  The caps I can get
> form Radio Shack.  The crystals I cannot find.  Where
> do I order them from?

Cheapest overall is Randy at http://www.glitchbuster.com. Crystals (caps included)
and resonators in the 45 to 60 cent range, with only $1.85 shipping on an
order. Highly recommended.

>
> (sorry for the basic question, I have been reading
> trying to see someone else ask)

Ask away! Most of us love talking about this stuff.

Anyway test it out with your RC circuit until your resonators come it. Be
sure to change the CONFIG line in your program to indicate that you wish
to use the RC option.

BAJ

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

2004\08\04@015653 by Jason S
flavicon
face
From: "Byron A Jeff" <@spam@byronKILLspamspamCC.GATECH.EDU>
Sent: Tuesday, August 03, 2004 9:31 PM

> Lose the 16F84A's and get yourself some 16F88 samples. My page here talks
about
> the advantages, one of which you refer to later on in your post:

I don't agree with this.  For new designs you're not going to use a 16F84,
but there is a lot of introductory material out there based around the F84.
If you try to run someone else's sample code for the F84 on the F88 or F628,
and it doesn't work, are you going to spend hours trying to figure out of
the problem is that the code doesn't work with the new chip, or maybe you
just need to change a few bytes in the file.  It's not worth the
aggrevation.  If the code is designed for the F84 and you're just starting
out, use an F84.

There is also nothing wrong with doing things in software that can be done
in the peripheral hardware on newer chips where you're just starting out.
It's helpful to know how to bitbang I2C or RS232 communications even if the
hardware does it for you.

Jason

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

2004\08\04@033224 by Byron A Jeff

face picon face
On Tue, Aug 03, 2004 at 11:00:36PM -0700, Jason S wrote:
> From: "Byron A Jeff" <KILLspambyronKILLspamspamCC.GATECH.EDU>
> Sent: Tuesday, August 03, 2004 9:31 PM
>
> > Lose the 16F84A's and get yourself some 16F88 samples. My page here talks
> about
> > the advantages, one of which you refer to later on in your post:
>
> I don't agree with this.  For new designs you're not going to use a 16F84,
> but there is a lot of introductory material out there based around the F84.

A lot of people don't. We've gone round and round on this issue on the list
over the years. Here's my case:

I know there's a lot of legacy 16F84 code out there. However because of
the limitations of the part (no PWM/CCP, no USART, no ADC, 1 8 bit timer,
no I2C, limited memory,RAM, and EEPROM) any 16F84 tutorial will show the
contorted, bit banged way of doing things. There's no choice.

Now before everyone jumps on the bandwagon, there's nothing wrong with
bitbanging, virtual timers, and the like. But novices learn to utilize
what they learn first. So if you teach them bitbanging, that's what they'll
use.

Now all of the onboard periperals take a bit of coding to get going. But
I tell you as you move from novice to late beginner/intermediate developer,
the ability to set and forget becomes invaluable. Need PWM at a certain
voltage? Set and forget. Need to capture a ADC voltage? Again set and forget.
Sending serial? I think you get the idea.

With the 16F88 you get so much much more for so much much less that it's
worth the minor investment to switch.

Now on to your point.

> If you try to run someone else's sample code for the F84 on the F88 or F628,
> and it doesn't work, are you going to spend hours trying to figure out of
> the problem is that the code doesn't work with the new chip, or maybe you
> just need to change a few bytes in the file.  It's not worth the
> aggrevation.  If the code is designed for the F84 and you're just starting
> out, use an F84.

Point understood. I agree if the point is simply to get a job done. But
almost invariably novices enter the arena to learn how to use PICs for their
own projects. I believe it's much better to target understanding with a better
part than to go through all types of machinations due to the limitations of
the older part.

So you need a breakpoint very early on. Reason is that if you take the tutorial
path on the 16F84 road, you'll be led down all types of avenues that are not
really relavent to modern PIC development. But the funny thing is that the
16F84 code still works with only very minor mods (change start of RAM, set
analog inputs to digital) that such code can be used virtually unmodified.

>
> There is also nothing wrong with doing things in software that can be done
> in the peripheral hardware on newer chips where you're just starting out.

Yes there is. It adds a much higher level of complexity to the process of
coding once you get beyond the exemplars of the tutorial. While bitbanging
works in isolation, once you start combining it to multiple tasks it very
quickly gets very difficult to manage. There's a vast difference between code
simulating hardware and code that manages it. Even managing a simple set of
tasks such as doing serial while doing PWM while reading from the ADC can get
real tough if you have to bitbang each. But with hardware management it's
setup then automated operation with minimal software intervention. Big
difference.

> It's helpful to know how to bitbang I2C or RS232 communications even if the
> hardware does it for you.

No doubt. But it's important to give priority to the two tasks. A novice who
is only exposed to bitbanging may easily think that's the only way that such
tasks can be managed. The way to present the material is "for this task there
are two ways of accomplishing it. We first utilize the hardware module which
is standard practice. We then examine how to simulate the activity in software.
There will be times with both may be required. For example PWM can be used
to generate an intermeditate analog voltage. However if your application
requires more than one such voltage, then the hardware PWD module cannot
deliver that performance. So it will be required to implement the other
PWM circuits in software."

But note you teach the priority here, if you can use hardware PWM, and if
more is required then software PWM is the next best thing.

But since there's only one way to do it on the 16F84, that's the only way
that is taught in its tutorials. The legacy documentation is so prevalent
that many novices are not even aware that better equipped, cheaper chips are
avilable to them. This particular one did so happen to be aware of the
16F877A, which carries all of the features that the 16F88 has.

One last thing is that the technique for using hardware is virtually
equivalent across the board

1) Use a set of registers to configure the device.
2) Use flags in some set of registers to detect the state of the device.
2) Use another set of refisters to send/receive intermediate data during
  device operation.

And everything works like that. So teaching that model will actually simplify
things for the novice. Whereas each different periperal emulated in software
has a different (or several) methods for getting it going.

The bottom line is that onboard periperals abstracts the details of the
operation of the peripheral. This simplifies the use of the periperal by
the novice. Couple this with a uniform access mechanism, and a chip that
has more memory resources, and you have a winning gameplan.

BTW Nigel Goodwin has made an attempt to design a tutorial using newer
chips. You can find it here:

http://www.winpicprog.co.uk/pic_tutorial.htm

It's a step in the right direction.

BAJ

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

2004\08\04@041607 by Jason S

flavicon
face
From: "Byron A Jeff" <RemoveMEbyronTakeThisOuTspamCC.GATECH.EDU>
Sent: Wednesday, August 04, 2004 12:31 AM


> A lot of people don't. We've gone round and round on this issue on the
list
> over the years. Here's my case:

Well then let's not re-open the debate, but I do have a couple of
comments/question as someone making the transition from doing everything in
software to using the peripheral hardware.

> Now all of the onboard periperals take a bit of coding to get going. But
> I tell you as you move from novice to late beginner/intermediate
developer,
> the ability to set and forget becomes invaluable. Need PWM at a certain
> voltage? Set and forget. Need to capture a ADC voltage? Again set and
forget.
> Sending serial? I think you get the idea.

How do you learn to use all these things?  There are a lot of great books
and tutorials on the F84, there is relatively very little on the newer
chips.  A few months ago I used the ADC for the first time, I followed
through the app notes on the Microchip website while going over the
datasheet at the same time to see what I was setting (the app notes are
quite bad at telling you what bits you're setting and why, but the
datasheets simply list all the bits with descriptions and don't have a
comprehensive "to do that you set these bits like this").  After writing my
code, it wouldn't work.  After hours of frustration, I found out (from the
datasheet) that there's a bit I have to set to turn on the ADC.

Sure, it's my fault for missing it the first 20 times I read that section of
the datasheet, but there doesn't seem to be any available material to teach
you how to do something.  A cleanly written, well documented source code
listing would have helped a lot.

> So you need a breakpoint very early on. Reason is that if you take the
tutorial
> path on the 16F84 road, you'll be led down all types of avenues that are
not
> really relavent to modern PIC development.

Show me the tutorial road using the hardware peripherals then.  I'd be quite
happy to take it.

> Yes there is. It adds a much higher level of complexity to the process of
> coding once you get beyond the exemplars of the tutorial. While bitbanging
> works in isolation, once you start combining it to multiple tasks it very
> quickly gets very difficult to manage.

As a beginner, you're not going to be combining it to multiple tasks.  It's
important to understand what the peripherals do to use them properly.

> There's a vast difference between code
> simulating hardware and code that manages it. Even managing a simple set
of
> tasks such as doing serial while doing PWM while reading from the ADC can
get
> real tough if you have to bitbang each.

If you've been reading my other thread about the LED stroboscope, that's
pretty much what I'm trying to do.  I will be using the hardware peripherals
as much as possible.  I don't think it's possible to get the PWM to do what
I want, so I will probably end up bit-baning the output (though I've seen a
few innovative suggestions that involve generating the pulses in an analog
circuit and using the pic as a frequency counter).  Knowing how to do the
PWM in software is good here.


I've recently started playing with the 18F252, and I can not get the new
memory paging system to work.  I've read the data sheet and microchip's
migration document, and I've tried the assembly code from there and it
doesn't work.  If I write the code using the access bank, it works
perfectly, but I only have access to 128 file registers.  If I make a tiny
change to the code to put my data in bank 1, the chip just sits there and
does nothing when powered.  Obviously I'm doing something wrong, but I have
no idea what, and since it's not a 16F84, I can't find any documentation to
help.  My solution has been to to just use JAL with the 18F252 (thank you,
Wouter)

Sorry if this is a bit rambling, but it's getting pretty late.

Jason.

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

2004\08\04@044343 by Jinx

face picon face
> I've recently started playing with the 18F252, and I can not get the
> new memory paging system to work.  I've read the data sheet and
> microchip's migration document, and I've tried the assembly code
> from there and it doesn't work

Their intentions are good but it's reported that MC's own code has
faults (the manuals too in minor ways), which is unfortunate for anyone
trying out something new. I recently had that experience with I2C,
which I'd not used since the F84

What is it that's not working wrt the memory paging system ? Are
you using the Bank Select Register ? MOVLB 1 to change access
Bank1 RAM for example

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

2004\08\04@080420 by Olin Lathrop

face picon face
Jason S wrote:
> Sure, it's my fault for missing it the first 20 times I read that
> section of the datasheet, but there doesn't seem to be any available
> material to teach you how to do something.  A cleanly written, well
> documented source code listing would have helped a lot.

I've got lots of example PIC code at http://www.embedinc.com/pic.  While
this code wasn't written as a tutorial, it is documented and can serve as an
example.  The AD module of the HAL project includes complete setup code for
the A/D.

> I've recently started playing with the 18F252, and I can not get the
> new memory paging system to work.

There is virtually nothing you have to do.  Since GOTO and CALL instructions
contain the full address, you have one linear address space for just about
all purposes.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

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

2004\08\04@083330 by Lawrence Lile

flavicon
face
Another really good source for experimenters parts is Jameco
http://www.jameco.com.  Despite a recent thread bashing them, I have had
nothing but good service from them, and their stock is totally focused
on the electronics experimenter.  They had PIC parts when Mouser
http://www.mouser.com (another good source) was only thinking about it.  They
have crystals, decent resistor assortments, tools, PICs. PIC prototype
boards, and so on.  

Mouser and digikey have great depth of stock, if you want a weird part
they probably have it, but Jameco has most of the things an electronics
experimenter is likely to need, and jamecos prices tend to be pretty
reasonable.
-- Lawrence Lile, P.E.
Electrical and Electronic Solutions
Project Solutions Companies
http://www.projsolco.com


> {Original Message removed}

2004\08\04@083952 by Jan-Erik Soderholm

face picon face
Lawrence Lile wrote :

> Another really good source for experimenters parts is Jameco
> http://www.jameco.com.  Despite a recent thread bashing them,...

Yes, regarding (in that case) European customers.
I'm sure they have perfectly acceptable service
within the US !

Best Regards,
Jan-Erik.

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

2004\08\04@092638 by John J. McDonough

flavicon
face
----- Original Message -----
From: "Byron A Jeff" <spamBeGonebyronspamBeGonespamCC.GATECH.EDU>
Subject: Re: [PIC:] Getting started


> Lose the 16F84A's and get yourself some 16F88 samples. My page here talks
about
> the advantages, one of which you refer to later on in your post:

Once again, I'll disagree.  If you are an experienced microcontroller
developer, loose the 84A's.  However, if you are just getting to learn this
stuff, get your head around the 84 and then move on to the other parts.  I
wouldn't go buying any more 84's, however.  There are a lot of
better/cheaper/faster parts.  One or two is plenty.

Byron makes is sound so easy to port code to another part.  That is true
ONLY if you are an expert and only if the code was well written in the first
place (and unfortunately, many of the 16F84 examples are pretty awful).  If
not, variables mysteriously disappear, some inputs suddenly don't work
anymore, flags move around into different registers sometimes in different
banks, and weird things happen when you try to do a goto.  None of these
things are even noticeable if you are an expert, but when you are trying to
learn the PIC, they all get in the way.  If the whole concept is still
pretty alien to you, you really don't want to deal with these additional
complications.

Once you are reasonably comfortable with the 84, then move on to the 628, or
another modern part with 2K of memory.  Don't go over 2K for now.  Parts
like the 872 are nice because you get a few more I/O pins.  Study the
datasheet.  Notice that your GPR locations are no longer always available.
Notice that not all the pins are initialized as inputs.  Get your head
around that.

Microchip has a series of videos well hidden on their website that do a
wonderful job of explaining some of the more difficult concepts you need to
get past the 84.  I wouldn't dive into these until you have started to
understand how the 628 differs from the 84.  The 628 is nice because, ONCE
YOU UNDERSTAND IT, it isn't that hard to port 84 code to the 628 and the
part is half the price of the 84. But there are enough tricky bits that I
would get comfortable with the 84 first.

Now that you understand the 628, have viewed the videos, and are comfortable
with reading the datasheets to see what all the neat peripherals can do for
you, NOW you select whatever part fits your project.  Weird stuff happens
when you get past 2K, but now that is the only weird thing you are dealing
with because all the other weird stuff has been digested.  And after
understanding the videos, that part isn't so weird after all.

I really don't think it is necessary, or even useful, to pick a particular
part.  The 16F88 is a pretty cool part.  But the biggest limitation of the
84 is the number of I/O pins, and the 88 doesn't help that.  If your project
doesn't need a lot of I/O, but it does need analog, and it needs a bunch of
memory, well then, that's a nice choice.  However, once you have your head
around all the issues, you can choose a 628 when you don't need a lot of
I/O, the 88 if you need analog and a ton of memory, the 872 for a few more
I/O's, the 873 if you want memory with that, and on and on and on.  Instead
of being limited, you can choose the part that you need and not pay the
price for more capability than you need.  The 877 is fairly popular among
hobbyists.  However, the thing is big and expensive.  If you don't need all
the I/O, the 628 is a third the price.  But if you need 8K, if you need 40
pins, well then it's available.

So yes, I firmly believe that for someone who isn't pretty deep into
microcontrollers already, the 16F84 is the part to learn on.  But free
yourself of it quickly.  There is a lot to be gained from the other parts.
And don't be parochial.  Microchip has hundreds of different models for a
reason.  Pick the chip that fits your project, and be confident that it is
simply just like the last chip with more of whatever it is that you need
more of.

<AD>
Take a peek at http://www.amqrp.org/elmer160
</AD>

--McD

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

2004\08\04@114607 by Byron A Jeff

face picon face
On Wed, Aug 04, 2004 at 01:20:51AM -0700, Jason S wrote:
- From: "Byron A Jeff" <TakeThisOuTbyronEraseMEspamspam_OUTCC.GATECH.EDU>
- Sent: Wednesday, August 04, 2004 12:31 AM
-
-
- > A lot of people don't. We've gone round and round on this issue on the
- list
- > over the years. Here's my case:
-
- Well then let's not re-open the debate, but I do have a couple of
- comments/question as someone making the transition from doing everything in
- software to using the peripheral hardware.
-
- > Now all of the onboard periperals take a bit of coding to get going. But
- > I tell you as you move from novice to late beginner/intermediate
- developer,
- > the ability to set and forget becomes invaluable. Need PWM at a certain
- > voltage? Set and forget. Need to capture a ADC voltage? Again set and
- forget.
- > Sending serial? I think you get the idea.
-
- How do you learn to use all these things?  There are a lot of great books
- and tutorials on the F84, there is relatively very little on the newer
- chips.  A few months ago I used the ADC for the first time, I followed
- through the app notes on the Microchip website while going over the
- datasheet at the same time to see what I was setting (the app notes are
- quite bad at telling you what bits you're setting and why, but the
- datasheets simply list all the bits with descriptions and don't have a
- comprehensive "to do that you set these bits like this").  After writing my
- code, it wouldn't work.  After hours of frustration, I found out (from the
- datasheet) that there's a bit I have to set to turn on the ADC.

The Midrange manual lays out the process in detail with example code written
in PIC assembly. It describes each and every peripheral available on every
part in the family. For example take a read of the operations section of the
10 bit ADC in the midrange manual (section 23-3, page 23-5). It outlines the
exact process for using the module. Would this have helped you? Section 23-7
page 23-10 gives example code.

Also all of the parts share essentially the same hardware modules. There is
sample code and tutorials for the 16F628 and the 16F877. Fr. McGahee's
PICUART code works virtually unmodified on any 16F part with a USART. We
need more code/tutorials like that.


-
- Sure, it's my fault for missing it the first 20 times I read that section of
- the datasheet, but there doesn't seem to be any available material to teach
- you how to do something.  A cleanly written, well documented source code
- listing would have helped a lot.

Take a read of that section and let me know if it would have helped. I think
that there are many developers that are not aware of the Reference Manuals.

-
- > So you need a breakpoint very early on. Reason is that if you take the
- tutorial
- > path on the 16F84 road, you'll be led down all types of avenues that are
- not
- > really relavent to modern PIC development.
-
- Show me the tutorial road using the hardware peripherals then.  I'd be quite
- happy to take it.
-
- > Yes there is. It adds a much higher level of complexity to the process of
- > coding once you get beyond the exemplars of the tutorial. While bitbanging
- > works in isolation, once you start combining it to multiple tasks it very
- > quickly gets very difficult to manage.
-
- As a beginner, you're not going to be combining it to multiple tasks.  It's
- important to understand what the peripherals do to use them properly.

Right. But on the other hand you won't stay in tutorial mode forever either.
Real systems virtually always have interconnecting components. Take my
sunrise/sunset light controllers as a simple example. Code is here:

http://www.finitesite.com/d3jsys/clock.asm

It does all of the following:

1) Keep track of real time using a 32Khz crystal.
2) Uses a ADC interface to gather user input.
3) Drives a multidigit LED display.
4) Controls the lights via a relay interface.

It's probably about second or third on a real project list for a novice.
Being able to set/forget timer 1 and the ADC simplified it immensely.

The point is that I agree that you learn them in isolation for teaching
purposes. But soon enough you'll be doing combinations for real projects. And
with using actual hardware, there are only limited interactions between the
components, simplifying the complexity of such projects.

-
- > There's a vast difference between code
- > simulating hardware and code that manages it. Even managing a simple set
- of
- > tasks such as doing serial while doing PWM while reading from the ADC can
- get
- > real tough if you have to bitbang each.
-
- If you've been reading my other thread about the LED stroboscope, that's
- pretty much what I'm trying to do.  I will be using the hardware peripherals
- as much as possible.  I don't think it's possible to get the PWM to do what
- I want, so I will probably end up bit-baning the output (though I've seen a
- few innovative suggestions that involve generating the pulses in an analog
- circuit and using the pic as a frequency counter).  Knowing how to do the
- PWM in software is good here.

No argument there. But you were able to make an informed decision about which
to choose because you were aware of the choices. My point is to teach the
hardware method first and its limitations, then move on to software. But that
can only occur when the hardware is available to teach.

-
-
- I've recently started playing with the 18F252, and I can not get the new
- memory paging system to work.  I've read the data sheet and microchip's
- migration document, and I've tried the assembly code from there and it
- doesn't work.  If I write the code using the access bank, it works
- perfectly, but I only have access to 128 file registers.  If I make a tiny
- change to the code to put my data in bank 1, the chip just sits there and
- does nothing when powered.  Obviously I'm doing something wrong, but I have
- no idea what, and since it's not a 16F84, I can't find any documentation to
- help.  My solution has been to to just use JAL with the 18F252 (thank you,
- Wouter)

The 18F (and 30F) families are on my list of things to do. Of course language
choice is another debate altogether.

-
- Sorry if this is a bit rambling, but it's getting pretty late.

No problem. It's an important discussion. I agree with you about the lack of
tutorials and documentation. We had extensive discussions about that during
the several month long PIC beginner station thread. I believe it's something
that we here on the list could do as a collective. But I doubt that anyone
with the expertise to coordinate such an effort would have the time to do so.

BAJ

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

2004\08\04@114816 by Byron A Jeff

face picon face
On Wed, Aug 04, 2004 at 07:42:18AM -0400, Olin Lathrop wrote:
> > I've recently started playing with the 18F252, and I can not get the
> > new memory paging system to work.
>
> There is virtually nothing you have to do.  Since GOTO and CALL instructions
> contain the full address, you have one linear address space for just about
> all purposes.

Hi Olin. Welcome back.

I believe that Jason was referring to the paging system of the RAM. Access
bank and all that good stuff.

BAJ

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

2004\08\04@122757 by Byron A Jeff

face picon face
On Wed, Aug 04, 2004 at 09:25:31AM -0400, John J. McDonough wrote:
> ----- Original Message -----
> From: "Byron A Jeff" <RemoveMEbyronspamTakeThisOuTCC.GATECH.EDU>
> Subject: Re: [PIC:] Getting started
>
>
> > Lose the 16F84A's and get yourself some 16F88 samples. My page here talks
> about
> > the advantages, one of which you refer to later on in your post:

John,

I answered most of these points in my posts to Jason. But I'll add a bit
here. Major snipping to get to the point quickly.

> Once you are reasonably comfortable with the 84, then move on to the 628, or
> another modern part with 2K of memory.  Don't go over 2K for now.  Parts
> like the 872 are nice because you get a few more I/O pins.  Study the
> datasheet.  Notice that your GPR locations are no longer always available.
> Notice that not all the pins are initialized as inputs.  Get your head
> around that.

The math model of teaching:

1) At first there are only positive whole numbers.
2) Then you add the concept of negative numbers.
3) Then reals.
4) Then complex.

You get the idea. As do I.

The difference here is that the operations are self consistent in math.
Adding complex numbers doesn't change the addition operation for positive
whole numbers.

Unfortunately microcontroller programming doesn't work like that. You have to
teach a whole new paradigm when you switch chips. You have to unlearn what
you have learned in order to learn something new.

In those cases you teach the paradigm that you are most likely to use first,
then the others later.

>
> Microchip has a series of videos well hidden on their website that do a
> wonderful job of explaining some of the more difficult concepts you need to
> get past the 84.  I wouldn't dive into these until you have started to
> understand how the 628 differs from the 84.  The 628 is nice because, ONCE
> YOU UNDERSTAND IT, it isn't that hard to port 84 code to the 628 and the
> part is half the price of the 84. But there are enough tricky bits that I
> would get comfortable with the 84 first.

That all comes from a basis that you're going to be porting 84 code. The
changes are minor:

1) Turn off the analog comparators in the CMCOM register if you want to use
digitial I/O on port A.

2) There are more SFRs so regular memory starts in a different place.

Now if you're working with the 628/88/877 from the start you simply explain
these as a part of hello world. There's nothing to unlearn.

It's not the same situation as with PIC assembly and high level languages
where you really need to learn the lower level language before moving on so
that you can converse with other developers. In fact it's the opposite
because all the established developers will be using the USART, PWM, CCP,
multiple timers, and ADC while the novices are still learning how to bit bang
it. Congintive disconnect between the two camps.


{Quote hidden}

I disagree. Especially for the hobbyist who will (and should) try to have
a template part that serves the vast majority of their needs. It's my
believe that they should pick the most capable part in each parts size then
stick to it like glue. So my list would be for the midrange family:

8 pin: 12F675
18 pin: 16F88
28 pin: 16F876A
40 pin: 16F877A

With the last three the only real variance is the memory size and the number
of I/O pins. They each share essentially the same peripheral set.

>  The 16F88 is a pretty cool part.  But the biggest limitation of the
> 84 is the number of I/O pins, and the 88 doesn't help that.  If your project
> doesn't need a lot of I/O, but it does need analog, and it needs a bunch of
> memory, well then, that's a nice choice.  However, once you have your head
> around all the issues, you can choose a 628 when you don't need a lot of
> I/O, the 88 if you need analog and a ton of memory, the 872 for a few more
> I/O's, the 873 if you want memory with that, and on and on and on.

That's where it gets confusing. By always choosing the part with all the
capabilities instead of a subset, you eliminate that design choice from the
equation. With my single part list, I don't need to know the differences. I
know that each of the parts above has maximum capability.

Now it's not cost effective, and doesn't work on large scale professional
projects. But I'm conversing strictly from a novice/intermediate hobbyist
standpoint. Keep it simple by picking the part with everything and then use
it everywhere.

> Instead
> of being limited, you can choose the part that you need and not pay the
> price for more capability than you need.

See the above statement. You discussing this like a professional. If you're
only going to use 10 parts a year, it doesn't matter if they cost 95 cents
more. If it were 100,000 parts then that's a whole different story.

> The 877 is fairly popular among
> hobbyists.  However, the thing is big and expensive.  If you don't need all
> the I/O, the 628 is a third the price.  But if you need 8K, if you need 40
> pins, well then it's available.

Using Randy's prices on glitchbuster.com the price difference between the
628A and the 88 is 95 cents. It's worth 95 cents no to have to worry if a
feature will be available for a hobbyist for a project.

>
> So yes, I firmly believe that for someone who isn't pretty deep into
> microcontrollers already, the 16F84 is the part to learn on.  But free
> yourself of it quickly.  There is a lot to be gained from the other parts.
> And don't be parochial.  Microchip has hundreds of different models for a
> reason.  Pick the chip that fits your project, and be confident that it is
> simply just like the last chip with more of whatever it is that you need
> more of.

You have my counterpoint. Pick the most featured part. Learn it well. Use it
exclusively. Maximize hardware usage. That's the path for hobbyist success.

BAJ

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

2004\08\04@124250 by Jan-Erik Soderholm

face picon face
Byron A Jeff wrote :

> On Wed, Aug 04, 2004 at 09:25:31AM -0400, John J. McDonough wrote:
>
> > So yes, I firmly believe that for someone who isn't pretty deep into
> > microcontrollers already, the 16F84 is the part to learn
> > on.  But free yourself of it quickly.  There is a lot to be gained from
> > the other parts. And don't be parochial.  Microchip has hundreds of
> > different models for a reason.  Pick the chip that fits your project,
> > and be confident that it is simply just like the last chip with more
> > of whatever it is that you need more of.
>
> You have my counterpoint. Pick the most featured part. Learn
> it well. Use it exclusively. Maximize hardware usage. That's the path for
> hobbyist success.

Agree.
I'm involved with a school project where complete PIC beginners
(and actualy mostly electronic beginners at large) are using a
setup with 18F252 as the "brain" (Wouters "Dwarf-boards").

No real problems that would have been more easily solved
if using some other chip, as far as I can tell.

By not even telling them about the past time when you
had to struggle with chips like the 'F84, this whole question
about selecting a chip is a non-issue (for them).

Jan-Erik.

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

2004\08\04@140216 by Wouter van Ooijen

face picon face
>  8 pin: 12F675
> 18 pin: 16F88
> 28 pin: 16F876A
> 40 pin: 16F877A

Microchip does not leave you in peace: there are also 14-pin, >40 pin,
and almost-there 6 pin chips!

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

2004\08\04@154104 by Olin Lathrop

face picon face
Byron A Jeff wrote:
>> There is virtually nothing you have to do.  Since GOTO and CALL
>> instructions contain the full address, you have one linear address
>> space for just about all purposes.
>
> Hi Olin. Welcome back.
>
> I believe that Jason was referring to the paging system of the RAM.
> Access bank and all that good stuff.

Ah.  Yes, there is still some segmentation of the RAM address space, but
it's easier to deal with than on the on 16 family.  Also in PIC speak, RAM
segmentation is referred to as "banking", while program memory segmentation
as "paging".  This is why I misunderstood his question.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

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

2004\08\04@160806 by Jason S

flavicon
face
From: "Jinx" <joecolquittEraseMEspam.....CLEAR.NET.NZ>
Sent: Wednesday, August 04, 2004 1:45 AM


> Their intentions are good but it's reported that MC's own code has
> faults (the manuals too in minor ways), which is unfortunate for anyone
> trying out something new. I recently had that experience with I2C,
> which I'd not used since the F84

I don't mean to fault MC's intentions.  I really like MC and I don't think
they're doing anything wrong here.  They should provide datasheets as they
do, not go all-out on educational documents.  Educational documents should
be 3rd party; how many computer software books do you buy from the same
company that wrote the software?

I was just commenting that there is very little 3rd party material available
that isn't based around the F84.

> What is it that's not working wrt the memory paging system ? Are
> you using the Bank Select Register ? MOVLB 1 to change access
> Bank1 RAM for example

If I have a MOVLB 0x00 at the beginning of the initialization and never
touch the BSR again, everything works.  Just looking at the datasheet, that
shouldn't be the case because I should be using bank 15 for the access bank.

If I MOVLB 0x01 before any user data accesses and MOVLB 0x00 or MOVLB 0x0F
before any SFR access, the codes assembles and loads without error (there
might have been warnings - it's been a couple of weeks since I've touched
the 18F252 assembly code), but the chip sits there and does nothing.  All
the program does at this point is blink a couple of LEDs 180 degrees out of
synch.

Jason

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

2004\08\04@163713 by Olin Lathrop

face picon face
Jason S wrote:
> If I have a MOVLB 0x00 at the beginning of the initialization and
> never touch the BSR again, everything works.  Just looking at the
> datasheet, that shouldn't be the case because I should be using bank
> 15 for the access bank.

It doesn't work that way.  Read the data sheet again.  You either reference
a location in the "current" bank as specified by BSR, or you reference a
location in the "access bank".  The access bank isn't really a bank as such,
just 256 locations that Microchip chose for you to have direct access to
without regard to the BSR setting.  The access bank versus current bank
addressing mode is chosen by a bit in the instruction.  The assembler does a
very good job figuring out when you can use the access bank and when not
that you pretty much just let it do that.

On the 18F252 the 256 access bank locations are split between the first 128
bytes of the address space and the last 128 byte of the address space where
the SFRs live.  Therefore, on the 18F252 you never need to worry about the
BSR setting when accessing a SFR.  You also get to pick 128 of your own data
bytes that are special enough to be accessible all the time.  The remaining
data bytes will require the proper BSR setting for access.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

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

2004\08\04@165129 by Jan-Erik Soderholm

face picon face
Jason S wrote :

> If I have a MOVLB 0x00 at the beginning of the initialization
> and never touch the BSR again, everything works.  Just looking
> at the datasheet, that shouldn't be the case because I should
> be using bank 15 for the access bank.

No, *you* look again :-)
(Pages 42 and 43)

The RAM of any 18-series PIC is devided inte 16 RAM "banks".
Bank 0 --> 15. Those is a kind of physical banks, so to speek.

But, apart from this, there is also a 17'th bank, the "access bank", you
could look at this bank as a "virtual" bank made up of some of the
first memory (128 bytes on the 18F252) and some of the very last
memory (the FSR's). This access bank can always be accesed, no matter
what the BSR is set to. It's the "a" bit in the assembler commands
that tells the assembler which addressing method to use (access vs. BSR).

If you don't specify the "a" bit, MPASM will automaticly put in a
correct value depending on which address is accessed. This is
also why all RAM symbols in the INC file are specified using
full 12-bit addresses.

> If I MOVLB 0x01 before any user data accesses and MOVLB 0x00
> or MOVLB 0x0F before any SFR access,...

Wrong, you can always access the SFR's through the "access bank"
no matter what the BSR is set to !

If you only have data in bank 0 and 1, you could set BSR = 1 and
access all your data *and* the SFR's without ever changing
the BSR again ! *And* if you  just setup your symbolic names of
your variables using full 12-bit addresses, you don't even have to
care if a specific variable is in bank 0 or bank 1, the assembler
will automaticly set the "a" bit an all commands (using it) to
the correct value !!

If you also have data in bank 2-5, is another matter. But it's quite
easy to manage, if you only use those bank for buffers and such,
not your general/global variables.

> the codes assembles and loads without
> error (there might have been warnings - it's been a couple of
> weeks since I've touched the 18F252 assembly code), but the
> chip sits there and does nothing.

I'm sure it does something, not just what you thought...

> All the program does at this point is blink a couple of LEDs 180
> degrees out of synch.

There you see ! :-)


Jan-Erik.

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

2004\08\04@165511 by Jan-Erik Soderholm

face picon face
Olin Lathrop wrote :

> Therefore, on the 18F252 you never need to
> worry about the BSR setting when accessing a SFR.  You also
> get to pick 128 of your own data bytes that are special enough
> to be accessible all the time.  The remaining data bytes will
> require the proper BSR setting for access.

If your remaining data are all in bank 1, you only have to
set BSR = 1 once and never change it again.
Bank 2-5 is another storry...

Jan-Erik.

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

2004\08\04@173803 by Jason S

flavicon
face
From: "Byron A Jeff" <EraseMEbyronspamCC.GATECH.EDU>
Sent: Wednesday, August 04, 2004 8:46 AM


> The Midrange manual lays out the process in detail with example code
written
> in PIC assembly. It describes each and every peripheral available on every
> part in the family. For example take a read of the operations section of
the
> 10 bit ADC in the midrange manual (section 23-3, page 23-5). It outlines
the
> exact process for using the module. Would this have helped you? Section
23-7
> page 23-10 gives example code.

That might have helped, but it is presented in a way that is most aimed at
embedded system engineers and is a lot harder for a typical hobbiest who's
fairly new to pics to follow.  Of course that is exactly what MC should be
doing considering who their customers are, but there should be something
more accessible.

For example, how long will it take to take an A/D reading?  That doc answers
the question very precisely and even includes a sample question, it seems to
depend on a lot of factors, but there is no way a less experienced user will
get anything out of that, atleast not without a lot of time and effort.

> Also all of the parts share essentially the same hardware modules. There
is
> sample code and tutorials for the 16F628 and the 16F877. Fr. McGahee's
> PICUART code works virtually unmodified on any 16F part with a USART. We
> need more code/tutorials like that.

Virtually unmodified -- if minor changes need to be made, it might be easy
for you, but it's not easy for a newbie.  Needing to change a couple of
values in the memory map could render the program useless for a user who
doesn't know that and is unfamiliar with the chips, so they end up pouring
through datasheets to spot the differences.

Obviously you are quite comfortable with the pics in general and the
differences between the processors, but I think that's making you
under-estimate the learning curve.

> Right. But on the other hand you won't stay in tutorial mode forever
either.
> Real systems virtually always have interconnecting components. Take my
> sunrise/sunset light controllers as a simple example. Code is here:

The great thing about this hobby is there's always something to learn.  It's
a lot easier to dig out the tutorial than the user manual to start learning
something new.

My day job is as a web developer.   I have about 8 years of experience, and
3 in php which is what I code in these days.  When I have to learn something
new about my field, I still start by looking for the tutorials, webmonkey is
my favourite resource.  Once I have the general idea and some working code,
I'll look in the manuals for the details.

In the PIC arena, I think the analog is start with a nice tutorial on using
that peripheral in a basic way on that chip.  Once you are comfortable using
it, you can look at MC's documentation to see what all the flags do and what
other features the peripheral has.

> No argument there. But you were able to make an informed decision about
which
> to choose because you were aware of the choices. My point is to teach the
> hardware method first and its limitations, then move on to software. But
that
> can only occur when the hardware is available to teach.

You're right, so if you're teaching an intro to pics course and you plan to
make all the necessary materials available, then use a 16F877 or 16F628.

Telling someone who's about to start self-teaching themselves with available
resources on the web that they should avoid the 16F84 will only cause them a
lot of trouble.

> The 18F (and 30F) families are on my list of things to do. Of course
language
> choice is another debate altogether.

I've always thought everything on a pic should be in assembly, but JAL is
slowly changing my mind.  It's not good for everything, but for many
applications I can see how a high level language can make things a lot
simpler.  After starting out using LCDs with assembly code, I can really
appreciate the HD44780 library in JAL :).  I just wish the libraries were
better documented.

Jason

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

2004\08\04@173804 by Jason S

flavicon
face
From: "Byron A Jeff" <RemoveMEbyronEraseMEspamEraseMECC.GATECH.EDU>
Sent: Wednesday, August 04, 2004 8:47 AM


> > There is virtually nothing you have to do.  Since GOTO and CALL
instructions
> > contain the full address, you have one linear address space for just
about
> > all purposes.
>
> Hi Olin. Welcome back.
>
> I believe that Jason was referring to the paging system of the RAM. Access
> bank and all that good stuff.

Yes, that's right.  Thanks, Byron.

Jason

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

2004\08\04@180123 by Olin Lathrop

face picon face
> If you only have data in bank 0 and 1, you could set BSR = 1 and
> access all your data *and* the SFR's without ever changing
> the BSR again !

Actually first half of bank 0 and all of bank 1.

> *And* if you  just setup your symbolic names of
> your variables using full 12-bit addresses,

It is much better to use UDATA_ACS to tell the linker to put your variables
in the access bank.  Hard coded addresses are not recommended.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

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

2004\08\04@183955 by Jan-Erik Soderholm

face picon face
Olin Lathrop wrote :

> > If you only have data in bank 0 and 1, you could set BSR = 1 and
> > access all your data *and* the SFR's without ever changing
> > the BSR again !
>
> Actually first half of bank 0 and all of bank 1.

Yes, on the 18F252, not on all 18F's...
(Some uses less then the first half of bank 0 for the access bank...)

> > *And* if you  just setup your symbolic names of
> > your variables using full 12-bit addresses,
>
> It is much better to use UDATA_ACS to tell the linker to
> put  your variables in the access bank.

*If* the linker is used, yes. :-)

>  Hard coded addresses are not recommended.

As is crossing the street on red light, but some does
that anyway. No harm in telling them how to do that
safely, if they still want to, is there ? :-) :-)

Now, it's half past midnight, good night !

Jan-Erik.

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

2004\08\04@212429 by Engineering Info

picon face
I'm still waiting for them to come out with an SOT-23 or TO-92 model
(power, ground, and 1 I/O).

Wouter van Ooijen 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

2004\08\04@213259 by Robert B.

flavicon
face
It would need at least 4 pins... clock and data for programming, plus
power/ground.  So I guess you'd be stuck with two IO's instead.  ugh...
that's twice as much to program!


{Original Message removed}

2004\08\04@214544 by Engineering Info

picon face
Actually you can double up power and clock on the same pin.

Robert B. wrote:

>It would need at least 4 pins... clock and data for programming, plus
>power/ground.  So I guess you'd be stuck with two IO's instead.  ugh...
>that's twice as much to program!
>
>
>{Original Message removed}

2004\08\04@215206 by Robert B.

flavicon
face
Salvation!  Could you really do that?  I would've thought the device needs
power to read a clock pulse, but apparently not!  If I could get an adequate
supply of TO-92 PICs, I just might be able to take over the world...

{Original Message removed}

2004\08\04@221418 by Engineering Info

picon face
It would use parisitic power.  In fact, you wouldn't even need a
seperate line for clock and data.  You could put Power, Clock, and Data
all on the same pin.  Look at the Dallas I-buttons
(http://www.ibutton.com/).  They have been doing this for year.

Robert B. wrote:

>Salvation!  Could you really do that?  I would've thought the device needs
>power to read a clock pulse, but apparently not!  If I could get an adequate
>supply of TO-92 PICs, I just might be able to take over the world...
>
>{Original Message removed}

2004\08\04@231721 by William Chops Westfield

face picon face
> It would need at least 4 pins... clock and data for programming, plus
> power/ground.  So I guess you'd be stuck with two IO's instead.

Nah; Doesn't Dallas have a perfectly reasonable one-wire data protocol?
Some of the one-wire devices piggyback data on the Vcc, right?  So
maybe you can even have a two-pin device...

BillW

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

2004\08\04@233214 by Robert B.

flavicon
face
Those Ibuttons look pretty awesome, I'd never seen them before.  I wonder
what it would take to convert all my doorlocks to use one of those NV-RAM
types... ;-)

Back on topic, I suppose it could be interfaced to a PIC in the door-lock
and each have an algorithm to reprogram the current acceptable access code
every time it's used.  e.g. start out syncing some random number in the
ibutton and the PIC as the "unlock" code, then each time add C1 and OR the
result with a multiple of the old ID.  No clue how to work it if you wanted
more than one key...

At $5 each it's almost worth ordering a few to play with!



{Original Message removed}

2004\08\05@001209 by Anthony Toft

flavicon
face
> Those Ibuttons look pretty awesome, I'd never seen them before.  I wonder
> what it would take to convert all my doorlocks to use one of those NV-RAM
> types... ;-)

I have used these in an old program (a long time ago in a galaxy far
away) I have always been trying to figure out what to use the few I have
for. That's one I hadn't thought of, I might think towards doing that
after I move
--
Anthony Toft <RemoveMEtoftatspam_OUTspamKILLspamcowshed.8m.com>

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\08\05@001218 by Engineering Info

picon face
But of course you would HAVE to interface the I-Button with one of those
3 pin SOT-23 PIC's.  There wouldn't be allot of computing power in a 3
pin PIC but imagine the following with a 3V device:

  1. The power pin also doubles as the A/D input for voltages greater
     than 3V.  "Program" the A/D for 4.15 volts (or whatever voltage
     you want to "program" into it) and the I/O pin goes from an input
     to a grounded output to trip some other circuit.  Think
     "programmable" reset circuitry or battery voltage monitoring, etc.
  2. How about a startup delay circuit.  Would no longer need to have
     some RC circuit that will drift over time or temperature.  When
     power comes on, start a simple timer and when the "programmable"
     time is expired, output a high (or a low) on the output.
  3. How about a momentary latch or "programmable" pulse stretcher.
     Monitor the I/O line and when the level shifts, switch the I/O to
     an output and maintain the new level for some "programmable"
     amount of time and then release the line back to an input.
  4. Anybody think of anymore?


Robert B. wrote:

{Quote hidden}

>{Original Message removed}

2004\08\05@001611 by Jason S

flavicon
face
From: "Robert B." <RemoveMEpiclistTakeThisOuTspamspamNERDULATOR.NET>
Sent: Wednesday, August 04, 2004 8:33 PM


> Those Ibuttons look pretty awesome, I'd never seen them before.  I wonder
> what it would take to convert all my doorlocks to use one of those NV-RAM
> types... ;-)

I never knew what those were called.  There's a chain laser tag places
around here that's used them for at least the past 10 years.  They give you
one when you register to play in a game that has your nickname assigned to
it.  You use it to activate the gun.  For people with annual memberships you
get your own to keep with a custom keychain.

Jason

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\08\05@012207 by Robert B.

flavicon
face
It would be perfect for replacing a 555-timer, maybe a decent PWM generator
based on the AD input above 3v, a programmable one-shot?   Really I could
think of a whole lot more applications for 2 IO pins though... One for
input, one for output.  if they could cram an AD on one pin and a DA on the
other, it could be a 4-pin transfer-function!


{Original Message removed}

2004\08\05@012431 by Shawn Wilton

flavicon
face
Just an FYI, you can get samples for free.  I have all manner of
iButtons here.  But they take MONTHS for the samples to arrive.


Shawn Wilton
Junior in CpE
MicroBiologist

Phone: (503) 881-2707
Email: EraseMEshawnspamspamspamBeGoneblack9.net

http://black9.net

Robert B. wrote:
{Quote hidden}

> {Original Message removed}

2004\08\05@034428 by Engineering Info

picon face
Yes, I agree that 2 I/O would be better and I can think of a whole lot
more applications with a 40 pin part also.  The point I'm trying to make
is that just cause a processor may only have 2, 3, or 4 pins doesn't
mean there isn't anything that they can be used for.  Their limit is
only in your imagination.  I predict that it will only be a matter of
time before a 3 pin PIC processor is available.

Robert B. wrote:

>It would be perfect for replacing a 555-timer, maybe a decent PWM generator
>based on the AD input above 3v, a programmable one-shot?   Really I could
>think of a whole lot more applications for 2 IO pins though... One for
>input, one for output.  if they could cram an AD on one pin and a DA on the
>other, it could be a 4-pin transfer-function!
>
>
>{Original Message removed}

2004\08\05@073417 by Bill Couture

picon face
On Thu, 5 Aug 2004, Engineering Info wrote:

> Yes, I agree that 2 I/O would be better and I can think of a whole lot
> more applications with a 40 pin part also.  The point I'm trying to make
> is that just cause a processor may only have 2, 3, or 4 pins doesn't
> mean there isn't anything that they can be used for.  Their limit is
> only in your imagination.  I predict that it will only be a matter of
> time before a 3 pin PIC processor is available.

So why not just cut 3 of the pins off from a SOT-23 pic 10F?

Bill

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\08\05@075741 by Russell McMahon

face
flavicon
face
> > Yes, I agree that 2 I/O would be better and I can think of a whole lot



Some AVR's have Vcc and Gnd on both sides.
Cut off the pins on one side, bend the others out straight, and mount it as
a SIL :-)


       RM

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\08\05@131001 by Engineering Info

picon face
I like your thinking Russell.  I proposed a 10 pin SIL package to
Microchip about 8 years ago.

Russell McMahon wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\08\11@071411 by Howard Winter

face
flavicon
picon face
Robert,

On Wed, 4 Aug 2004 23:33:00 -0400, Robert B. wrote:

> Those Ibuttons look pretty awesome, I'd never seen them before.  I wonder what it would take to convert all
my doorlocks to use one of those NV-RAM types... ;-)

That's probably the most common use for them - you can even get kits that do all the work, and provide a relay
output on "valid button detect" to operate the lock-release solenoid.  You have to teach it which buttons are
valid, but that's trivial (press a "learn" button, connect the button, for example).

I've seen them as "staff identity" in pubs over here - the bar staff have one attached to a retracting cord on
their belt, and connect it to a receptacle on the till when they are ringing up sales.  This gives an audit
trail and is also a security feature - the till won't work (or open) without a valid button in place.

Dallas use the "1-wire" concept is used for other devices than ID buttons - you can get temperature sensors,
an "addressable switch", memory and so on.  I don't know if they still do the evaluation kit, DS9091K, but it
has a good number of parts and it's fun to play with!

Cheers,


Howard Winter
St.Albans, England

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

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