In-Circuit Debugging Mid-range PIC chips are now generally being designed to support in-circuit debugging (ICD), where, after programming, the firmware can be executed within the final target hardware under control of the MPLAB IDE via the programming interface. This allows the application to be more fully tested using the same debugging tools available in MPSIM […]
Continue reading…
Uncategorized
More PIC Microcontrollers:Protection Devices,Interrupts,Hardware Timers and In-Circuit Programming
Protection Devices Internal timers are used to ensure a reliable start-up on power-up, after a reset or a short-term dip in the supply voltage. In the 16F690, the power-up timer provides a nominal delay of 64 ms to allow the power supplies to stabilize before the program execution begins. The watchdog timer allows the chip […]
Continue reading…
More PIC Microcontrollers:Harvard Architecture and RISC Instruction Set
Harvard Architecture In conventional processor systems, the instruction codes and associated operands have to be transferred from memory using the same address and data bus as the system data, that is, the data read in via inputs or generated by the processor. The PIC architecture has separate paths for the instructions and the system data. […]
Continue reading…
More PIC Microcontrollers:EEPROM Data Memory and ALU and Working Registers
EEPROM Data Memory This is useful in applications where data read in at the ports or produced by the processor needs to be stored in non-volatile memory. For example, in a keypad-operated electronic lock, the lock code is entered by the user and then retained to be checked against user keypad input to release the […]
Continue reading…
PIC Motor Applications:Motor Control Modules
Motor Control Modules Some examples of more complete designs for position controllers are described below. Serial Input Position Controller A position controller with serial input is described in Microchip® application note AN532 (Figure 11.8a). Although based on a now obsolete MCU, it represents a commercially viable design which could be updated for applications such as […]
Continue reading…
More PIC Microcontrollers:Common Features
Common Features All PIC microcontrollers use the same basic architecture (Chapter 5) and instruction set (Chapter 4), to provide a design progression path from simple programs to the most complex applications. The architectural features may be compared by studying the block diagram for each device found in its data sheet. The shared features of the […]
Continue reading…
PIC Motor Applications:Hardware Testing
Hardware Testing A hardware implementation can be tested using a dual-beam scope as indicated above. The correct function of the closed loop control process can be tested by setting the binary input to B‘10100000’ and checking the actual speed of the motor by measuring the period of the sensor pulse, which should be 100 ms. […]
Continue reading…
PIC Motor Applications:Program Simulation
Program Simulation The speed control application was tested in simulation mode (Figure 11.7). The forward drive, index sensor feedback and current monitoring signals can be seen on the virtual oscilloscope. The drive is operating at about 100 Hz and the feedback has a period of 100 ms, indicating a speed of 600 rpm (switch input […]
Continue reading…
PIC Motor Applications:Counting Pulses
Counting Pulses The accuracy of the speed measurement using this method will depend on the number of slots counted, because the error is always ± 1 slot. If the rev count were made over a period of 1 s at 10 pps, the precision would be 10% and the speed could only be corrected once […]
Continue reading…
PIC Motor Applications:Closed Loop Speed Control
Closed Loop Speed Control In this example, the motor board is to operate as a slave speed-controlled unit. A master controller supplies an 8-bit code to set the speed of the motor, with the local controller required to maintain it with a specified degree of precision. The MOT2 board allows for a test input at […]
Continue reading…