ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Programmer MK ATMEL series AT89. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Microcontrollers Atmel microcontrollers (MC) have long been known and widely used by radio amateurs around the world. AT89 series MCUs have a complete set of commands (CISC) and are fully compatible with Intel 8051 MCUs. The article describes the programmer for the most widely used AT89C51, AT89C52, AT89C55 MCUs and their low-voltage versions AT89LV51, AT89LV52, AT89LV55. The parameters of these microcontrollers are given in the reference material "Microcontrollers of popular families", published in "Radio", 2000, No. 7, p. 53. Unlike the programmers described in [1, 2], the proposed one does not require the presence of another already programmed microcontroller for its operation. It consists of hardware and a control program for an IBM-compatible computer. The hardware part (hereinafter referred to as the programmer) is connected to the LPT port, which must be switched (in the Integrated peripherals menu in the computer BIOS) to the EPP mode (Enhanced Parallel Port - advanced parallel port). In this mode, the computer's LPT port becomes bidirectional (see [3] for more details). Schematic diagram of the programmer is shown in fig. 1. Chip DD1 (programmable parallel interface KR580BB55) distributes the bytes of information coming from the LPT port to the data bus, address bus and generates control signals. On channel A, the lower and higher parts of the address are transmitted sequentially, on channel B - data, and in the program writing mode this channel works for output, and in read mode - for input. Channel C is used to control the operating modes of the registers DD2, DD3, the voltage regulator DA1 and the programmable MK installed in the XS1 socket. The DD1 chip is controlled by the signals received at its inputs A0, A1, RD and WR. The operating modes of the DD1 chip are shown in Table. 1. Chips DD2 and DD3 are designed to store the low and high parts of the address of the programmable MK. Information is recorded using signals CO and C1 DD1. The adjustable voltage regulator DA1 is used to create a programmable MK voltage of 5 or 12 V at the EA / UPP output. The voltage values \u4b\u6bare determined by resistors R2-R1. At a low level of the signal C12 DD1, the voltage at the output of the stabilizer is 4 V, at a high level, when the transistor VT6 is open and the resistor R5 is connected in parallel with RXNUMX, it is XNUMX V. To program the MK, the DD1 chip is switched to the mode in which its channels A, B and C work for output. For this, the control word 1p is written in DD80 (see Table 2). With the help of signals C4-C7 DD1, the programmable MK is set to the recording mode (see Table 3) and the initial values of C0-C3 are set (C0 = C1 = C2 = C3 = 1). Then, the lower part of the MK address is output to channel A and written to DD2 using the signal C0 (setting C0 \u0d 3), and after that, the upper part of the address and written to DD1 by the signal C0 \u2d 12. Next, data is output to channel B, and they arrive at the corresponding inputs of the programmable MK. A low level is applied to C3, which causes a voltage of +2 V to appear at the EA / Upp MK input. Then the record is confirmed by changing the level from high to low at the C4 output and, accordingly, at the ALE / PROG MK input (Fig. 2; the values of the time parameters are indicated in Table 3). The data recording cycle is completed. Now the signals CXNUMX and CXNUMX can be reset and move on to the next address and data byte. All these operations are repeated until all the data from the original "firmware" file is written. It should be noted that the "firmware" file must be presented in the simplest binary format (.bin extension). To convert a file from Intel hex format to binary, use the hex2bin.exe utility. In read mode, the LPT port is switched to bidirectional mode, the DD1 chip is set to 82h mode (Table 2), channels A, C - to the output, channel B - to the input. Similarly to the write mode, the lower and upper parts of the address are output to DD2 and DD3, respectively, then the MK reading mode is set (Table 3). Output C2 DD1 in read mode is always in the log state. 1. After setting the addresses, the ALE / PROG input of the MK is driven low (C3 = 0), and the MK outputs the data that is located at the set address. Then information is read from channel B DD1 and the received data is written to a file, the name of which is entered at the beginning of the reading procedure of the MK program. The file will have a .bin extension and will be a complete copy of the MK's program memory. In the content check mode, the MK memory is read and compared byte-by-byte with the specified file. If differences are found, the address of mismatched values and two bytes are displayed on the monitor screen: one is from the MK memory, the other is from the file. In the erasing mode MK on the lines C4-C7 DD1 set the values in accordance with the table. 3. The EA/VPP input is then driven to 12V (C2 = 0) and the C3 (ALE/PROG) output is driven low for 10ms. After erasing, the contents of the memory are monitored. If it was successful, the entire program memory will be filled with FFh values, but if any cell has a different content, a message containing its address and value is displayed on the monitor screen. To read the identification codes, the DD1 chip is switched to the mode in which channel B works for input (similar to the read mode), the C4-C7 buses are transferred to the log state. 0 (according to Table 3), and addresses 30p, 31h, 32h are alternately output to the address bus. As a result, the corresponding bytes appear on the monitor screen, by which the type of MK is determined (Table 5). In addition, the software allows you to automatically determine the type of MK, and if this is not possible, its type can be entered manually. PC program and its Turbo Pascal source code Literature
Author: A. Golubkov, Moscow See other articles Section Microcontrollers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ Don't scratch your dog's belly ▪ New unit of measure - kettabyte ▪ Attoclocks capable of measuring the time parameters of the movement of electrons News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Radioelectronics and electrical engineering. Article selection ▪ article In shoes and a dressing gown. Popular expression ▪ article What animals are more common on state symbols? Detailed answer ▪ article Falcata Japanese. Legends, cultivation, methods of application ▪ article A man passes through glass. Focus secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |