3

Can I program any hardware (like toys) with a CH340?

Comments
  • 2
    Any hardware that you can program via a serial interface that you can access somehow. Some chips require to get into an on-chip bootloader via setting the correct chip pins to a certain level.

    But that's only the physical connection. You also need to hand over the data in a format that the bootloader understands, and that depends on the chip. So basically, you need the appropriate software on the PC.
  • 2
    If I grasped the functionallity of the CH340 right, it is a simple USB-to-Serial converter.

    Arduinos have a special bootloader, for letting you programming it over serial.

    Other devices usually do not have this, but also sometimes have memory protection enabled, to even prevent flashing with SPI or JTAG.
  • 0
    @Fast-Nop what will be the appropriate Software ? Any suggestion?
  • 1
    @johnmelodyme That depends on the chip because the bootloader is chip specific. Usually, the chip manufacturer will offer something.
  • 0
    @Fast-Nop Im new to this, Usually How do we know which is What ship . eg , in Arduino there' s 340G written
  • 1
    @johnmelodyme Btw., the easiest case is that the bootloader just expects an Intel hex file with the firmware image. In that case, any serial terminal program such as Hyperterminal would do.

    Hint: the Intel hex format has a variable line length, but you can save yourself quite some time by not assuming that the other side can handle anything other than 16 data bytes (binary payload) per line.
  • 2
    @johnmelodyme You check the hardware data sheets of the device, or try to find the controller on the PCB and google the part number it has printed on the top.
  • 1
    @Fast-Nop Thanks This Helps a lot!
Add Comment