Lỗi avrdude stk500_recv programmer is not responding tren ide arduino năm 2024
Nhiều người mới tìm thấy lỗi này avrdude: stk500_getsync(): not in sync: resp 0x00 trong khi tải chương trình lên bo mạch. Show Trước khi bắt đầu kết luận lỗi, trước tiên chúng ta hãy phân tích cách hoạt động của arduino. Upload chương trình Arduino hoạt động như thế nào? Bo mạch Arduino về cơ bản bao gồm ba thành phần chính. ATmega328p hoặc tương tự Bộ chuyển đổi USB sang serial Nguồn điện 5V Trong hầu hết các trường hợp, chương trình được tải lên bằng cáp USB hoặc sử dụng bộ chuyển đổi serial sang USB bên ngoài. Lý do lỗi 1: Chip ATmega328p trống Khi bạn mua vi điều khiển mới như ATmega328p. Nó hoàn toàn trống rỗng. Để lập trình bằng arduino, bạn cần có USB-ASP (bộ lập trình dựa trên SPI) như bên dưới. Lý do 1: Bạn đang lập trình bằng cách sử dụng serial của arduino với bộ điều khiển trống. Flashing boot-loader Arduino sang ATmega328p mới. Kết nối usbasp programmer với arduino. Chọn Bo từ Tools >> Boards >> Arduino UNO Chọn usbAsp programer từ Tools >> Programmers >> USBASP Nhấp vào Tools >> Burn Bootloader Sau khi tải lên bootloader, bạn có thể sử dụng cổng serial / usb để lập trình arduino của mình. Lý do lỗi 2: Nguồn điện Khi sử dụng bộ chuyển đổi USB2Serial bên ngoài, có thể bạn chưa kết nối + 5V với bộ vi điều khiển hoặc kết nối không chính xác của Rx TX. Lý do lỗi 3: Thiết bị ngoài trên đường Rx Tx Bạn đã kết nối thiết bị bên ngoài trên chân Rx Tx, tức là chân 0 và chân 1 của Arduino. Loại bỏ hoặc ngắt kết nối bất kỳ mạch nào có trên đường Rx Tx và thử lại. Lý do lỗi 4: Chọn sai cổng Bạn đã chọn sai cổng serial. Vào menu Tools >> Ports và chọn cổng thích hợp. hoặc lựa chọn bo không chính xác. Lý do lỗi 5: Thiếu driver Nếu bạn không tìm thấy cổng serial chính xác, hãy kiểm tra xem bạn đã cài đặt đúng bộ chuyển đổi USB sang serial hoặc driver Arduino chưa. Đối với Windows, hãy tìm bất kỳ dấu hiệu màu vàng nào (cho biết lỗi) trên các cổng serial. Các giải pháp phổ biến để sửa lỗi Ngắt kết nối và kết nối lại cáp USB. Nhấn nút reset trên bo. Khởi động lại Arduino IDE. Đảm bảo bạn chọn đúng bo trong Tools ► Board ►, ví dụ: Nếu bạn đang sử dụng Duemilanove 328, hãy chọn nó thay vì chọn Duemilanove 128. Bo sẽ cho biết nó đang ở phiên bản nào trên vi mạch. Đảm bảo rằng bạn đã chọn đúng cổng trong Tools ► Serial Port ►. Một cách để biết nó đang ở cổng nào là làm theo các bước sau: Ngắt kết nối cáp USB. Đi tới Tools ► Serial Port ► và xem những cổng nào được liệt kê (ví dụ: COM4 COM5 COM14). Kết nối lại cáp USB. Quay lại Tools ► Serial Port ► và xem cổng nào đã xuất hiện trước đây chưa từng có. Đảm bảo các chân số 0 và 1 không có bất kỳ bộ phận nào được kết nối, kể cả bất kỳ shield nào. Lý do lỗi 6: Bộ điều khiển bị hỏng Cũng có trường hợp bạn đã làm cháy bộ vi điều khiển của mình. Hãy suy nghĩ thử bạn có làm bất cứ điều gì nguy hiểm ngay trước khi bạn tải lên một sketch mới không? Lý do lỗi 7: Sử dụng bộ chuyển đổi USB bên ngoài sang serial Khi sử dụng bộ chuyển đổi serial sang USB bên ngoài, bạn cần kết nối chân RTS của bộ chuyển đổi usb2serial với chân reset của bộ vi điều khiển thông qua tụ điện 0,1uF (104). Bạn cần bốn chân từ bộ chuyển đổi serial bên ngoài RX, TX, GND và RTS - || - với tụ điện 0,1uF kết nối một đầu của tụ điện với chân RTS và đầu kia với chân reset của vi điều khiển. Lý do lỗi 8: Quyền Windows 10 Thử chạy Arduino IDE ở chế độ administrator. Lý do lỗi 9: thạch anh bên ngoài bị thiếu hoặc bị lỗi Kiểm tra xem hầu hết các bo mạch Arduino sử dụng thạch anh 16MHz hoặc 8MHz, nếu bạn đang thử với chip mới, đây là lỗi phổ biến. Sử dụng thạch anh 16MHz cho ATmega328p với Arduino UNO boot-loader. Is this some kind of joke? Who is this mysterious AVR Dude, why is he so uncool, and — most importantly — what does he have against you trying to upload a sketch to your Arduino? It’s beyond frustrating. In this quick lesson, you’ll learn how to banish the mysterious AVR dude to the dusty highways of the nether realms. Or, to be less poetic, you’ll learn how to get rid of this error so you can get back to uploading your sketch. So who is this AVR dude, and why does the error happen?AVRDude stands for AVR Downloader Uploader and is a utility used by the Arduino IDE. The utility’s main job is pretty straightforward — it allows you to load code onto your Arduino board. So that’s who the dude is, but why does the error happen? The avrdude: stk500_recv() error message is alerting you to a generic connection error between your computer and the Arduino. I wish I could keep it simple and tell you this error happens because of one single problem, but that would be too easy. This generic error can pop up for a host of reasons. But don’t worry, I’ve got your back. In this lesson, I’m going to go through a “laundry list” of possible solutions. (Many thanks to “The Guy with The Hat” from the Arduino Stack Exchange for compiling this great list of fixes.) I’ll walk through each in detail, starting at the most common and easiest and moving on to more detailed troubleshooting tasks if those don’t work. Here goes. Let’s start with the easy stuffBefore we touch on some of the more elaborate and involved potential solutions, it’s smart to rule out all those obvious and small glitches.
Still getting avrdude: stk500_recv() error?If you’re still getting the avrdude: stk500_recv() error, all is not lost — not by a long shot. It’s time to dig into some real troubleshooting. So what could be going wrong here? We know the problem could be at three possible locations: the USB cable, the Arduino Board, or your computer. We’ll use a process of elimination to figure out the point of failure.
Once you have some hard data on the point of failure, you can read one of the following three sections to hone in on resolving the avrdude: stk500_recv() error. The USB cable is to blame!Well, I’ll go right ahead and state the obvious solution. Use a different cable 🙂 My computer is the problemHere are three fixes you can try.
My Arduino board is causing the stk500_recv() error:This is where things get a little dicey. It may be that your Arduino board is bricked — electronics speak for broken in a manner that does not allow fixing. But try these steps before you throw it out and buy a new board:
Have you banished the dude?By the time you get here, you’ll hopefully have banished the AVR dude back to the shadowy chaos realm from whence he sprung. With any luck, you’ll never meet him again. But if you do, now you have some tricks up your sleeve to get rid of the avrdude: stk500_recv() error swiftly and efficiently. If you’re still getting the error, please read the comments below. You may find the hidden clue you’ve been looking for. Drop us a line in the comments if you don’t — someone out there may have faced the same problem. And, of course, if you found a different solution, please leave a comment — it may help someone else. |