Cách kết nối Mạch chuyển USB UART CP2102 với Arduino Mini Pro

Thảo luận trong 'Thiết bị điều khiển' bắt đầu bởi chinh trung, 21/11/17.

  1. chinh trung

    chinh trung Moderator

    [​IMG]
    IF YOU ARE LOOKING FOR;
    • How to program Arduino Mini Pro with CP2102 USB-to-TTL serial converter 5 pins without DTR (reset pin)
    • How to program Arduino Mini Pro without using Arduino board as ISP
    This post probably will help you.

    REQUIRES:
    1. Arduino Mini Pro (In this example I’m using Arduino Mini Pro 5v / 16Mhz version)
    2. CP2102 USB-to-TTL (Drivers for Mac, Windows, Linux or more..)


      [​IMG]
      USB view in system
    CONNECTIONS CP2102 USB-TO-TTL 5PINS TO ARDUINO MINI PRO:
    1. CP2102 USB-to-TTL: TXD (green) -> Arduino Mini Pro RX
    2. CP2102 USB-to-TTL: RXD (yellow) -> Arduino Mini Pro TX
    3. CP2102 USB-to-TTL: GND (brown) -> Arduino Mini Pro GND
    4. CP2102 USB-to-TTL: +5V (red) -> Arduino Mini Pro VCC
    5. CP2102 USB-to-TTL: RST/DTR (reset)-> Arduino Mini Pro GRN/DTR
    UPLOADING SKETCH WITH ARDUINO IDE
    I’m currently using Arduino 1.5.5. I configured it as below;

    1. Arduino IDE -> Tools -> Board -> Arduino Pro or Pro Mini
    2. Arduino IDE -> Tools -> Processor -> ATmega328 (5V, 16 MHz)
    3. Arduino IDE -> Tools -> Port -> /dev/tty.SLAB_USBtoUART
    4. Arduino IDE -> Tools -> Programmer -> AVRISP mkII
    • /dev/tty.SLAB_USBtoUART is the name of serial port shown on Mac OS X. On windows you should see comX (X is a number)
    • To find serial port name list, write on terminal;
    Note:
    + The CP2102 USB-to-TTL hasn’t 6th pin for auto reset Arduino board so you have to click on reset button on Arduino Mini Pro manually.

    • Click on upload sketch (green right arrow)
    • As soon as you see “Compiling sketch…” on status bar, click on reset button.
    • If your timing is good you’ll see “Done uploading.”
    + Nếu không kết nối pin Reset RST sẽ không upload được.


    Ref:
    http://lab.dejaworks.com/programming-arduino-mini-pro-with-cp2102-usb-to-ttl-serial-converter/

    Các file đính kèm:

    Chỉnh sửa cuối: 25/11/17

Chia sẻ trang này