abcminiuser / lufa

LUFA - the Lightweight USB Framework for AVRs.
http://www.lufa-lib.org
1.04k stars 325 forks source link

How i can usw the avrisp-mkii protocol in atmega16u2 #138

Closed mcuOne closed 5 years ago

mcuOne commented 6 years ago

Hello my friend. How can I fully use the mkii protocol on the atmega16u2? So also the TPI protocol. For testing purposes, I use an Arduino UNO.

NicoHood commented 6 years ago

How about compiling the project? https://github.com/abcminiuser/lufa/tree/master/Projects/AVRISP-MKII

I am not sure if its possible to fit into the small flash/ram of the 16u2.

mcuOne commented 6 years ago

I do not think the RAM is too small. KosakaLab did manage it: https://make.kosakalab.com/make/electronic-work/avrisp-mk2/uno-r3_avrisp-mk2_en/ At first I thought KasakaLab uses Lufa Lib, but it uses TPI programming probably his own method. Or am I wrong?

abcminiuser commented 6 years ago

It should work fine on the tiny 8KB parts, but you'll have to disable ISP programming and enable TPI programming only. In the Config/AppConfig.h header of the project comment out ENABLE_ISP_PROTOCOL and leave ENABLE_XPROG_PROTOCOL enabled.