-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
enhancementNew feature or requestNew feature or requestxbee change neededA change to XBee firmware is needed to close this outA change to XBee firmware is needed to close this out
Description
Changing the value of a Pin with the pin method is extremely slow. It takes about 2.5 ms (!) to change the pin output level. A 0/1 burst then has a frequency of 200 Hz.
Other micropython port are in the range of 1-4 µs, 1000 times faster.
Is there any way to speed this slow pace?
Test code:
from machine import Pin
p1 = Pin("D1", Pin.OUT, value=1)
def run():
global p1
p = p1
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
p.value(0);p.value(1)
run()
SWoto
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestxbee change neededA change to XBee firmware is needed to close this outA change to XBee firmware is needed to close this out