High speed analogread & digitalwrite?
i working on project device 2 receives light pattern device 1. device 2 needs give feedback of led light within 1us. currently, going use arduino our platform. however, according reference, analogread function , digitalwrite function takes 100us , 8us separately, way long our system.
so there way can shorten digitalwrite , analogread function within 500ns?
any appreciated,
terry
so there way can shorten digitalwrite , analogread function within 500ns?
any appreciated,
terry
quote
within 500ns?you can write constant value constant port in 125ns, using "direct port manipulation", adc requires 65 microseconds full-accuracy conversion., , there's no way you're going read external adc in 1us. (now, if sampling time larger, can start conversion, , maybe read actual register , digitalwrite within microsecond, difficult (the avr arduino execute fewer 16 instructions per microsecond...)
it's impossible using arduino functions.
Arduino Forum > Using Arduino > Programming Questions > High speed analogread & digitalwrite?
arduino
Comments
Post a Comment