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

Electronic notebook. 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

The new element base makes it possible to create compact and economical devices capable of writing text into their memory using a personal computer and then reading it offline. The article describes a kind of "notebook" in which you can store up to 64 KB of text information.

The schematic diagram of the device is shown in fig. 1. Its basis is the PIC16F84 (DD1) PIC controller. The text is stored in the DS1 chip of a non-volatile Flash memory with a l2C serial interface (see the article by A. Dolgoy "Memory chips with an l2C interface. Features and application" in "Radio", 2001, No. 2, pp. 24-26; No. 3, pp. 25, 26). Through this interface, implemented in software, the microcontroller DD1 reads information from DS1 and transmits it to the liquid crystal (LCD) indicator HG1. Before reading or writing each byte, the address of this cell is transferred to the memory cell of the DS1 chip. This slows things down somewhat, but it prevents the problems associated with different page sizes that can occur when using chips from different manufacturers.

Electronic notebook

In addition to the actual LCD indicator, ITM-1602ATR / R (HG1) incorporates an HD44780 controller that organizes data exchange with the DD1 microcontroller, has a character generator for character output and is responsible for displaying information on the screen. To reduce the number of ports used by the DD1 microcontroller, the exchange with HG1 is carried out via a four-bit interface, in which eight-bit data is transmitted in tetrads in two stages. In this mode of operation, the outputs DB0-DB3 of the indicator are not used.

The "notebook" is controlled using the SB1-SB3 buttons: the first two are used to scroll the text and move the menu cursor, and the third one is to open the menu and confirm the selection of its items. Since all input lines of port B are connected to the power supply through resistors, there is no need for external resistors to "pull up" the RB5-RB7 ports to the power line.

Since the device does not require high accuracy in timing, an RC circuit (R1C3) is used as the frequency-setting elements of the clock generator of the DD1 microcontroller. The generator works only when the microcontroller accesses the memory or the LCD indicator, while waiting for a button to be pressed, it is turned off and the microcontroller is in low power mode.

When the power is turned on, the splash screen appears for a short time on the indicator screen, after which the device enters the menu mode. Now, by moving the cursor with the SB1 ("←"), SB2 ("→") buttons and confirming the command with the SB3 ("*") button, you can switch to the reading mode (item "R"), to the "sleep" mode (item "S "), place the cursor at the beginning of the text (point "H") or at its end (point "E"). In this mode, the screen also displays the current position of the text in hexadecimal form. When reading, the text is "leafed" with the SB1 and SB2 buttons, the return to the menu is carried out with the SB3 button. Trimmer resistor R5 is used to adjust the contrast of the image on the indicator HG1. From the "sleep" mode, the device is displayed by pressing any button.

To exchange information between the "notebook" and the computer, a special program is used, with which you can transfer text both from the computer to the device, and vice versa. The program is a simplified text editor with the ability to load text into a "notebook" and unload from it. To download text to the device, you need to open a text file in ASCII format using the "File-Open" menu, and then, possibly, having made some changes to this text in the editor window, use the "E-Book → Upload" menu to start the download process. You can prepare the text for downloading in any other text editor, and then copy it through the Windows clipboard into the program editor window. Unloading text from the "notebook" is done through the menu "E-Book → Download". After that, the text can be saved to an ASCII file or transferred to another program via the clipboard. Program operation parameters (LPT port number and "notebook" memory capacity) are changed through the "Settings → Parameters" menu.

The exchange is carried out through an adapter cable, the diagram of which is shown in fig. 2. Plug XP1 is connected to the parallel (LPT) port of the computer. On transistors VT1, VT2, the function of an open collector element is implemented, which is required to work with the l2C bus. The SCL and SDA lines are connected to the input lines of the LPT port (pins 13 and 12, respectively) to monitor the status of the first and receive data via the second from the computer.

Electronic notebook

When working with a computer, the l2C bus operates in the "Multi Master" mode. To resolve conflicts, it uses the following algorithm: before any of the master devices is about to exchange with memory, it monitors the signal level on the SCL line for some time. If during this time there was no logic zero level on it, the master device starts an exchange with the memory. Otherwise, it continues to monitor the state of the SCL line. Since such an algorithm is not always able to eliminate conflicts, it is not recommended to press the "notebook" buttons while exchanging information with the computer.

Power is supplied to the DS1 chip and the HG1 indicator through the RB4 port of the DD1 microcontroller. This allows you to put the device into "sleep" mode programmatically. In this case, power is supplied only to the microcontroller, which also goes into "sleep" mode (the clock generator is turned off), and the current consumed by the device is reduced to a value not exceeding ten microamperes. Returning to the reading mode, as noted, is done by pressing any button on the device. In this case, the controller exits the "sleep" mode, supplies power to the memory chip and the indicator, and performs the initialization procedure for the latter. After that, you can continue to read the "book" from the position that was current at the time the device was put into "sleep" mode.

Most parts of the device are mounted on a printed circuit board, made in accordance with Fig. 3.

Electronic notebook

The device can use the PIC16F84 or PIC16F84A microcontroller in any version. DS1 - any chip with an l2C interface from the AT24C01-AT24C512 series (memory capacity from 128 bytes to 64 KB) from ATMEL or other manufacturers. At the same time, for each microcircuit, they use their own version of the controller firmware. In principle, it is possible to use from one to eight memory chips, setting a unique address for each, depending on their type, using the address inputs AO-A3, but this will require adjustment of the controller program.

The program codes for the AT24C512 chip are shown in the table.

