Skip to main content
Skip table of contents

Timer#Config: IOType=43,45

Timer#Config, 4 Command Bytes: 

0

IOType=43,45, (47,49 U6 Only)

1

TimerMode

2

ValueLSB

3

ValueMSB

0 Response Bytes: 

 

 

This IOType configures a particular timer.

  • TimerMode: See the timer and counter documentation for more information about the available modes (U3/U6/UE9).

  • Value: The meaning of this parameter varies with the timer mode.

Example

PY
#This IOType configures a particular timer.

import u3
d = u3.U3()
d.debug = True
d.configIO(NumberOfTimersEnabled = 1)
# Sent:  [0x49, 0xf8, 0x3, 0xb, 0x42, 0x0, 0x1, 0x0, 0x41, 0x0, 0x0, 0x0]
# Response:  [0x57, 0xf8, 0x3, 0xb, 0x50, 0x0, 0x0, 0x0, 0x41, 0x0, 0xf, 0x0]
# {'NumberOfTimersEnabled': 1, 'TimerCounterPinOffset': 4, 'DAC1Enable': 0, 'FIOAnalog': 15, 'EIOAnalog': 0, 'TimerCounterConfig': 65, 'EnableCounter1': False, 'EnableCounter0': False}
d.getFeedback(u3.TimerConfig(timer = 0, TimerMode = 0, Value = 0))
# Sent:  [0x27, 0xf8, 0x3, 0x0, 0x2b, 0x0, 0x0, 0x2b, 0x0, 0x0, 0x0, 0x0]
# Response:  [0xfa, 0xf8, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]
# [None]
d.getFeedback(u3.TimerConfig(timer = 0, TimerMode = 0, Value = 65535))
# Sent:  [0x27, 0xf8, 0x3, 0x0, 0x29, 0x2, 0x0, 0x2b, 0x0, 0xff, 0xff, 0x0]
# Response:  [0xfa, 0xf8, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0]
# [None]
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.