Go Down

Topic: Is direct pin manipulation possible? (Read 158 times) previous topic - next topic

gjtorikian

I have a sketch that runs fine on an Arduino Nano that I'm trying to get to work for an MKR1000.

The Arduino compiler is failing at all the pin port parts dealing with direct port manipulation: `PIND`, `PORTB`, etc.

Have these been renamed or is it simply not possible to do port manipulation?

pert

MKR1000 uses a different architecture (SAMD) than the Nano (AVR) and thus the registers may have different names. For this sort of low level operation you need to spend some quality time with the datasheet for your microcontroller. A benefit of the higher level Arduino functions is they will make it more likely for code to be portable across architectures, albeit often at the cost of some overhead.

Go Up