Electronic notebook
(click to enlarge)

LCD indicator HG1 - two-line (16 characters per line) by Intech with Russian character generator. You can use other one- and two-line indicators of this company or similar ones from other companies whose controller is compatible with the HD44780. In this case, in the microcontroller program, you need to adjust the values ​​of the width and height variables. If indicators with a large number of lines are used, a more serious modification of the program will be required.

Indicators with the HT44780 controller are available with various character generators. If it is not possible to purchase an indicator with a Russian character generator, when entering text, it is permissible to replace Russian letters with similar ones in Latin or use transliteration (write Russian words in Latin letters). This feature is included in the program. When text is transferred to the "notebook", the characters are automatically replaced with the ones specified by the user. The character replacement table can be changed through the menu "Settings → Options" of the program.

When programming the DD1 microcontroller, you need to set the following bit values ​​in the configuration word: generator type (OSC) - RC, watchdog timer (WDT) - disabled, delay after power-up (PWRTE) - enabled.

To power the device, a voltage of 4 ... 5 V is required (three galvanic cells of size AAA or four disk batteries D-0,1). Operation is maintained when the battery voltage drops to 3 V, however, reading information from the LCD indicator in this case is difficult.

As an XS1 socket (see Fig. 1), the device uses a connector from stereo headphones used in imported equipment. Plug XP1 (see fig. 2) - computer DB-25M. Transistors VT1, VT2 (any silicon low-power npn structures) and resistors R1, R2 are hinged mounted inside the XP1 plug. The length of the connecting cable is no more than 2 m.

Project files: source texts and codes for the "firmware" of the PIC-controller ROM for the 2x16 indicator and various memory chips from the indicated series, as well as a program for working with the "notebook".

Author: S.Kuleshov

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

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

The threat of space debris to the Earth's magnetic field 01.05.2024

More and more often we hear about an increase in the amount of space debris surrounding our planet. However, it is not only active satellites and spacecraft that contribute to this problem, but also debris from old missions. The growing number of satellites launched by companies like SpaceX creates not only opportunities for the development of the Internet, but also serious threats to space security. Experts are now turning their attention to the potential implications for the Earth's magnetic field. Dr. Jonathan McDowell of the Harvard-Smithsonian Center for Astrophysics emphasizes that companies are rapidly deploying satellite constellations, and the number of satellites could grow to 100 in the next decade. The rapid development of these cosmic armadas of satellites can lead to contamination of the Earth's plasma environment with dangerous debris and a threat to the stability of the magnetosphere. Metal debris from used rockets can disrupt the ionosphere and magnetosphere. Both of these systems play a key role in protecting the atmosphere and maintaining ... >>

Solidification of bulk substances 30.04.2024

There are quite a few mysteries in the world of science, and one of them is the strange behavior of bulk materials. They may behave like a solid but suddenly turn into a flowing liquid. This phenomenon has attracted the attention of many researchers, and we may finally be getting closer to solving this mystery. Imagine sand in an hourglass. It usually flows freely, but in some cases its particles begin to get stuck, turning from a liquid to a solid. This transition has important implications for many areas, from drug production to construction. Researchers from the USA have attempted to describe this phenomenon and come closer to understanding it. In the study, the scientists conducted simulations in the laboratory using data from bags of polystyrene beads. They found that the vibrations within these sets had specific frequencies, meaning that only certain types of vibrations could travel through the material. Received ... >>

Random news from the Archive

Keychron Lemokey L3 Premium Keyboard 11.08.2023

Under the famous Lemokey sub-brand, Keychron has introduced a new premium gaming keyboard model - L3. An evolution of the Keychron Q3 Pro, this product offers unique customization options and great performance.

The Lemokey L3 keyboard represents the pinnacle of engineering and design excellence. Its body is made of high quality metal, providing strength and durability. Connectivity abounds here - Bluetooth 5.1 for communicating with up to three devices at the same time and a USB transmitter with a 1000Hz polling rate for ultra-fast response. Charging is via a convenient USB-C connector.

The uniqueness of the keyboard is emphasized by PBT keycaps made using the double application technology. Four programmable buttons and a volume control provide comfort and ease of use. Customizable RGB lighting lets you create the atmosphere you want. And a powerful 4000 mAh battery guarantees up to 200 hours of battery life without backlight (according to the 2,4 GHz protocol).

Lemokey L3 is available in three elegant color options: jet black, deep blue and space silver. A feature of this model is the choice of three types of switches: Gateron Red, Brown and Banana. Red, brown and yellow line switches have tactile actuation for a variety of typing experiences.

The Lemokey L3 keyboard project on Kickstarter has already raised over $60, surpassing the $000 mark. Everyone can purchase a novelty in different versions - from the base board and case (without switches and keycaps) to the complete set. The official Kickstarter price is $50 and $000 respectively.

Other interesting news:

▪ molecular switch

▪ Pedals in front make the bike more comfortable

▪ Our mirror neurons are dependent on money.

▪ Wireless microwave charging

▪ Comet's hot past

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Electrical safety, fire safety. Article selection

▪ Metropolitan article. History of invention and production

▪ article What is osmosis? Detailed answer

▪ article Loading, transportation, unloading and storage of caustic and toxic substances and materials. Standard instruction on labor protection

▪ article Television antenna for a cell phone. Encyclopedia of radio electronics and electrical engineering

▪ article Selection of conductors for heating, economic current density and corona conditions. The choice of sections of conductors for heating. Encyclopedia of radio electronics and electrical engineering

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