ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Programmer P-DS1821 on the microcontroller Z8. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Microcontrollers To maintain the set temperature in any volume (for example, in a vegetable storage box on a balcony, in an aquarium, in a bathhouse, etc.), many automatic devices have been developed that differ in accuracy characteristics, implementation costs, and ease of use. Today, perhaps the most elegant solution to this problem is the use of a relatively inexpensive digital thermometer-thermostat DS1821 from Dallas Semiconductors. This chip can be used as either a remote digital thermometer or a thermostat master controller with a built-in temperature sensor. It is for choosing the type of operation of DS1821. as well as for setting (changing) settings in the non-volatile memory of the control device when the microcircuit is operating in thermostat mode and the P-DS1821 programmer is used. The programmer consists of a board with controls and a socket for installing a programmable microcircuit, a separate power supply with an output voltage of 5 V ± 5% (at a load current of about 20 mA), a communication cable with a PC serial port and support installed on the latest software package. P-DS1821 can work in two modes: PC exchange and offline programming. In the first case, the device is connected to the PC COM port using a serial interface cable. "Firmware" of data into the programmer's non-volatile memory chip is produced using the pgds1821 control program. It is built on the principle of a multi-window shell and can work in Windows NT and Windows 95/98 operating environments. In offline mode, you can program several DS1821 chips in a row with the same settings previously selected in the exchange with PC mode. In this case, a PC is not needed. The operating modes of the device are set by the controls, which include the "Reset" and "Start" buttons, a jumper, and an LED confirming the successful completion of programming. The basis of the programmer (Fig. 3) is the DD2 Z86E0812PSC microcontroller. Thanks to the control program "wired" into its memory, it provides the process of programming microcircuits, working out the commands coming from the PC. The clock frequency DD2 is set by a circuit consisting of a quartz resonator ZQ1 and capacitors C1, C2 with a capacity of 22 ... 33 pF. The voltage required to power the programmer nodes and work out the programming algorithm is supplied from an external power supply unit with an output voltage of 5 V. Communication between the programmer board and the PC COM port is carried out using the UART serial protocol implemented in software based on the DD2 ports. which freely interfaces with one of the RS232 interface modes. The exchange between these ports and the PC COM port is carried out through buffers, which are used as DDI chip inverters. LED HL1 indicates the programming mode. Saving the values of the thermostat settings when the programmer is powered off is provided by the DS1 non-volatile memory chip. To connect a programmable microcircuit, it is possible to use either a segment of three sections of a standard panel (XS1). or built-in terminal clamp AMP 282836-2 for fixing DS1821 pins with screws. The communication cables with the power supply and the PC COM port are connected to the programmer board by soldering or through standard terminal blocks X1 and X2, respectively. The length of the cable going to the PC should not exceed 3...4 m. The connector for connecting to the PC COM port is a standard 9- or 25-pin (DB-9M or DB-25F). The wires of the communication cable are connected to it in accordance with the table. 4. The control program, located in the EPROM MK DD2, provides for the organization of the work of the serial UART interface and the execution of procedures for setting the settings for the operation of the programmable microcircuit. The software-based UART contains a 16-byte input buffer for asynchronously receiving information from the PC. The command interpreter provides programming, verification and reading information from the internal memory of the serviced device. Codes "firmware" PROM microcontroller DD2 are shown in table. 5. In the exchange mode with a PC, the device is used to “flash” the thermostat settings into the programmer’s memory, program several thermometer-thermostats with different settings and select the type of DS1821 operation (as a digital thermometer or thermostat). It is from this mode that the operation of the device begins. By setting the jumper S1. connect the power source to the programmer and connect the device with a cable to the PC COM port. Then turn on the power of the programmer and PC and run the pgds1821 program. The operation of the programmer in this mode is controlled by pressing the buttons in the shell window of the control program using the mouse (Fig. 4). When the control program is launched, two windows appear on the screen: a large main window and a small status window above it, which allows you to select the PC COM port for exchange with the programmer. The required port (COM1 or COM2) is selected by moving (using the "mouse") the switch to the appropriate position and then pressing the "OK" button (hereinafter, we mean the virtual controls that are present in the program windows). In the future, this window is opened by pressing the "Select Port" button in the main window. Before starting work, pay attention to the color of the "ON LINE" indicator in the upper left corner of the main window. If it is green, communication with the programmer is established, and if it is red, on the contrary, it did not take place (due to a line break, lack of power, incorrect indication of the exchange port). For programming, the microcircuit is installed in the XS1 socket and the "NEW DEVICE" button is pressed. The red color of the "DEV POWER" indicator indicates that the DS1821 is ready for exchange. By pressing the "Read Device Parameters" button, you can read the current parameter values stored in the chip's memory. They appear in the "TH" boxes below the button (upper temperature value of the thermostat in degrees Celsius). "TL" (lower) and "POL" (control signal polarity). Green indicator "OK!" confirms the correctness of the read information. To write new settings to the chip, you must fill in the "TH", "TL" and "POL" boxes located under the "Write Device Parameters" button, and then click it. Using the "Power-up Mode" switch, the microcircuit operation mode is set at the next supply voltage. When it is set to the "Thermostat" position, the DS1821 will turn on and work in thermostat mode, and in the "1-Wire" position - a thermometer with a single-wire interface. After pressing the "Write Device Parameters" button, the corresponding indicator "OK!" lights up green, confirming the successful completion of programming. The operation of the thermometer is checked by pressing the "Temperature Conversion" button: in the window below it, after the "WAIT" indicator goes out, the temperature value read from the microcircuit will appear. Having programmed the next microcircuit, press the "POWER OFF" button, replace the microcircuit with the next one, and then repeat the programming cycle, starting by pressing the "NEW DEVICE" button (see above). To prepare the device for offline operation, it is necessary to write the required parameter values into the device's non-volatile memory chip. This is done by filling in the "TN", "TL", "POL" boxes located below the "Write Programmer Parameters" button and then pressing it. Green indicator "OK!" serves as a signal confirming the successful completion of programming. The current parameters stored in the memory are read in the corresponding windows after pressing the "Read Device Parameters" button. It is possible to quickly transfer information from the "TN" boxes. TL", "POL" under the "Write Device Parameters" button into the appropriate boxes under the "Write Programmer Parameters" button and back using the double arrows located between these buttons. Exit the program by pressing the "QUIT" button. The stand-alone mode of the programmer is convenient when it is required to program several microcircuits with the same values of the parameters to be set. To switch to this mode, disconnect the cord connecting the device to the PC. and remove jumper S1 without disconnecting the +5 V power supply. Then insert the microcircuit to be programmed into the panel intended for it. Programming is carried out by pressing the programmer button SB 1 ("Start") In this case, the HL1 LED should light up for a short time (about 1 s), and then go out, indicating the successful completion of the information recording. If, for some reason, programming fails, the LED will flash. To repeat the operation, press the SB2 ("Reset") button, and then again the SB1 button. Each subsequent microcircuit is programmed by pressing the SB1 button after installing it in the XS1 panel. Authors: A. Olkhovsky, S. Shcheglov, A. Matevosov, K. Chernyavsky, 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: ▪ Each cashier - a lie detector ▪ Robots will be taught to more accurately follow the desired scenario ▪ Named the most powerful volcanic eruption in the last 7 millennia ▪ New Lithographic Process for Growing Semiconductor Crystals ▪ 12W net power wireless power IC News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ site section Digital technology. Article selection ▪ article Modeler's sprayer. Tips for a modeller ▪ article Where did bananas originate? Detailed answer ▪ article Chervil openwork. Legends, cultivation, methods of application ▪ article The magic wand is a faithful watchman. 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 |