1
\$\begingroup\$

So, I want to program a Atmega328p Microcontroller.

Instead of using a FTDI module to convert USB to Serial, I was looking for some better and smaller alternatives. I found this really small IC with simple interface: https://www.electronics-lab.com/ch3330n-smaller-cheaper-usb-serial-converter-ic-needs-no-crystal/

But I am honestly, confused if it will work. Is it possible to program the Microcontroller with this IC? If not, what can be other possible alternatives?

\$\endgroup\$
2
  • \$\begingroup\$ It depend what features you need or if the programming software expects to see a certain kind of USB to serial chip. We can't possibly know how you would connect to MCU and what programming software you want to use, or if the MCU already contains a bootloader. \$\endgroup\$
    – Justme
    Feb 18 at 10:19
  • 1
    \$\begingroup\$ @Justme As it's an Atmega328p chip, i think, the easier way is to use Arduino software. \$\endgroup\$
    – Abrar
    Feb 18 at 10:36

2 Answers 2

1
\$\begingroup\$

Some Arduino Nano copies use CH340/CH330/etc chips, so it's certainly possible, if you have a bootloader on Atmeta328 that accepts new FW through UART. Reset signal needs to be routed to the microcontroller from one of the handshake signals of standard Serial Port, the way it can be achieved might need customization to the interface chip's FW as the signals are not exposed the same way as with FTDI's chip.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ There is no CTS/DTR pin on this one. It may be good for communication, but I'm not sure about about how to implement reset trigger. \$\endgroup\$
    – Ilya
    Feb 18 at 10:38
  • \$\begingroup\$ I think, CH340 chip will work then? \$\endgroup\$
    – Abrar
    Feb 18 at 11:22
  • \$\begingroup\$ @Abrar CH340G needs no external crystal. Yes, it should work \$\endgroup\$
    – Ilya
    Feb 18 at 11:48
  • \$\begingroup\$ Yes, I agree it will work. It has DTR and CTS exposed \$\endgroup\$
    – Ralph
    Feb 25 at 19:49
0
\$\begingroup\$

Arduinos have a bootloader so in theory only TX and RX are needed.

But for the Arduino environment to reset the MCU for programming, it uses the DTR pin.

CH330N does not provide the DTR pin, so even if the RTS output could be used, it would require some modifications to Arduino programming functionality support resetting the device over RTS.

So, in theory, it is possible, but in practice you may not want to go through the trouble of actually making it.

\$\endgroup\$
4
  • \$\begingroup\$ Thanks! Got it. What are other possible alternatives? I don't really want to use a FTDI module \$\endgroup\$
    – Abrar
    Feb 18 at 11:18
  • \$\begingroup\$ That case, is ch340 usable? \$\endgroup\$
    – Abrar
    Feb 18 at 11:22
  • \$\begingroup\$ This another question and borderline of recommending a part to buy. Can you open CH340 datasheet, check if it has DTR pin, and google if other people have used CH340 to program Arduinos? \$\endgroup\$
    – Justme
    Feb 18 at 11:39
  • 1
    \$\begingroup\$ @Justness Yes, I have checked obviously. It has a DTR pin and it's used in Arduino Nano china models. Just to be sure last time \$\endgroup\$
    – Abrar
    Feb 18 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.