-
AVR programmer is working!
02/10/2026 at 09:07 • 0 commentsSeparate tabs for flash dump, eeprom dump and fuse bits. ISP interface speed set in kHz availability. Programmator auto detect function, if programmator not found, just re run the app.
As I mentioned, my refactored app made it easier to add new IC's to the interface. It is based on three basic classes and four secondary plus widgets. Every IC overloads for itself classes:
- icWorker class - contains read/write/verify (rwv) functions, running in separate thread. This is for the interface continues working while programmator is wrting.
- icFlasher class - this opject in my app is IC itself. This launches rwv functions from icWorker class in separate thread, while itself is remains in the main thread. Qt Qthread and signal-slots mechanic is used or this.
- gazelleIcWidget - every IC have it own fulfillment of main application screen. While the toolBar with read/write/open file buttons and status bar are common for all IC's.
To not dump all the code into a common heap, some functions are in addictive classes:
- usbFunction - leads the all connectivity with USB programmator to call() and return() functions. Using them (usb function call and return) you can run any function on your usb device from your PC app.
- gazelleUsbCom - finds and connects to the USB programmator. For this it uses the password phrase check. Also disconnects in destructor. So, this is usb com port handler class.
- gaselleErrorsMsg - read write success and fail messages. For programmator status messages are very important. Because you do not know what happens after pushing write button. Every rwv function returns the error code or 0 if success. In order to not chek the error code and not to write the success message in every rvw function, the errorMsg functions do it instead. The name of operation is class function name, the error is parameter, returns string with success or fail message.
- gazelleInterfaceSpeed - fills the QComboBox interface speed choosing list.
Also there is a dumpViewer widget, which views the binary file in hex format.
As for Atmel AVR there was some additional classes. They are:
- atmelList - class with all information for every atmega. There are signature bytes, flash/eeprom page and total sizes, also names of every fuse bit. As for fuse bits, they are the same on all AVR's, but the bit locations are differs. So, I add an constant (static constexpr) strings for every fuse bit name, and set the pointers to this bit names for every atmega fuse byte bit. While the class returns not the pointer list, the string list instead.
- avrFuse - the widget with avr fuse bit. Have a separate checkbox for every bit and field for setting byte from the keyboard. The invertive nature of the fuse bits is taken into account. A byte is in the same format as it is in the microcontroller, while checkoxes (separate bits) are inverted (1 is unset, 0 is set).
-
Creation workflow
01/29/2026 at 13:36 • 0 commentsAt first i written a programmator for two flash IC's in order to switch off cartridge control function on the printer. As a way for connecting device with PC I choose the virtual COM port through USB instead of just libusb. Because we do not need a driver installation even on windows in this case. At the same time, there is no so much difference between transmitting data throught the USB bulk endpoint in USB-COM abstracion and without it. Another advantage of the first attempt was HEX viewer, which was able to open large files.
Later I learned an ARM SWD interface and ADI debug module by ARM official pdf's for a long time. At the end I was able to access to the registers of my STM32. And I was so much glad to write the flash page and read signature register through my register access functions. And i dropped the project at this point.
Then I was need a key in order to get home. In the case of key, there was a datasheet for original key, which helped to write key reader. But for writing still there isn't any documentation. Because keys for Russian home entrance doors made by Chinese nonames for left-handed resellers. So, you can buy rewritable version of DS1990 key, but there isn't any information about its protocol. I copied three versions of protocol from the github, some of they are works in the half of cases.
Subsequently I was sad, that BlackMagick project made the universal programmator first.
This strengthened my idea of increasing the quantity of types of supported IC's. I read about way of flashing NRF51 and filled the appropriate registers. And written the support of unique parody of STM8 SWIM interface, used in CH32V003 RISCV chinese microcontrollers. All of this except the key and two flash IC's is still waiting for adding to the PC interface, written in QT.
Today I need to upload a firmware into my transistortester clone. So, I added the Atmega support. At hat moment the interface is refactored for easier addition of new IC's.
And at programmator side I came up with the usbfunction library. This library help to just simply call the functon on the microcontroller through the USB on the interface side. This function also increase the speed of adding of new types of microcontrollers.
For today, I need to try and debug my Atmega module of programmer. Then I have to finish the full AVR list.
Mikhail Belkin