Electronics > Projects, Designs, and Technical Stuff

Reverse engineering the FNIRSI 1014D

(1/7) > >>

As announced in the original thread about the FNIRSI 1014D is here the new thread about the reverse engineering project.

I just finished coding the main functions for displaying most of the user interface objects. It was a lot of tweaking and looking for the bitmaps in the original code to write it all up and get the positions on the screen to be correct.

So far the following bits are coded:

* My logo  :)
* The basic display with the grid
* The run/stop text
* The fast/slow text
* The trigger information
* The channel information
* The time base information
* The trigger status (Waiting.../Triggered)
* The measurements in the six slots on the right side of the screen
* The main menu
* The channel configuration menu
* The measurements menu
There are still plenty of user interface items to code, like the generator menu and the file view screens, but my next step will be to code the controlling of the settings with the buttons and the knobs.

Once that is working I will try it on the actual scope, for which I have to write additional code, like setting up the clock synthesizer, serial interface and other initialization. This will give me a base project to build further on.

A lot of the code written by me for the 1013D can be used, but I have seen that there are some differences in how it works with the FPGA, so I have to figure that out and test things to see if actually needed.

After finishing with the scope functionality the bigger challenge lies in the function generator. That will require more looking into the original code with Ghidra.

So sit back and enjoy the ride.


Short update with a picture.  :)

First test of the screen setup code on the actual scope. It works without problems.

Next up is adding the code for getting the data from the secondary microcontroller, which is simple and already investigated by donwulff. Needs a bit of polish to rid the unneeded like setting it up for transmit interrupt and never have it handled by an actual interrupt handler. Is a straight copy from the original. Same as for using the FIFO, which is not needed since it is a request/response system based on a single byte.

A bigger part is setting up a state machine for handling the user input and allow the control of the settings. Will do that on a step by step approach.

So, wait for more to come.  8)

Things are coming together.  :)

Some of the basic functions are coded, like setting the trigger channel, run/stop control, channel sensitivity, etc. For the things that work with a menu more work has to be done. It needs handling in a secondary state instead of changing the one setting and continue with sampling.

The sample gathering and trace displaying is done with the 1013D code and needs more tweaking, but it is doing something.

It is promising, even though it still needs lots of work done.

Again a short update.

Since the size of the trace section on the 1014D is smaller than on the 1013D I had to tweak a lot of the positions and sizes in the code that displays the cursors and the traces. Implemented the movement of the trace positions, trigger horizontal position and the trigger level, and had to correct the limits of movement for these too. Did the cursor measurements display, which also needed tweaking of the dimensions and positions. Trying to make everything a pixel accurate copy of the original takes its time with taking screen captures and enlarging them in pinta to zoom in on the actual pixels.

Have to correct a textual error, but since it is based on a bitmap makes it a bit more work then just deleting a letter. The text in the lower right corner states "Waitting ..."  :palm:

All in all I'm having fun with it. But the tricky actual reverse engineering still has to come. My first goal is to have the basic scope functionality working, with the menus, calibration, sampling, etc. and release that for testing, while in the mean time do the code for the picture and waveform saving and viewing.

Also have to look into Atlan his work for the 1013D to improve on some things around the calibration.

And when all of that is done the signal generator is next on the list. Will also be quite the job.

Hit a bit of a wall.  :palm:

Working at implementing the main menu, after finishing the time and volt cursor handling, I thought it might be a good idea to do the USB connection first, because with that working it makes it possible to write and clear new firmware on the SD card.

But for some reason the SD card bit fails when started from the SD card. At least with the code loaded via FEL, for both the original scope code and my new code. When the scope is started from FLASH it works as intended.

Have to try it with my new code directly loaded from the SD card and see if that suffers from the same problem. If so, some debugging is going to be needed.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod