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

How to make a simple programmer for PICs and AVRs. 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

Free programmers that can be found on the Internet are hopelessly behind chip developers and do not offer quick upgrades for programming new microcontrollers.

In this case, an attempt was made to develop a software shell within which it would be easy to increase the possibilities for programming various chips, at least for predefined families.

The programmer is characterized by:

  • Tested under Windows 98, Windows Me, Windows 2000 with Celeron, AMD Duron, AMD Athlon T, Pentium III processors up to 1000 MHz
  • Programming is carried out through the RS232 port
  • The program does not require installation and additional drivers
  • Programs microcontrollers of the PIC family (debugging was carried out on PIC16F84 and PIC16F877) using a serial protocol and microcontrollers of the AVR family (debugging was carried out on AT90S8535)
  • Provides the ability to independently add new chips from the specified families with an identical programming protocol using configuration files
  • Allows you to arbitrarily change the structure and content of the menu of programmable chips and information fields associated with the programmable chip
  • Allows you to upload and edit binary and HEX files, perform block operations with data, calculate CRC using several algorithms
  • Allows individual programming of various areas of the chip (program memory, data memory, option bits, security bits)

How to make a simple programmer for PICs and AVRs. Shell window
Rice. 1. PIC programming window

How to make a simple programmer for PICs and AVRs. Schematic diagram of the PIC programmer
Rice. 2. Diagram of the PIC programmer

It does not differ in particular originality, since it basically repeats the scheme from the well-known programmer PonyProg. Attention should be paid to the signal level at the CLOCK pin of the chip, it should not be less than 4 V at a high level, which can happen if the zener diode is selected incorrectly.

AVR Programming

How to make a simple programmer for PICs and AVRs. AVR Programming Scheme
Rice. 2. AVR programming scheme

Here is a way how to program the AT90S8535 directly on the board using RS232 and a small hardware add-on. Chip DD1 serves to isolate the programming signals from the chip in the operating mode. The wiring of the microcircuit is shown in the block with the arrangement of contacts of the PGA44 type. Tests have shown that most of the AT90S8535 and AT90S8515 chips can be programmed at 11,0592MHz crystal.

Structure of configuration files

The configuration files have the chp extension and must be located in the program directory. When launched, the program searches its directory for all configuration files and merges them in the internal buffer. The idea of ​​such files is taken from the ComPic programmer and slightly modified. Each chip has its own section. The possibility of inheriting properties is not provided, as this worsens the transparency of the description.

Example configuration file structure for PIC16F84

[Chip PIC16F84_ICP] Chip section with unique chip name
Level1=MicroChip Name of top-level menu item
Level2=PIC Menu item name of the 2nd nesting level
ItemCaption=PIC16F84 Name of the final menu item
InitClass=TfrmMICROCHIP_PIC_ICP The name of the frame window class that programs this family of chips
according to a specific protocol
Class names are predefined in the program: TfrmMICROCHIP_PIC_ICP and TfrmATMEL_AVR_ICP
Here comes the definition of programmable areas, in paragraphs Content different parameters are separated by the symbol "|"
Area_1_Content=Code | 0..3FFh (1KW) Name and description of the programming area
Area_1_data=CODE, 0, $3FF, 14 Data associated with the programming area - unique identifier, start address, end address, data word size in bits
Area_2_Content=EEPROM | 0..3Fh (64B)
Area_2_Data=EEPROM,0,$3F,8
Area_3_Content=Configuration word | CP, PWRTE, WDTE, FOSC
Area_3_Data=CONFIG,$2007,$2007,14
Area_4_Content=ID Locations | 2000H-2003H
Area_4_Data=ID,$2000,$2003,8
etc. for other areas
Here comes the definition of settings for some of the programming areas defined above.
Param_1_Content=CP | CP | CONFIG Definition of an installation named CP, with a unique CP identifier from the CONFIG area. By default, the setting takes the value with the number 1 in the identifier suffix
  Description of possible setting values
