Summary of My own AVR ISP programmer using PIC16f877a and python!
Summary: I built a DIY AVR ISP programmer using a PIC16F877A microcontroller and Python. The Python script parses Intel HEX files, converts them to ASCII, and sends lines to the PIC. The PIC implements ISP commands and programs AVRs (tested on ATmega8, ATmega16, ATmega32) over SPI. The project is primarily educational and may contain bugs; it is not intended as a production-grade tool.
Parts used in the AVR ISP programmer project:
- PIC16F877A microcontroller
- Target AVR microcontrollers (ATmega8, ATmega16, ATmega32)
- PC running Python
- USB or serial connection between PC and PIC (for data transfer)
- SPI connection wiring between PIC and AVR for ISP
- Power supply for microcontrollers
- Intel HEX firmware files (input to the Python script)
Introduction:
(don’t skip to read the note below)
I recently purchased few AVR microcontrollers. I don’t know much about AVR since I am using it for first time. Any way, I have some experience on working with PIC and MSP430. To program AVR using USB, I came to know that USBASP is the best and cheap choice. But any way, I thought of making my own ISP programmer (both PC software and burning hardware) for AVR using my fav PIC (PIC16f877A) microcontroller just for getting familiarised with the process of loading the binary into the AVR flash.
From PC side, coding is done on python. In short words, the python script reads the hex file (intel hex format) and make some ascii conversion on it and then send it to the PIC16F877A line by line. Now by using some commands for isp programming, the PIC communicate with AVR and transfer the data to it via SPI. I have tested my programmer on atmega8, atmega16 and atmega32.
Note:
I did this just for learning some thing about the burning process, please don’t consider this seriously because this may have many bugs , I don’t know and I didn’t tested much. Also I am not interested to continue this because it will be time wasting as there are already many cheap and efficient avr programmers available now. So please don’t complain about bugs and don’t use this for any important purpose. For more Detail: My own AVR ISP programmer using PIC16f877a and python!
- What is the purpose of this project?
To create a DIY AVR ISP programmer using a PIC16F877A and Python for learning how to load binaries into AVR flash. - Which PC language is used to drive the programmer?
Python is used on the PC side to read Intel HEX files and send data to the PIC. - What file format does the Python script read?
The Python script reads Intel HEX format files. - How does the PIC communicate with the AVR to program it?
The PIC uses SPI and ISP programming commands to transfer data to the AVR. - Which AVR devices were tested with this programmer?
The programmer was tested on ATmega8, ATmega16, and ATmega32. - Is this programmer intended for production use?
No, it was created for learning and may contain bugs; it is not intended for important or production use. - Why was this project made instead of using existing programmers?
It was made for familiarity with the burning process and personal learning, despite existing cheap and efficient AVR programmers. - Does the author intend to continue development of this project?
No, the author is not interested in continuing the project because existing solutions are available and further work is seen as time wasting.

