stawel / cheali-charger

cheap lipo charger
820 stars 273 forks source link

What usb serial adapter can be used? #253

Open shkup opened 6 years ago

shkup commented 6 years ago

The documentation assumes we are all Arduino programmers... What serial usb adapter can be used in the flashing process? All I've seen have RX, TX pins... How does it connect to the IMAX b6 board? Do you have maybe some guide?

specing commented 6 years ago

Anyone can be an Arduino programmer, it is child's play.

Any 5V ones will do. 5V power goes (for serial adapter, don't connect it if it is already powered on its own) closest to input power connector, then RX in middle and GND.

shkup commented 6 years ago

But the picture in the flash tutorial states that the connection for flashing is done via MOSI, MISO, SCK etc. How do you connect a regular serial adapter with RX, TX into it?

specing commented 6 years ago

but you are not flashing ?! USB-serial is for saving logs to computer. You cannot flash cheali-charger with an usb-serial adapter.

Smeat commented 6 years ago

Search for usbasp to find a suitable programmer.

Edit: Assuming you want to flash an AVR based target.

shkup commented 6 years ago

I want to flash cheali firmware into my b6 skyrc charger...I assume I need to connect it to the pc using serial adapter and then flash the hex file using appropriate software..Am I wrong?

specing commented 6 years ago

yes, you are wrong.

shkup commented 6 years ago

Can you please kindly explain?

Smeat commented 6 years ago

Just connect MISO, MOSI, SCK, RESET, VCC and GND to the usbasp (or any other programmer), install avrdude and flash the hex using the following command: avrdude -patmega32 -cusbasp -Uflash:w:cheali-charger-[VERSION].hex:a

For further information see: https://github.com/stawel/cheali-charger/blob/master/docs/flashing.md

specing commented 6 years ago

It helps to read documentation every once in a while :)

shkup commented 6 years ago

Just the usbasp part was missing... I found this: https://www.amazon.com/USBasp-Programming-Quadcopter-Atomic-Market/dp/B00V42E8JC