I have a program written for the Uno and I want to put it on a Micro. Is there a map that will tell me which pins on the Uno that correspond to the ones I am using on the Micro? Or do I just assign them?
These are the pins I am using:
clockpin
enablepin
latchpin
datapin
The four pins you use, they are driving some shift register? You can use the same pins on Micro to drive them. No need to change pins. If you use any communication pins such as SPI or I2C, then Micro has THESE pins located at different locations than UNO. histo provided the link.
OK, are you using any direct port manipulation commands? If you are just doing say pulseOut(), it makes no difference among any Arduino boards. If you are doing port manipulation, that's different. I recommend not using port manipulation. It won't make your display any faster and makes your code impossible to port to other boards.
This post has a diagram for mapping. It's fairly new diagram (unofficial) so expect some mistakes.
So that means then I will be connecting most of my pins on the ICSP. Yet, I don't understand the nomenclature of the pins so is this correct alignment?
with clockpin 13 going to - reset on port b or main board reset (#13 is in both locations)
enablepin 10 is going to a - MOSI pin
latchpin 9 is going to - the Serial SCK
datapin 11 is going to - the Serial MISO
On UNO pin 13 is also the SCK but on micro pin 13 is just an I/o pin. Your OctoBrite is a shift register. Any I/O pin can handle it. So just use pin 13. It is only available at the pin 13 hole, not on the ICSP socket.
liudr,
This is awesome! Thanks so much for explaining the pin assignment! I want to give you karma points. Can I do that?
You have been tremendously helpful.
China Blue