View Single Post
Old 06-24-2023, 05:44 AM   #189 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,807

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 830
Thanked 708 Times in 456 Posts
It's been a little while since I last updated this thread, so...
  • Speeded up SWEET64 math. Old mult64 would take around 1 ms to complete, and old div64 would take up to 10 ms to complete. New routines both take about 200 usec to complete. This is about an 80% improvement for mult64, and a 98% improvement for div64.
  • 32-bit isqrt, used in Chrysler fuel correction, is also fixed to be faster and more accurate. Old isqrt took about 1 ms to complete, and had an... interesting interpretation of various input numbers at times (square roots would be up to 5% off from what they were supposed to be). New 32-bit isqrt now takes about 70 usec to complete for a 92% speed improvement, and actually returns accurate square roots for all 32-bit cases.
  • Made general decimal number output auto-ranging. Previous output was limited to output display values up to 9999999.999, and decimal rounding was inconsistently applied to the output. New output function allows for output values 1000x larger (of up to 9999999999), can be constrained to any window size between 2 and 10 characters, and properly handles decimal rounding.

    Example debug monitor "display decimal output" command for a window size of 10 with 3 decimal places:
    Code:
    ]a<3.u
    00: 00 0A 03
        0000000000000005 -      0.005 -
    01: 0000000000000037 -      0.055 -
    02: 000000000000022B -      0.555 -
    03: 00000000000015B3 -      5.555 -
    04: 000000000000D903 -     55.555 -
    05: 0000000000087A23 -    555.555 -
    06: 000000000054C563 -   5555.555 -
    07: 00000000034FB5E3 -  55555.555 -
    08: 00000000211D1AE3 - 555555.555 -
    09: 000000014B230CE3 - 5555555.56 -
    0A: 0000000CEF5E80E3 - 55555555.6 -
    0B: 0000008159B108E3 -  555555556 -
    0C: 0000050D80EA58E3 - 5555555556 -
    0D: 00003287092778E3 - ---------- -
    
    ]
  • Added a graphical status bar which can display between 0-100%, or indicate overflow. Currently being used for INST FE vs CURR FE, and INST FE vs TANK FE. For these two pages
    • If INST FE is equal to CURR/TANK FE, then the status bar will display 2/3s full
    • If INST FE is less than CURR/TANK FE, the status bar will be less than 2/3s full
    • If INST FE is greater than CURR/TANK FE, the status bar will be more than 2/3s full
    • If INST FE is at an overflow condition (EOC for MPG or KPL, IDLE for 100km/L or 100mi/G), then the status bar will show that, too.
  • Refined debug command-line terminal to be able to directly edit stored parameters, major in-program variables, and trip measurements. Also measures execution time of SWEET64 programs and mult64/div64 instructions, and measures all interrupt execution times. Also can act as a simple 64-bit calculator from the command line, to directly test output of all 64-bit SWEET64 math routines.
  • Continuing to slowly push original source code file into numerous smaller sub-files for ease of readability, while fixing the inevitable bugs that show up from splitting it up.
  • Almost all features have been completely refactored. Only features left to refactor are drag race, and coastdown testing (which was in work anyway when I paused development several years ago)

Currently working to get my version to support the MPGuino Colour Touch. I powered up the unit I purchased from abbalooga to verify operation, and will modify it to incorporate an ICSP header for programming purposes. Also studying the datasheets associated with the TFT and touchscreen controllers being used.

The code is currently being stored at https://github.com/tvago1972/MPGuino
  Reply With Quote