File information: | |
File name: | an589.pdf [preview wiraz] |
Size: | 111 kB |
Extension: | |
Mfg: | Radio |
Model: | wiraz 🔎 |
Original: | kdb12 🔎 |
Descr: | semiconductor |
Group: | Electronics > Consumer electronics > Audio |
Uploaded: | 11-08-2004 |
User: | markm |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name an589.pdf M Author: AN589 After entering programming mode, RB7 is used to serially enter programming modes and data into the part. A high to low transition on RB6, the clock input, qualifies each bit of the data applied on RB7. Please refer to the PIC16C84 Programming Specification (DS30189) for details on the figures. The serial command-data format is specified in Figure 1.2.1.3 of the Microchip PIC16C84 Programming Specification (DS30189). The first 6 bits form the command field, and the last 16 bits form the data field. Notice that the data field is composed of one zero starting bit, 14 actual data bits, and one zero stop bit. The increment address command, shown in Figure 1.2.1.5 (PIC16C84 Programming Specification, DS30189), is comprised of only the command field. Table 1.2.1.1 (see DS30189) summarizes the available commands and command codes for serial programming mode. Read mode is similar to programming mode with the exception that the data direction of RB7 is reversed after receiving the 6-bit command to allow the requested data to be returned to the programmer. Figure 1.2.1.4 (see DS30189) shows this sequence which starts by shifting the 6-bit command into the part. After the read command is issued, the programmer tri-states its buffer to allow the part to serially shift its internal data back to the programmer. The rising edge of RB6, (the clock input), controls the data flow by sequentially shifting previously programmed or data bits from the part. The programmer qualifies this data on the falling edge of RB6. Notice that 16 clock cycles are necessary to shift out 14 data bits. Accidental in-circuit reprogramming is prevented during normal operation by the MCLR voltage which should never exceed the maximum circuit supply voltage of 6 VDC and the logic levels of port bits RB7 and RB6. After program/verification the MCLR pin is brought low to reset the target microcontroller and then electrically released. The target circuit is then free to activate the MCLR signal. In the event MCLR is not forced by the target circuit, R4 (a 2 k pull-up resistor in the programmer) provides a high logic level on the target microcontroller which enables execution of its program independent of the programmer connection. Provisions should be made to prevent the target circuit from resetting the target microcontroller with MCLR or affecting the RB7 and RB6 pins during the programming process. In most cases this can be done without jumpers. A PC-Based Development Programmer for the PIC16C84 Robert Spur Analog Design Specialist, Inc. INTRODUCTION This application note describes the construction of a low cost serial programmer which uses a PC with a parallel (Centronix printer) port to control a PIC16C84. This programmer has the capability of programming a PIC16C84 microcontroller, and reading back internal data without removing the device from the target circuit. This feature is very useful in applications where changes in program code or program constants are neces |
Date | User | Rating | Comment |