Param_1_Choice1=1 - Code protection OFF Name of the 1st CP setting value
Param_1_Choice1_icon=4 Number in the internal list of the displayed icon for the 1st value
Param_1_Choice1_data=1111111111xxxx 1st value mask
Param_1_Choice2=0 - Code protection ON
Param_1_Choice2_icon=3
Param_1_Choice2_data=0000000000xxxx
Description of the 2nd setting value
Param_2_Content=PWRTE | P.W.R.T.E. | CONFIG
Param_2_Choice1=1 - Power up timer disabled
Param_2_Choice1_icon=2
Param_2_Choice1_data=xxxxxxxxxx1xxx
Param_2_Choice2=0 - Power up timer enabled
Param_2_Choice2_icon=1
Param_2_Choice2_data=xxxxxxxxxx0xxx
Description of the following setting and its meanings
Param_3_Content=WDTE | WDTE | CONFIG
Param_3_Choice1=1 - WDT enabled
Param_3_Choice1_icon=1
Param_3_Choice1_data=xxxxxxxxxxxx1xx
Param_3_Choice2=0 - WDT disabled
Param_3_Choice2_icon=2
Param_3_Choice2_data=xxxxxxxxxxxx0xx Param_4_Content=Oscilator | FOSC | CONFIG
Param_4_Choice1=RC oscillator (11)
Param_4_Choice1_icon=8
Param_4_Choice1_data=xxxxxxxxxxxx11
Param_4_Choice2=HS oscillator (10)
Param_4_Choice2_icon=8
Param_4_Choice2_data=xxxxxxxxxxxx10
Param_4_Choice3=XT oscillator (01)
Param_4_Choice3_icon=8
Param_4_Choice3_data=xxxxxxxxxxxx01
Param_4_Choice4=LP oscillator (00)
Param_4_Choice4_icon=8
Param_4_Choice4_data=xxxxxxxxxxxx00Param_5_Content=ID | ID | ID
Param_5_Choice1=0000
etc. for all required installations

Author: Alexander Eliseev, ase@takas.lt; Publication: cxem.net

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

50-megapixel Samsung ISOCELL GN1 sensor 24.05.2020

The family of Samsung ISOCELL photosensors for smartphone cameras has been replenished with another novelty - a model called ISOCELL GN1 with an optical format of 1/1,31". , which supports both Dual Pixel and Tetracell technologies.

With a relatively larger sensor cell size, the Samsung ISOCELL GN1 is said to take mobile cameras to the next level, combining higher light sensitivity for low-light shots with fast DSLR-level autofocus for action scenes.

1,2 µm is the cell size used in traditional smartphone camera sensors, while over the past year the market has seen a clear trend towards a rapid increase in resolution and a reduction in the physical size of individual cells.

Samsung ISOCELL GN1 appears to be a direct competitor to the new Sony IMX689 sensor (Oppo Find X2 Pro), which is characterized by a resolution of 48 megapixels and a cell size of 1,22 microns. By default, the Samsung sensor will capture 12,5 megapixel photos by combining the signal of four neighboring pixels (Tetracell technology).

Dual Pixel is another prominent feature of the new sensor. The latest flagship Galaxy S20 Ultra with a 108MP camera without Dual Pixel is known to have had focusing problems - after complaints from journalists and users, the company released several firmware updates to improve camera performance. According to Samsung, the new ISOCELL GN1 sensor has the fastest phase detection autofocus system on the market.

Dual Pixel technology places two photodiodes next to each other in a single pixel that can receive light from different angles to determine the phase. Thanks to this, the sensor is able to instantly detect and focus on the desired stationary or moving object from any angle, even in low light conditions. Samsung also provides a software algorithm that receives light information from each photodiode to produce high-resolution images comparable to 100MP.

Samsung ISOCELL GN1 also supports Smart-ISO technology to automatically select the "correct" ISO value depending on the environment, electronic stabilization and supports video recording up to 8K at 30 frames per second.

Other interesting news:

▪ Android smartphone becomes a listening device

▪ The main component of interstellar ionized gas has been obtained

▪ 7nm Ryzen Pro 4000 processors for business laptops

▪ Mobile phone with a folding QWERTY keyboard

▪ Curved OLED TV from Samsung

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Children's scientific laboratory. Article selection

▪ article by Erasmus of Rotterdam. Famous aphorisms

▪ article Which work of Stephen King causes readers to doubt its authorship? Detailed answer

▪ Dicenter article. Legends, cultivation, methods of application

▪ article RS-232C interface. Encyclopedia of radio electronics and electrical engineering

▪ article Protection of the telephone set. 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