Microsoft
Internet Explorer users click here to make Learn-C.com your homepage.
Send an e-mail to friends about Learn-C.com
Translate this page
All of the
source code covered in the experiments is now available on the order page for
only $4.00!
This site uses
hands-on experiments to show the basics of how real things in the real
world are controlled with computers. That means it's about most of the
computers in the world. Most computers don't sit on desks, but are used to
control things that don't look anything like a computer, such as
factories, spacecraft, toys and appliances. This site provides the
opportunity to learn basic control and embedded system concepts while
taking advantage of the low cost and conveneince of using a PC as a
platform.
This site is for anyone who is the least bit curious about monitoring and controlling such things as motors, lights and switches, or recording and playing everything from sound to the arm position on a robot. It's for anyone who likes to learn by doing. You will not only read about controlling motors, lights and sound, you will control real motors, real lights, and really record and play information. It's for anyone who finds intriguing the prospect of controlling a robot or a toy or an appliance by means of a computer embedded in it or, for that matter, a whole factory or space station. It's for anyone who has done little with computers beyond clicking a mouse button, as well as the professional looking for source code. It's for anyone who wants to reach as far as the imagination will take them. This site is for teachers who would like to give their students some interesting, hands-on experience. It's for people who are considering a career change but don't want to suffer the high cost and time of a formal education before knowing for sure that this is the career they would actually look forward to every morning. It's for programmers who would like to know how to read schematics and
construct hardware Please don't think electronics and programming have to be hard. Far from it. Read what others say about this site to get an idea of what the experience is like. Besides, it costs nothing but a little time to go through everything here (well, maybe more than just a little time unless you can read 240 pages really fast). It's not heavy reading, either. It's designed to be accessable by anyone with a knowledge of basic mathematics. You're ready if you can add subtract, multiply and divide. The earlier sections include self-tests that permit checking progress or skipping sections already understood. The tutorial examples will work on most operating systems that allow
direct access to ports (more on ports later). Linux, DOS, Windows 3.x,
Windows 95, Windows 98, and Windows Me will work, among others. To use
Linux, follow the guidelines at the Linux I/O port programming mini-HOWTO. Direct port
access is not permitted by The optional hardware needed to provide an interactive, hands-on experience is available as an inexpensive |
I designed for the
purpose. A small picture is shown at right. It plugs into one of the ISA slots
of any XT or better PC (see Ask Jeeves for a brief description of the ISA slot).
Don't have an ISA slot? Inexpensive computers that do are easy to get -- see
below.
The board has more than enough capability for experimentation. Its inputs and outputs are very much like those typically found on a microcontroller, which is similar to a microprocessor, the main computational device in a desktop computer, but with extra inputs and outputs to allow it to listen to and talk to the outside world. A bare board is only $20, and there are discounts for quantity. Kits are available for $50 (plus shipping, etc.), and assembled boards can also be ordered. You can even download this whole site so you can view it off-line for your own personal use by ordering a zip archive file containing all of the site files for only $8.55. With it, you get free update files as the site is updated.
You can take the trip without the hardware, but the impact will be
considerably less. It's much easier to understand the effect of the programming
if it can be directly experienced. The multi-sensory impact of, for example,
writing a program to control a motor or to record and play back the sound of
one's own voice, then seeing it actually happen is huge.
Download the step-by-step instructions for assembling a board here to see how easy building one
really is. The instructions even include a section on how to solder. The
document is a 2 Meg Word97 file. Those who don't have Word97 can download a free
reader from Microsoft by clicking here:
As a bonus, the board will work with Super Start. Super Start is free software that uses the hardware to help very young children get the basic core knowledge they need for a good beginning in education. That means the board can serve a dual purpose for people with infants and small children. You can also download the Super Start source code if you wish.
Need a computer? Schools and non-profits can get free computers at one of the computer recycling sites. Else, try Ebay. Just be sure the computer you find has an ISA slot available. It might be necessary to email the seller to make sure. Even computers with slots taken up with things such as modems and sound cards can be used. They are not needed and can be removed to make room for the board used in this tutorial.
| Ebay search for Pentiums with ISA |
Some of the computers offered in Ebay have had their hard drives erased. No problem. I have seen DOS there for around $5 -- Ebay search for MS-DOS. Don't worry if you don't know how to use DOS. You will learn enough to get by. Of course there's no need to get DOS if the machine already has an operating system on it that will work.
Sections are always being added and/or updated. Please let me know if you would like to get update notices. Please Note: I NEVER release any email addresses!!
Click here to be removed from update notification.
You can also join the LEARN-C discussion group. It permits users of the tutorial and/or board to discuss experiences. There are two ways to join. Click here to subscribe by email, or here to go to the group site to subscribe.
Please let others know about this site. It's easy to do. Just click here to send an e-mail about this website to people on your list who might find the tutorial useful (which, of course, is everyone on your list). The subject and body of the email will already be entered, but you can modify them as you wish.
Data lines, bits, nibbles,
bytes, words, binary and HEX
Passing information
around in a computer and the hardware.
| Jump To Self-Test For Data lines, bits, nibbles, bytes, words, binary and HEX |
Boolean Logic as it relates to programming as well as the hardware.
How to figure out if it's on or off and how to turn it on and off. Address Lines and Ports
How To Read A Schematic
The Hardware Putting It All Together -
Controlling The Hardware With The Software Experiment 1 - Basic Switch
Input Detection Experiment 2 - Expanding
Switch Input Capacity Experiment 3 - The General
Purpose Digital Input/Output Module - Part 1 Experiment 4 - The Multiple
Closure Problem And Basic Outputs With The PPI Experiment 5 - Controlling
Motors Questions,
Answers And I Dunno It's also a good place to make suggestions about what the tutorial should
toot -- too much too fast, not fast enough, not the right stuff, just right,
etc.?
Drag this dot to your desktop to bookmark this site:
Search for books at Barns & Noble. Try entering
something like embedded in the search box below. I got
239 titles the last time I tried it! Also, take a look at their
Jump To The
Self-Test For Boolean Logic
Using the hardware to make contact with the outside world.
Jump To The
Self-Test For Address Lines and Ports
Just a few symbols and you've got it
Jump To The
Self-Test For How To Read A Schematic
Details about portions of the hardware not discussed in the experiments.
The C
language fundamentals
Using a device on the board for
digital input to get the status of switches.
Using the 8255 Programmable
Peripheral Interface on the board to get an additional 8 inputs.
Using two
ports of the 8255 PPI on the board to form a switch matrix.
More on
the matrix, driving higher-current devices using the PPI on the board with
current driver circuits.
Powering higher-current devices using the PPI
on the board.
Experiment 6 More Precise Control
Of Motors
Using the digital I/O on the board with
the computer's timer to control devices
Experiment 7 - Bi-directional
Control Of Motors And The H-Bridge
Using the digital
I/O on the
board with the computer's timer to provide bi-directional motor control
Experiment 8 - Digital To Analog
Conversion
Using the Digital to Analog Converters on
the the board
to produce sounds, etc.
Experiment 9 - Analog To Digital
Conversion
Using the 8-channel Analog To Digital
Converter on the the board to record sound and other analog data.
Experiment 10
- Using Analog Inputs To Control Motors>
Modifying the
timer system to control PWM in proportion to inputs
from the 8-channel Analog
To Digital Converter on the the board
Experiment 11 - Using Analog
Inputs For Bi-directional Control Of Motors
Modifying
the timer system to control PWM in proportion to inputs
from the 8-channel
Analog To Digital Converter on the the board.
A relay is used this time to control the
direction of the motor.
Questions that have been sent in
and my often lame answers.
Have a question about something on the site? --
Email Q, A & I
D.
Don't worry if English is not your first
language. I'll work with you and we will figure it out together.
Let me know what you want and I'll try to provide
it.
Search this
site powered by FreeFind
Just in case someone is curious:
HTML Resume .. Word97 Resume .. RTF Resume .. TXT Resume