Limitations of Software Simulation The simulator allows the program logic to be tested before running the program in the actual hardware, to ensure that it is functionally correct. However, the simulation is cannot be 100% realistic, and its limitations need to be taken into account in testing the real system. The following is given as […]
Continue reading…
Uncategorized
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: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…
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:Hardware Test
Hardware Test When simulating correctly, the program can be downloaded. The PICkit programmer is plugged into a USB port and Programmer, Select Programmer, PICkit2 from the menus. Successful connection to the programmer should be confirmed in the output window. Sometimes an updated version of the programmer operating system needs to be downloaded. A programming toolbar […]
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…
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: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: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: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…