Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Programmer P-DS1821 on the microcontroller Z8. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

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.

Programmer P-DS1821 on the microcontroller Z8
(click to enlarge)

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.

Programmer P-DS1821 on the microcontroller Z8

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.

Programmer P-DS1821 on the microcontroller Z8
(click to enlarge)

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).

Programmer P-DS1821 on the microcontroller Z8

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.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Men are more obese than women 22.04.2023

Scientists at the Federico II University of Naples (Italy) analyzed 43 studies of food preferences depending on gender and age. All of them were carried out in the last ten years.

It turned out that women eat more carbohydrates, fruits and vegetables and less fat than men who are prone to meat and salty foods.

“It appears that estrogens act on the nuclei of the hypothalamus, which control the centers of hunger and satiety. This stimulates appetite and makes women crave carbohydrate-rich foods. In men, testosterone activates a different system, namely dopamine, a neurotransmitter in the brain. It causes a feeling of strength and anger. This explains the craving for meat and salty foods, the consumption of which is associated with obesity," explained Annamaria Colao, president of the Italian Society of Endocrinology (SIE), according to the ANSA news agency.

The study was presented at the first National Congress on Gender Endocrinology.

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 Scheme of the electrical equipment of the car VAZ-2106, 21061 and 21063 (1976-1987). Encyclopedia of radio electronics and electrical engineering

▪ article The magic wand is a faithful watchman. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024