The code from a Teensy2 will not necessarily be easy to port to a Teensy3. The T3 is not just a bigger T2. It uses a completely different type of chip, an ARM Cortex M4.
"PORTB" is an AVR chip thing. Teensy3 uses an ARM chip, which has GPIOA_PDOR as a "somewhat similar" thing.Any Arduino code that uses PORTB will require some significant effort to run on a Teensy3 (this is "direct port manipulation", which is "underneath" the Arduino libraries. Any compatibility between Arduino variants with different CPUs will only be for programs that use the libraries...
PORTB |= 0x2;
Paul has gone to great lengths to provide some AVR port emulation.The emulation code will emulate the PORTx/DDRx/PINx registers of the UNO.
The emulation code will emulate the PORTx
Really? Cool; I have some Teensy3s, but I didn't realize that he had done this!The miracles of C++, I guess; I'll have to take a look at how this was implemented.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16