In the documentation of your microcontroller’s documentation, you’ll find a diagram and chart describing the different jobs that each pin does.We refer to this diagram so often that we usually photocopy it and put it on the wall. Every microcontroller will have pins for connecting to power and ground, pins dedicated to programming the chip, and general input and output (I/O) pins. Some microcontrollers will have give special function of a subset of pins, for example ADC, PWM or Serial. In software, you will set which task you want a pin to do.
If you want a more professional power connector that will allow you to disconnect your power adapter safely and reuse it for other projects, build a power connector infor your circuit. The easiest type of connector is a 9-Vvolt battery snap, as shown in Figure 3.16 (fourth froorm left). They Battery snaps attach nicely to 9-Vvolt batteries but not very well to standard power adapters. It is also easy to accidentally reverse the polarity with thesebattery snaps, and that which can fry a voltage regulator.
Most of the circuits you’ll build on a breadboard, even the ones with no microcontroller, are likely to work at 5 volts. It’s so common, in fact, that most high and mid level microcontrollers (eg for example, Basic Stamp, BX-24, and Basic Atomm Pro24) come with a 5-Vvolt voltage regulator built in. These regulators allow you a little bit of latitude in the voltage you supply (from 8 to 15 volts DC), converting whatever you input to 5 volts DC. Next, you distribute the 5 Vvolts and ground to the side rows of your breadboard.
The voltage regulators that come with the microcontrollers are a little weak. They are easily fried by a brief short circuit or reversed polarities. If this happens, putting in an external voltage regulator will probably revive your microcontroller. Better yet, skip this drama and put inuse the an external voltage regulator in from the start. If you are using a lower level microcontroller you will need an external voltage regulator from the start. If you wired it incorrectly, your regulator probably overheated and produced a puff of smoke. Let it cool down, throw it out, and try again with another regulator. It is normal for a powervoltage regulator to get a little hot if it operating at the high end of its range., Tthat is why it has that metal fin on top to dissipate the heat. If you have something resembling the dreaded short circuit your regulator could heat up to the point of giving you a little burnwhere it burns you when you touch it. Let it cool down, throw it out, and try again with another regulator.
There are a couple of steps common to all microcontroller programming environments, editing your program, compiling, downloading, running and debugging. One of the great advantages of stamp-like chips is that all of these capabilites are build into a single software package that is freely downloadable from the manufacturer. For a pic, you might have to get four different pieces of software to work together to accomplish the same task. Transferring the program to the microprocessor is usually a one-way journey, it's not possible to get it back. Make sure you keep track of the text files that you create on your multimedia computer because they will be your only copy of your programming. The software for programming all of the microprocessors we’re discussing exists for Windows PC’s only (though there is one a Macintosh-based programming environment for the BasicBASIC Stamp 2). Once you’ve programmed the computer, you can communicate with a Macintosh computer from your microcontroller, however. It is possible to use VirtualPC to run for the programming software for all of these microcontrollers on a Mac, but there are a number of technical difficulties to be overcome to make that happen. The programming environment does not require a very powerful computer, so some Mac users prefer to just pick up an old PC from a junk store or eBay and use that just for programming their microcontrollers.
The first four pins of Stamp-like modules form a serial port that connects to the RS-232 serial port of your multimedia computer. We generally make a serial connector that translates from a standard DB9 cable to the breadboard. The serial cableStamp-like module connects via a serial cable to the serial port on your multimedia computer. Look for a port on the back of your computer with a 9- pin male connector (DB9) labeled “|0|0|1” or “COM1.”. On very old machines, the connector has 25 pins. Nowadays many machines (Mac and PC) are only equipped with a USB serial port. For those, you’ll have to get a USB-to-RS-232 adapter.
[Add to or Correct This Page]|[Yes, this is a Wiki]