INTRODUCTION TO MICROENGINEERING LABS’ LAB-X1 EXPERIMENTAL BOARD:BREADBOARDING AND EXPANSION

BREADBOARDING AND EXPANSION

All 40 pins of the MCU have been provided with extra predrilled PC board holes. These can be used to extend the signals from these pins to an off board location for experimentation. The extensions are easily made with standard 0.1 inch on center pins and matching cables and headers.

A small breadboard space is provided on the LAB-X1 itself to allow the addition of a limited number of hardware items that you may need to experiment with.

See the Internet support web site www.encodergeek.com for availability of ready- made headers and cables and so on for use with the LAB-X1.

SPECIAL PRECAUTIONS AND NOTES OF INTEREST

The following caveat could have been placed later in the book but is included here to encourage you to select the programmer best suited to your needs.

Pin B7 on the LAB-X1 is connected to a programming pin on the EPIC parallel programmer at all times, and the programmer forces this pin high. If you are using this pin in your experiment and you need to have it be low, you must disconnect the EPIC programmer to release the pin. The major benefit of using the parallel programmer is that it frees up your computer’s serial port for communications with the LAB-X1, but if you are using a USB programmer, it can be left connected to the LAB-X1 at all times. This is the reason I recommend the USB programmer.

Resistor R17, which is connected to the keypad, is of no consequence to the opera- tion of the LAB-X1. It is needed for some PIC programming functions and can be ignored for our purposes.

DATA SHEETS

The hardest part of using these microcontrollers is understanding the huge data sheets—often 400 pages or so. Since each data sheet is similar but different from every other data sheet, you are advised to select one or two microcontrollers to get familiar with and use them for all your initial projects. In this workbook the three that are discussed are the PIC 16F84A (this chip will not fit in the 40-pin socket provided but is a good alternate choice) for your small projects and the PIC 16F877A for larger, more comprehensive projects. Each of these uses flash memory and can therefore be programmed over and over again with your programmer and a programming socket. The processor you select will be determined by the kind of I/O and internal features that you need and the availability of inexpensive OTP (one-time programmable) equivalents if you are going to go into production. We will use the 18F4331 also but only for the encoded motor experiments.

A lot of the information in the data sheets is more complicated and detailed than we need to worry about; we can do a lot of useful work without understanding it in every detail. For example, the timing diagrams and other data about the internal workings of the chips are beyond what we need to understand at the level of this book. Our main interest should be in what the various registers are used for and how to use them prop- erly and effectively, as well as being able to set the various registers in the system so that we can activate the features we need for each particular project. Understanding timers and counters is a part of this. The entire interaction of the microcontroller with its environment is determined by the I/O pins and how they are configured, so know- ing how to configure the I/O competently is very important.

The data sheets are available as PDF (portable document format) files on the Internet from the microEngineering Labs web site or from the Microchip web site. Download these onto your computer for immediate access when you need them. Keeping a window open specifically for this data is very handy, but you will also want to print out some of the information to have it in your hands.

The areas of the data sheet that support our needs are the following:

1. Understanding and becoming familiar with what has already been defined by the compiler software as it relates to the software

2. Getting familiar with the addressing and naming conventions used in the data sheet

3. Understanding the use of the various areas of memory on the MCU

4. Learning how to assign and use the I/O pins to your best advantage

5. Understanding how to use the PBP software to its best advantage and writing pro- grams that are as fast as possible

6. Getting familiar with the register naming conventions and usage.

Leave a comment

Your email address will not be published. Required fields are marked *