Changing code to suit standalone chip.

Hi All,

I am currently having a win with some code a few of you have helped me with. It is working great so for on a Mega2560 board. What I want to do is to be able to load it on to something like an ATTiny1616 or 3216. This will be on a small custom board I am designing. Is this a simple process?

Is this a simple process?

Only you can answer this as we have zero idea of what hardware you have connected to the mega and what the code does.

I would start with installing one of the cores suitable for your target MCU, make a copy of your working sketch and try compiling for the new MCU.
If you can get the sketch compiling (probably after a few tweaks) then make/buy a ATTiny3216 board and upload the sketch (using your mega) and see if it still works.

Thanks for the response.

As far as connected hardware all I will have is a single analog I/P and 3 digital O/Ps to switch 3 transistors.

I will also be having a colour 1.3" OLED display that will display a single digit (out of a possible 7) as a bitmap that scrolls left or right /up or down (depending on the orientation of the display). This will only change with as the level input on the analog I/P changes up and down.

With all that I don't need huge I/O and speed doesn't have to super fast. I am thinking 10 - 16Mhz should be ample. I was thinking the 3216/3217 would be suitable.

Having never done this sort of thing before is why I am asking for advice from the experts.

After reading that post I think I might go back to my original idea.....ATMega328.