Kodolsinteze
Hello!
When writing a sketch on Arduino, there is an option to use arduino ide and Arduino as ISP to upload sketch via SPI to a standalone Atmega chip. Is this possible with OpenPLC where Arduino Uno is as Arduino as SPI?
I have a pcb with atmega2560, but there is an issue with rx/tx pins and the only way is to upload via SPI.
Thank you!
Reply 0 0
fg71
First I would ask how does it work in Arduino IDE. I believe you use ArduinoISP Sketch and download that to your board.
Second make sure the board is not reset the bootloader (I believe you use capacitor-10uF between reset and GND).
 
Now to your question how could we do the same in OpenPLC.
 
You use Arduino extension to include the main functionality to configure ISP from the ArduinoISP sketch.
What you shouldn't include is delay and maybe need to adapt the ArduinoISP sketch so OpenPLC is happy.
 
I do not have ATTiny to test myself I only have knowledge how it works.
 
Or
 
You could test to download ArduinoISP to the Arduino Uno board and connect everything and include capacitor-10uF
Next open OpenPLC Editor and use Arduino Uno board to download your plc program.
Reply 0 0
thiagoralves
No, you can’t do this on OpenPLC directly. What you can do is select the “compile only” option on the upload dialog to just generate the .hex file, and then use another tool like AVRdude to flash the .hex file to your board using an Arduino ISP. Quite a hassle, but that’s the only way.
Reply 0 0
Reply