Christmas lights notes

By: wardr

2014-12-09 21:28:51

PySerial will tell you that the following baud rates are supported:
(50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, 3500000, 4000000)

But it's lies, all lies!!  Well, some lies.  The fact of the matter is that by default the Raspberry Pi baud clock is set to 3 MHz, and the smallest baudrate divisor is 16, leading to a maximum baud rate of 187500, well below our target.  To remedy the situation we need to increase the base clock.  In order to do this, edit /boot/config.txt and add the following line:

init_uart_clock 100000000

100 MHz makes for a nice 2 Mbaud divisor of 50.

Back to archive index