THE PROGRAMMERS
microEngineering Labs offers three programmers. One uses the parallel port, one uses the USB port, and the third uses the serial port. The operation of the three pro- grammers is almost identical as far as the user interface is concerned. In this book we will use a USB programmer for all our experiments; this is what I used. The new USB programmer is more convenient to use than the other programmers because it does not need a power supply; it gets its power from the USB port. An important bonus is that it frees up the COM port for use with the computer (the parallel pro- grammer does this also).
BUILDING A PROGRAMMER
There are a number of plans on how to make inexpensive programmers on the internet, but I am not going to recommend any of them because I have not built any of them.
USING THE PROGRAMMERS
The USB programmer does not need a power supply or wall transformer. It gets its power from the USB port. Using a USB port frees up the serial port for your experi- mentation and this is important because most of the new computers have only one serial port. The PC serial port connects to the LAB-X1 serial port for certain uses.
For the serial port and parallel port programmers, first plug the 16-V power cord connector into the programmer and then into the wall socket. The USB programmer needs to be connected but does not need a power supply connection. If you do not have power to the programmer when you start the programming software, the soft- ware will not be able to see the programmer and an error message will be displayed: the software will report that it could not find the programmer.
It is best to start the programmer software from the MicroCode Studio Editor win- dow. If you do it this way the microcontroller being used is selected automatically and the program you are working on in the MicroCode Editor window is transferred auto- matically to the compiler software and onto the MCU on the LAB-X1 board. It can all be set up to be a one-click operation. See Appendix A.
If you are programming an MCU that is not on the LAB-X1, insert the microcon- troller into the programming socket immediately before you begin programming the microcontroller. This applies only if you are programming a loose microcontroller. If you are programming a microcontroller plugged into the LAB-X1, it can be left in the board all the time.
Caution The only exception for the parallel port programmer is that the B7 pin is pulled low by this programmer and will interfere with your program if you are using the B7 pin. If you are going to be using this pin, you must unplug the program- mer between programming sessions.
The sequence to create a program inside a microcontroller is as follows:
1. Write program in the MicroCode Studio Editor environment.
2. Compile the program.
3. Program the device.
4. Use the device.
The last three steps can be combined into one keystroke. See Appendix A.