Search results

  1. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Wow, from a first look, uGUI seems pretty neat! If possible, definitely the way to go! I’m curious, how much memory does it cost? ;) And what about the performance? It was a bit troublesome on the XH18 that writing on the LCD can take a lot of time and so hold up the main routine...
  2. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Great, congratulations! :) Strange, but yeah, logic analysers are nice tools! I had a situation where one helped me to understand why a serial communication that I wanted to analyse looked like garbage... Sure, if you can use some of my code, feel free to use it... Unfortunately I hadn't time...
  3. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I did a quick test with the XH18LCD and its ST7735S: After UTFT() the LCD is still white and after UTFT_InitLCD() it switches to a random noise picture (or the last displayed image if still in the memory of the LCD).
  4. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Hmm, so there is no marking that tells the LCD model? Do you know (or can you guess) the resolution? Then you could try to lookup if UTFT could give you a clue about if it does support it and which controller it might be: https://github.com/hurzhurz/UTFT-STM8S/blob/master/UTFT.c#L72...
  5. H

    New "TSDZ2 Torque Sensor Central Motor"

    Sure, you can flash the original firmware again, you can find a backup of mine in the repository (but I would recommend to create a backup of flash/eeprom by yourself too): https://github.com/hurzhurz/xh18lcd/tree/master/firmware You have to use version 0.12 of the opensource firmware on the...
  6. H

    New "TSDZ2 Torque Sensor Central Motor"

    Does someone want to test a very early firmware for the XH18LCD, to be used with the opensource TSDZ2 firmware (as an alternative for the LCD3)? Ideally someone who already has a working LCD3 for comparison (me not). It can be found here...
  7. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Thanks! :) Yeah, looks like there are many configuration options with the LCD3 and the opensource firmware. I have flashed my motor with it today and started to adapt my XH18 firmware. I can't tell for sure yet, but I think I can implement all or most of the configuration options. Most...
  8. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Yeah, would be sad if it fails because of the memory. Unfortunately my tries to reduce the size by not using arduino/sduino failed. After I managed to get it compiled, it still had almost 30k. And it didn't even work (but I still haven't much experience with STM8). But I made another approach...
  9. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Well, it is obvious not the best platform for future development. But on the other hand, I (and probably many other TSDZ2 owners) already have it. So I think I will try to see if it is usable...
  10. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Well, I'm not sure if they thought about that beforehand. I think they designed the final PCB first and than cared about the software. Look at how the LCD data pins are connected: https://github.com/hurzhurz/xh18lcd/blo ... ardware.md They spread the 8 lines across two different ports and even...
  11. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Well... crap. With fonts that are needed for a TFT, that will be tight ;) My firmware barely fits in the 32k flash, I already had problems after I added the odometer as last. Though, I don't know how much overhead comes from Arduino/Sduino. Strange thing is, it shows a smaller size after...
  12. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Sure, the main motivation to look into this was to later have the possibility to support it. Besides not riding my bike very often, the main reason I don't use the flexible OpenSource firmware yet is because I don't want to buy and mount the KT-LCD3 while I like the form factor of the XH18LCD...
  13. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I have now started a collection for information that are needed to develop custom firmware for the XH18LCD: https://github.com/hurzhurz/xh18lcd And I have also created a example firmware that supports most features of the original firmware...
  14. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I have just opened my XH18-LCD to see if I can repair it: I guess there is a defect transistor or mosfet that broke at the same time the other one at the motor controller broke. Effect is the same like shown in this video: https://www.youtube.com/watch?v=P6CuWJCOV9k Anyway, I have scrubbed off...
  15. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I think that was hard resin... not like that soft gel stuff at the controller. So, very good chances to damage something while trying to remove the resin... By the way, would be cool to swap the LCD against a transflective one...
  16. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I can try to, but I have not much time at the moment. I also want to understand where and how the current limit is set... if it is really in the eeprom etc. I did buy an extension cable here...
  17. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I think $1c is the smoothed throttle value, with the smoothing happening between $b82c and $b875. $a6 could be something like a maximum current factor. So when the throttle is above a certain level, it would make sense to set the current limit factor to the maximum. Maybe the correlation...
  18. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I have digged a little bit in the code again. I think one main task of TIM3 is to check the hall sensor and to update the negative phase outputs according to the state. This is done in $9a67: first $ab28 is called to read the state (and also stored in X), then $a99b is called to set the outputs...
  19. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    I saw this too... it's strange. I can't imagine someone writes this all in assembler, but I also can't imagine a compiler leaves unused code. Oh, and don't let you trick by a "ret" to think this is the last line of a routine. I have seen multiple with more then one "ret"... By the way, looks...
  20. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Maybe a first hint to where interesting things could be: There are functions to prepare the value that is written into the timer compare registers for the three channels: $8791/$87ef/$884d These functions also lookup values stored in the flash starting at $8b32 and $949a. And I think this...
  21. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Ok, I will try and look if I find out something...
  22. H

    New "TSDZ2 Torque Sensor Central Motor"

    Well, for the part about the eeprom values, that was just a guess of me that I told you. At least for the voltages, I had some new insights that say something else: https://endless-sphere.com/forums/viewtopic.php?f=28&t=94351&start=50#p1384193
  23. H

    New "TSDZ2 Torque Sensor Central Motor"

    The LCD doesn't send the number of magnets to the motor controller. So the display would probably show the correct speed with multiple magnets, but the motor would think that you drive at e.g. double the speed...
  24. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Cool that you have already tested it! And for $1f/battery voltage: After I connected a LiPo battery in series with my lab bench power supply, I was able to take some measurements: $1f / 2.9 = voltage And some new findings: $a2 contains the minimum voltage. It is the second byte from the eeprom...
  25. H

    Improving original firmware - TongSheng TSDZ2 mid drive motor

    Yeah, I will check what flags/bits are probably useful about PAS. While watching the memory dump, I had seen 3 bytes that probably contain something. Ah ok. I will also check the output pin when I have scraped away the epoxy. I don't need the bike soon... in fact, I haven't used it lately... so...
Back
Top