Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:50 04 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Arduino NANO as an ICSP

Author Message
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 07:40am 26 May 2015
Copy link to clipboard 
Print this post

after a few enquiries i've been revisiting earlier work on a cheap ICSP adapter. some of you may have looked at the work darron was doing to use an arduino nano as an ICSP:
http://wiki.kewl.org/dokuwiki/projects:nanu-nanu

unfortunately darron's solution has a copy of microchip's PE embedded in the nano's code which created some issues with providing a precompiled .hex file that anyone could easily burn. it also has (as far as i can tell) the table of supported devices hardcoded, and the build process to create a .HEX file is pretty much beyond most folks.

so, i've created an updated "ascii ICSP" protocol (a variation of 'ascii JTAG' with some extensions), coded it as an arduino sketch, created a .HEX file for upload to a nano, and designed the very simple associated hardware. i've also put together a package containing the bare minimum bits of avrdude to get the .HEX file onto an arduino nano.

now i need a few folks to do a bit of beta testing. any volunteers?

the hardware is pretty simple - an arduino nano, 5 resistors and a zener diode:



attached is a ZIP file containing all the details necessary to upload the code to the nano, along with a PDF of the schematic and source code. there is a batch file called "go.bat" that you need to edit, changing the com port number to match what your nano installs as. then just run the batch file and it should (in theory) upload the precompiled firmware.

2015-05-26_172645_ICSP_V1a.zip

the interface talks at 38400 baud (the same as the micromite default) and responds to a number of single-letter commands. of most interest when testing the device alone is '>', '!', and '@' that respond with '<', version message, and the analog values of inputs A0 to A5. command '5' turns on the 3v3 supply (measure across the zener) while '4' turns 3v3 off. the source code documents the other commands.

it would be appreciated if anyone with an arduino nano could have a play around with this. i've tested out the simpler functions, and in theory the rest should work ok. after a bit more tinkering i'll get back into pic32prog and try to update it to talk the 'ascii ICSP' protocol. 95% of the work is already done.

i'd also like to hear back about how simple (or not) the upload process proves. i believe that all the necessary bits of avrdude are included in the ZIP file, but can not be 100% sure due to already having the arduino IDE installed on my computer.

any other feedback would also be appreciated.


cheers,
rob :-)
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3662
Posted: 10:08am 26 May 2015
Copy link to clipboard 
Print this post

Good luck!

I never did get anyone else to use my simpler & cheaper way using Arduino ICSP.

John
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 07:46am 31 May 2015
Copy link to clipboard 
Print this post

below is a ZIP file containing updated source and .HEX files, now fully tested and working, along with a compiled win32 copy of pic32prog.EXE that fully works with the 'ascii ICSP' protocol. note that this is a branch from version 1.98 so quite old, but supports the MX170. much work is still needed on this pic32prog bitbang.c code to make it linux-friendly, which will include bringing it back into Serge's main branch:

2015-05-31_174150_ICSP_v1B.zip

note that the ZIP file contains everything needed to upload MMbasic to a PIC32MX device. all you need extra is a $3 arduino nano, 5 resistors, and a 3v3 zener diode. i'm running the serial port at 1M baud, and getting an upload and verify time of just over 4 minutes. the bottleneck appears to currently be the arduino sketch.



i really would appreciate some testing and feedback from folks.


cheers,
rob :-)Edited by robert.rozee 2015-06-01
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024