Test Schedule Using the simulator, the program function can be tested against the design requirements. The specification for MOT1 has been converted into a test procedure designed to exercise all its functions; we also need to anticipate incorrect input sequences that may cause a problem. It is difficult to anticipate exactly what kinds of logical […]
Continue reading…
Posts by Farahat
Application Design:Hardware Design
Hardware Design The hardware is typically designed before the software, although it may need to be revisited subsequently. It is possible that the initial choice of MCU may need to be changed when the overall design requirements have been finalized. Block Diagram In the block diagram, the system inputs and outputs can be identified, and […]
Continue reading…
Program Debugging:Syntax Errors
Syntax Errors When the program source code for a PIC program has been created in the editor, it must be converted into machine code for downloading to the chip. This is carried out by the assembler program, MPASMWIN.EXE, which analyzes the source code text line by line, converts the instruction mnemonics into a list of […]
Continue reading…
Application Design:Design Specification
In this chapter, we will go through the complete process of application design and development, based on a simple motor drive system, to illustrate the principles outlined in the preceding sections. At each step, basic design techniques will be explained and a suitable implementation developed. Before designing hardware or writing a program, we have to […]
Continue reading…
PIC Development Systems:Test Program
Test Program The test program LPC1 (Program 7.1) exercises the analogue input and LEDs, and is used to explain the testing and downloading processes. Its function is to rotate an LED through the bits of port B, with the speed controlled by the pot. The test program has the following structure: In the processor configuration […]
Continue reading…
PIC Development Systems:Analogue Input
Analogue Input The registers used in setting up and operating the analogue input are listed in Table 7.2. The ANSEL and ANSELH (analogue input select) register bits are configured with 0 for digital and 1 for analogue inputs. Only AN0 is required in this case (ANSEL,0), the others will be set for digital input. The […]
Continue reading…
PIC Development Systems:In-Circuit Debugging
In-Circuit Debugging In-circuit debugging (ICD) is the most powerful fault-finding technique available for microcontrollers. It allows the chip to be programmed and tested in circuit using the standard MPLAB debugging tools to control program execution in the actual target board. This is obviously a major advantage, as it allows the interaction of the PIC chip […]
Continue reading…
PIC Development Systems:In-Circuit Emulation
In-Circuit Emulation An in-circuit emulator (ICE) traditionally allows processor systems to be tested without the microcontroller or microprocessor present. A host computer with a hardware dedicated emulator pod replaces the target processor, with a header connector with the same pin out as the processor connected to its socket on the application board. The emulator then […]
Continue reading…
PIC Development Systems:Other PIC Demo Kits
Other PIC Demo Kits There are several other Microchip demonstration kits that allow the user to investigate a range of devices and techniques and provide convenient hardware platforms for further application development. The features of some of the currently available range are summarized in Table 7.3, and described below. 44/28-Pin Demo Boards The 44-pin demo […]
Continue reading…
PIC Development Systems:Simulation Test
Simulation Test The program can be tested in simulation mode before downloading to the LPC board. Assuming it has been edited and assembled in MPLAB, MPSIM can be invoked and the program run with the SFRs, stopwatch, etc., displayed. However, an analogue input stimulus is not available in MPSIM, so the ADRESH must be loaded […]
Continue reading…