Files
Z8C-Homebrew-Computer/Utility/baudcal.py
Dennis Gunia d18e8e9e69 pushed updates
2024-06-24 09:21:16 +02:00

18 lines
266 B
Python

crystal=1843200/16 # in HZ
baudlist=[
9600,
19200,
38400,
57600,
115200,
230400,
460800,
921600
]
for baud in baudlist:
prescaler=int(crystal/baud)
print(baud)
print(prescaler)
print(bin(prescaler).replace("0b", ""))