I bought an attiny13 microcontroller for one project and ordered a programmer. The programmer will be delivered by mail in another month and I decided to assemble a programmer based on the LPT port of the computer.
This microcontroller has 64 bytes of RAM. The number of erase-write cycles is at least 100,000, flash memory for programs is 1 KB. It has one 8-bit timer-counter with two PWM channels. 4-channel 10-bit ADC, watchdog timer with built-in generator, analog comparator, internal generator, six input-output lines. Operating voltage 4.5-5.5 V (20 MHz)
For the simplest programmer, you need an LPT port plug. Solder the wires to this plug as shown in the picture, in accordance with the pinout of the microcontroller
The plug has pin numbers. Connect pin 1-reset of the microcontroller to pin 9 of the plug. Pin 5 mosi to 10, pin 6 miso to 10, pin 7 of the sck microcontroller to pin 6 of the plug. A computer with an old motherboard, with an LPT port. When connecting the programmer to the computer, the voltage is turned off. First, turn on the computer and only after turning on and before flashing, supply power to the programmer. After flashing, turn off the power of the programmer, turn off the computer and pull out the plug from the LPT port
For firmware you need a program that will "download" the code into the microcontroller. The program is called PonyProg, it is distributed free of charge, download from the official website, version v2.08d BETA. In this version there is in the settings attiny13
After downloading and installing the ponyprog program, apply power to the programmer. In the settings - setup - interface setup - select parallel - and the LPT port number - press OK
Select microcontroller device-Attiny13
Now that the settings are complete, you need to check whether the program sees the microcontroller. Click on the Reading icon and the program will read the microcontroller
If everything is normal, a window will appear that reading is normal and the size of the memory being written, for Attini 13 it showed 1088 BytesIf the MK is flashed and there is information in it, it can be erased Erase
When the microcontroller is checked, you can now write and flash the microcontroller. Click Open device file and select the file with the program
When you have selected a file, click on the lock and the fuses will be marked with a check mark. Click OK
To write code to the microcontroller, select Write Device
A question will appear: what do you want to record? Click yes
After successful flashing, the window write successful will appear
That's it. The microcontroller is recorded, now you can use it in your project. Dozens of different devices can be implemented on this controller.
No comments:
Post a Comment