Why GPIOD_PDIR becomes 255 as soon as pins PTD0-PTD7 (PORTD0-7) become input??
Should not that be 0?
for Teensy 3.2 GPIOD_PDIR becomes 0
for Teensy 3.6 GPIOD_PDIR becomes 255
Code
const...
Type: Posts; User: hstone
Why GPIOD_PDIR becomes 255 as soon as pins PTD0-PTD7 (PORTD0-7) become input??
Should not that be 0?
for Teensy 3.2 GPIOD_PDIR becomes 0
for Teensy 3.6 GPIOD_PDIR becomes 255
Code
const...
@Frank B, Yeap you are right.
I need to read a few 8-bit values (from 8 GPIO pins) as fast as possible (e.g. 24 Mhz) & save in memory & process :)
@UhClem : Thanks for the tip!
@Frank B (#21):
Actually I am not really interested in pin toggling, but more on how fast I can read GPIO (e.g. how speedy digitalReadFast() is).
I just thought...
If I am correct GPIO access is at F_CPU speed, not F_BUS speed ... (If i recall right)
@ defragster
I use Teensy 3.1 @ 96 Mhz, just like as Frank B (Teensy 3.2 @ 96 Mhz)
CPU is T_3.1/3.2
F_CPU =96000000
ARDUINO =10801
F_PLL =96000000
F_BUS =48000000
F_MEM =24000000...
correction:
digitalWriteFast() is SINGLE CYCLE that is 96 Mhz (teensy @ 96 Mhz)
toggling which requires 2 digitalWriteFast() is ~ 48 Mhz.
So in Frank B's, 3 Mhz result, the performance is from...
Dear all, thanks for replying!
@Theremingenieur Yeap, i did not know loop() had such an overhead ...
Using registers is always faster, sure, but I recall Paul saying digitalWriteFast() could...
I am very interested in maximum GPIO speed for teensy 3 series.
I am aware from previous posts, that digitalWriteFast() can be extremely fast on teensy 3
I came across an interesting comparison...