BotoX / xiaomi-m365-compatible-bms

Xiaomi M365 compatible, open source firmware for ATMega328p+BQ769x0 BMS. Ninebot in proto_test branch
197 stars 45 forks source link

Сlock generator #12

Open Elsta opened 5 years ago

Elsta commented 5 years ago

Hello BotoX!
Thank you for the work done and interesting project! Will this project work correctly if you connect external oscillator 16Mhz to the controller and change the fusebit without changing the m365 firmware?

BotoX commented 5 years ago

Yes it will if you change this firmware to use 115200 baud and change F_CPU to 16M. Also need a different bootloader bin: https://t.me/XiaomiM365Hacking/39862

IonicEV commented 4 years ago

Yes it will if you change this firmware to use 115200 baud and change F_CPU to 16M. Also need a different bootloader bin: https://t.me/XiaomiM365Hacking/39862

I found later posts from "White Power" claiming it did not work out: "avrdude : verification error: content mismatch at byte 0x7e00"

Was it the reason you rolled back the 115200bps bootloader?

Elsta commented 4 years ago

It didn’t work for me at 115200 baud. I used both quartz and a generator with and without a bootloader.

Best regargs!

вт, 24 дек. 2019 г., 20:04 IonicEV notifications@github.com:

Yes it will if you change this firmware to use 115200 baud and change F_CPU to 16M. Also need a different bootloader bin: https://t.me/XiaomiM365Hacking/39862

I found later posts from "White Power" claiming it did not worked out as "avrdude : verification error: content mismatch at byte 0x7e00"

Was it the reason you rolled back the 115200bps bootloader?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BotoX/xiaomi-m365-compatible-bms/issues/12?email_source=notifications&email_token=AMFNKXNEQAK4FTPVJGFGNCTQ2I6KDA5CNFSM4HSDKKLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTOE3I#issuecomment-568779373, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFNKXP2HET2RUSNWPSV4CTQ2I6KDANCNFSM4HSDKKLA .

BotoX commented 4 years ago

The quarz on the V1.6 BMS is 8MHz.

Elsta commented 4 years ago

I don’t quite understand what you want to know from me. I tried to run BMS v1.5 at a frequency of 16 MHz with a voltage of m328p 3.3v. Did not work out. With an external 8 Mhz quartz, everything worked, but at a low speed not corresponding to 115200 baud.

Best regargs!

ср, 25 дек. 2019 г., 16:36 BotoX notifications@github.com:

The quarz on the V1.6 BMS is 8MHz.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BotoX/xiaomi-m365-compatible-bms/issues/12?email_source=notifications&email_token=AMFNKXLISEC3GW73WDLLJNTQ2NOXJA5CNFSM4HSDKKLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHULXJQ#issuecomment-568900518, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFNKXMYIESEZYI2UPE4IPLQ2NOXJANCNFSM4HSDKKLA .

IonicEV commented 4 years ago

The quarz on the V1.6 BMS is 8MHz.

Thanks! I am looking forward to program the BMS soon.

IonicEV commented 4 years ago

@Elsta Sorry for the confusion, I was referring to BotoX earlier commit. Thanks for your clarification too.

BotoX commented 4 years ago

You can only run this BMS with 115200 baud if you use a 16 MHz quarz OR calibrate it with OSCCAL so that you can do 115200 baud with 8 MHz. See: https://codebender.cc/sketch:186647#OSCCAL.ino

Elsta commented 4 years ago

thanks, I will try to play with osccal

Best regargs!

чт, 26 дек. 2019 г., 3:05 BotoX notifications@github.com:

You can only run this BMS with 115200 baud if you use a 16 MHz quarz OR calibrate it with OSCCAL so that you can do 115200 baud with 8 MHz. See: https://codebender.cc/sketch:186647#OSCCAL.ino

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BotoX/xiaomi-m365-compatible-bms/issues/12?email_source=notifications&email_token=AMFNKXJOQ5SQXG2SLITSNTDQ2PYMDA5CNFSM4HSDKKLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHUVH4I#issuecomment-568939505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFNKXPMAMBY55SCXQTGLJDQ2PYMDANCNFSM4HSDKKLA .