玩arduino UNO时发现用avrdude下载和用arduino IDE下载总是出现卡死下载失败
echo "where avrdude"
echo "d:\\WinAVR-20100110\\bin\\avrdude.exe"
avrdude -p m328p -c arduino -P COM18 -b 115200 -U flash:w:default\\frser.hex
pause
即使下载成功,但是当做串口通信,数据量大时,就出现偶尔的通信异常导致卡死,
某宝16.5块买的,无技术支持;给5V电源加上电解滤波电容,无效;
板arduino放冰箱低温几分钟下载测试,下载卡死概率增高;
用风筒吹加热,下载反而正常了;
发现USB转串口部分,晶振无任何标记,芯片苏任何丝印,电脑设备管理居然显示CH340;
刚开始还以为MEGA328芯片通信死机,后来排查,用一条PL2303线替换原机测试,通信正常。
搜出元件盒子发现之前买的CH340N,SOP8封装,查找资料,
拆晶振,拆无丝印的山寨CH340驱动的芯片,拆假的晶振负载电容C21;
根据CH340N对比分析走线布局和准备
改造后实物图
avrdude -p m328p -c arduino -P COM18 -b 115200 -U flash:w:default\\frser.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e950f
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "default\\frser.hex"
avrdude: input file default\\frser.hex auto detected as Intel Hex
avrdude: writing flash (3334 bytes):
Writing | ################################################## | 100% 0.93s
avrdude: 3334 bytes of flash written
avrdude: verifying flash memory against default\\frser.hex:
avrdude: load data flash data from input file default\\frser.hex:
avrdude: input file default\\frser.hex auto detected as Intel Hex
avrdude: input file default\\frser.hex contains 3334 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.77s
avrdude: verifying ...
avrdude: 3334 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.