找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1588|回復(fù): 4
收起左側(cè)

自制的Arduino 328p最小系統(tǒng)板用CH340C下載的問題

[復(fù)制鏈接]
ID:97023 發(fā)表于 2024-5-19 23:47 | 顯示全部樓層 |閱讀模式
最近在學(xué)習(xí)Arduino,買了一塊Arduino UNO R3的開發(fā)板,也買了兩片Arduino 328p的芯片。

02 板子.jpg
04 ATmega328P.jpg

按網(wǎng)上的方法,將開發(fā)板改造成Arduino ISP 編程器。

08 將UNO板改造成ISP下載器.jpg
09 設(shè)置開發(fā)板.jpg
10 將ISP程序下載到開發(fā)板.jpg

然后,再用Arduino 328p 的芯片制作了一個最小系統(tǒng)。

05 轉(zhuǎn)接板.jpg
06 最小系統(tǒng).jpg

將開發(fā)板與自己制作的最小系統(tǒng)相連:

16 開發(fā)板與最小系統(tǒng)連接方法.jpg
14 開發(fā)板與最小系統(tǒng).jpg

先將引導(dǎo)程序通過開發(fā)板下載到最小系統(tǒng),成功了。

11 燒錄引導(dǎo)程序到最小系統(tǒng).jpg

寫了一個簡單的LED閃爍的程序,通過開發(fā)板下載到最小系統(tǒng)板,也成功了。

12 利用開發(fā)板下載程序到最小系統(tǒng).jpg

本來用開發(fā)板制作的ISP編程器下載軟件也是可以的,但我想自己用CH340制作一個。
現(xiàn)在的問題是,通過CH340C制作的編程器下載程序到最小系統(tǒng),始終不成功。
電路原理圖如下:

15 CH340C與Arduino.jpg

下載時顯示如下錯誤信息:
*****************************
Arduino:1.8.19 (Windows 7), 開發(fā)板:"Arduino Uno"
項目使用了 934 字節(jié),占用了 (2%) 程序存儲空間。最大為 32256 字節(jié)。全局變量使用了9字節(jié),(0%)的動態(tài)內(nèi)存,余留2039字節(jié)局部變量。最大為2048字節(jié)。
avrdude: stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 1 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 2 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 3 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 4 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 5 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 6 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 7 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 8 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 9 of 10: not in sync: resp=0xd1avrdude:
stk500_recv(): programmer is not respondingavrdude:
stk500_getsync() attempt 10 of 10: not in sync: resp=0xd1Problem
uploading to board.  See hc/en-us/sections/360003198300 for suggestions.
*****************************
意思是:“程序員沒有回應(yīng)avrdude:”
也試過左邊CH340C部分,給STC單片機下載程序是沒有問題的,無非是在下載程序時要“冷啟動”一下STC的單片機。
在給Arduino最小系統(tǒng)下載程序時,也按過復(fù)位開關(guān),也不行。
分析了Arduino UNO開發(fā)板的電路,它也是用CH340C的下載電路,本來CH340C可以不用外接晶振的,但它接了。
我也在自制的CH340C電路中加上了晶振部分,但還是不行。
請懂的朋友幫幫我,謝謝了。

回復(fù)

使用道具 舉報

ID:277550 發(fā)表于 2024-5-20 10:29 | 顯示全部樓層


請仔細檢查開發(fā)板和新板的連線。
參考

snap002238.png

回復(fù)

使用道具 舉報

ID:97023 發(fā)表于 2024-5-20 11:28 | 顯示全部樓層
devcang 發(fā)表于 2024-5-20 10:29
請仔細檢查開發(fā)板和新板的連線。
參考

謝謝回復(fù),開發(fā)板到新板沒有問題,就是照你這樣連接的,可以下載引導(dǎo)程序與其它程序,下載以后新板也可以正常工作。
我的問題是:不用開發(fā)板,用自制的CH340C與新板之間不能下載程序。
回復(fù)

使用道具 舉報

ID:344848 發(fā)表于 2024-5-20 16:42 | 顯示全部樓層
ztzp 發(fā)表于 2024-5-20 11:28
謝謝回復(fù),開發(fā)板到新板沒有問題,就是照你這樣連接的,可以下載引導(dǎo)程序與其它程序,下載以后新板也可以 ...

懷疑自引導(dǎo)程序沒有下載到購買Arduino 328p中?
回復(fù)

使用道具 舉報

ID:97023 發(fā)表于 2024-5-20 21:41 | 顯示全部樓層
donglw 發(fā)表于 2024-5-20 16:42
懷疑自引導(dǎo)程序沒有下載到購買Arduino 328p中?

謝謝回復(fù),不但引導(dǎo)程序下載了,而且其它程序也下載成功了,并正常運行。
但這些都是用開發(fā)板充當(dāng)ISP編程器下載的。
我就想自己用CH340做一個USB轉(zhuǎn)TTL將程序下載到最小系統(tǒng),但不成功。
回復(fù)

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復(fù) 返回頂部 返回列表