Created
May 26, 2019 12:07
-
-
Save DavidLutton/7a2f8dd7d22b28f7961bc800ec443245 to your computer and use it in GitHub Desktop.
Set the source of a BG7TBL USB Signal Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://sigrok.org/wiki/BG7TBL | |
import serial | |
ser = serial.Serial('/dev/ttyUSB0', 57600, timeout=1) # Linux first tty | |
# ser.write(b'\x8fv') | |
# print("Version is " + ser.read()) | |
cmd = f'{int(1e9+26000/10):09d}' # ~ 1GHz | |
cmd = f'{int(0.140e9/10):09d}' | |
print(cmd.encode()) | |
ser.write(b"\x8f" + b"f" + cmd.encode()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment