DPRG
DPRG List  



DPRG: Beginner

Subject: DPRG: Beginner
From: Kipton Moravec kmoravec at airmail.net
Date: Wed Jul 16 01:46:16 CDT 1997

droid at bellatlantic.net wrote:
> 
> Hmm....how should I start.
> I know the eletronics but I don't know it too well...I't like this. I have readed a
> Radio Shack BASIC ELECTRONICS and GETTING STARTED IN ELECTRONICS. I have made a simple
> 555 clock and used that to power different logic circuits. Well.. it was the best way to
> learn the thing. But after time the logic itself is not enough. 

You can do anything with logic.  We have had very simple line following
robots built without a controller, just TTL logic. Even with a
controller, you will need logic.


> After viewing almost all
> of the FAQ on the WWW I have decided to go for the microcontrollers. Hmmm...now that's
> where it starts. After viewing information on BASIC Stamp, PIC microcontrollers,
> Motorola 68hc11, Z80, 8000 and 6500 families...the best way to start seems to be a BASIC
> STAMP. 

There is probably no "best way". 

> But the dilema continues...with my amount of knowledge I wonder if I won't
> "outgrow" the Stamp and money invested in the kits would be lost. 

I am not familiar with the basic stamp.  All I know is what I have seen
on http://www.parallaxinc.com/index.htm

My first concern is how slow the STAMP is.  Basic is an intrepreted
language and is 2000 - 4000 instructions per second. The PIC is 1 - 4
million instructions per second. It also has "only 16" I/O lines versus
32 on the PIC.

> Should I start with
> the PIC and if so what book should I go for : Robot Builder bonanza or Easy Pic'n.

I do not think which book you start out with really matters.  If both
are good, you will probably want both.  When you are working alone -- no
guru near by to ask questions to -- different books sometimes explain
the samething differently. One version may be easier to understand for
topic A while the other may be easier for topic B.  

> I mean....I have taken apart a commercial printer, couple of VCRs and purchased TRUE
> RMS VOM, Logic Probe...Prototyping board...and I think a whole research center except
> the oscilloscope. 

Just enough to be dangerous huh? <grin>

> Anyway..If you all think that I should start With a Stamp anyway ...I
> will...I was wondering if after I learn how to use the PICs would Stamp become obsolete
> or would it be a very good addition to my robots...(I was wondering if you can
> communicate between Stamp I or II and PIC)...anyway...what should I do ?
> Any opinion welcome.

My personal opinion is to forget Basic.  When working with
microcontrollers, there are only two that have basic and if it is
intrepreted, it is slow. The rest of the world uses C and Assembler.  C
is easier to learn than assembler, but if you can do logic gates,
assembler should not be too difficult.  C and assembler are two
different ways to program.  C is faster to code.  Assembler is smaller
and faster to run.  The development environment needs to have C source
code in the debugger. Otherwise you might as well stay in assembler. For
robotic control, I prefer assembler for the low level tasks. When I get
to learning, and higher order functions, I will want C or C++.  

I chose a 8051 based processor, instead of a PIC.  They are both
relatively cheap to purchase. The 8051 has been around longer which is
good and bad.  

Good Points: 

It has lots of varients from a number of different companies. 

It also has a lot if different peripherials available, including some
with Pulse Width Modulation (PWM) which makes controlling the speed of a
motor much easier. 

There is a lot of existing code available, and there are a lot of tools
available and a lot of books.

Bad Points:

If you want to use the serial port at standard baud rates, you have to
use a funky clock rate like 11.0543 (or something like that) Instead of
a nice even number like 12, 20, 24, or 32 MHz

There is no multiply and divide instruction, so you have to do it with
the shift and add technique.  (Some of the Phillips versions have added
a multiply and divide instruction to the instruction set.) 

I designed a lens focusing controller based on the 87C52FB (a member of
the 8051 family) and we programmed the whole thing in assembler.  

I just purchased a single board computer from New Micros
http://www.newmicros.com for $49. It has a 8031 (another member of the
8051 family) and comes with C, Basic, or Forth. I would recommend
programming in C and Assembler. I spent an extra $10 for the onboard
power supply regulator.  If you have clean 5 V you can get the board
without the regulator for $39.

Get some books before you buy.  Get the databook on the PIC and the
Phillips 80C51 And the applications books. And any other ones you are
interested in.  When I started the focus controller, I purchased
"Programming and Interfacing the 8051 Microcontroller" by Sencer Yeralan
and Ashutosh Ahluwalia, Addison-Wesley Publishing. It comes with a disk
and simulation SW so I could practice writing 8051 assembler before the
hardware was ready. I do not know if something similar exists for the
PIC, but it may. the advantage of this approach is that you can learn to
code assembler without worrying about if the HW is working or not.

My $0.02 worth.

Regards,
Kip

------------------------------

More information about the DPRG mailing list