Program Design There are international standards for specifying engineering designs, which should be applied in commercial work. The design standards for different types of products will vary; for instance, a military application will typically be designed to a higher standard of reliability and more rigorously tested and documented than a commercial one. Our designs here […]
Continue reading…
Uncategorized
PIC Program Development:Program Development
Program Development The primary development system toolset for PIC applications is Microchip MPLAB IDE (integrated development environment). At the time of writing, MPLAB version 8.60 is the most recently released version. The basic principles of use do not change greatly as it is updated, rather extra facilities and support for an ever-expanding range of devices […]
Continue reading…
A Simple PIC Application:Assembly Language
Assembly Language It should be apparent that writing the machine code manually for any but the most trivial applications is going to be a bit tedious. Not only do the actual hex instruction codes have to be worked out, but so do jump destination addresses and so on. In addition, the codes are not easy […]
Continue reading…
A Simple PIC Application:Program BIN1 and Program Analysis
Program BIN1 The simple program called BIN1 is shown as Program 3.1. It consists of a list of 14-bit binary machine code instructions, represented as four-digit hex numbers (see Chapter 2). Bits 14 and 15 are assumed to be zero, so the codes are represented by hex numbers in the range 0000 to 3FFF. The […]
Continue reading…
A Simple PIC Application:Program Execution
Program Execution Microcontroller circuits will not function without a program in the chip; this is created using the PIC development system software on a PC, and downloaded via a serial data link. This process has already been outlined, and will be described in more detail later, so for now we will assume that the program […]
Continue reading…
A Simple PIC Application:BIN Circuit Operation
BIN Circuit Operation Active low switch circuits, consisting of normally open push buttons and pull-up resistors, are connected to the control inputs; the resistors ensure that the inputs are high when the buttons are not pressed. The outputs are connected to LEDs in series with current-limiting resistors. The PIC outputs are capable of supplying enough […]
Continue reading…
A Simple PIC Application:BIN Hardware Block Diagram
BIN Hardware Block Diagram The hardware arrangement can be represented in simplified form as a block diagram (Figure 3.2). This is not really necessary for such a trivial circuit, but is a useful system design technique for more complex applications. The main parts of the hardware and relevant inputs and outputs should be identified, together […]
Continue reading…
A Simple PIC Application:Hardware Design and PIC 16F84A Pin-Out
Hardware Design We need a microcontroller that will provide two inputs and eight outputs, which will drive the light-emitting diodes (LEDs) without additional interfacing, and has reprogrammable flash memory to allow the program to be developed in stages. An accurate clock is not required, so a crystal oscillator is not necessary. The PIC 16F84A meets […]
Continue reading…
Microcontroller Operation:Conditional Jump
Conditional Jump The conditional jump instruction is required for making decisions in the program. Instructions to change the program sequence depending on, for instance, the result of a calculation or a test on an input, are an essential feature of any microprocessor instruction set. In Figure 2.3, the code 1885 tests an input bit of […]
Continue reading…
Microcontroller Operation:Program Control
Program Control As we have already seen, the microcontroller program is a list of binary codes in the program memory, which are executed in sequence. The sequence is controlled by the program counter, (PC). Most of the time, PC is simply incremented by one to proceed to the next instruction. However, if a program jump […]
Continue reading…