Separate 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).
Mikhail Belkin
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.