Support 12M and 55M oscillators

Depending on the voltage of IO15, different crystal oscillators are supported.
IO15: 0V → 9.216M
IO15: 1V  → 12M
IO15: 2V  → 55.466M
IO15: (2V~3.3V]  → 4M
This commit is contained in:
ohmytime
2024-01-27 20:59:07 +08:00
parent de83b31f4e
commit 13aa84722e
4 changed files with 39 additions and 1 deletions

View File

@@ -50,6 +50,22 @@ const unsigned char tuner_init_tab9216[] PROGMEM = {
2, 0xff, 100,
};
const unsigned char tuner_init_tab12000[] PROGMEM = {
3, 0x14, 0x00, 0x01,
2, 0xff, 50,
9, 0x40, 0x04, 0x01, 0x00, 0xB7, 0x1B, 0x00, 0x00, 0x00,
5, 0x40, 0x05, 0x01, 0x00, 0x01,
2, 0xff, 100,
};
const unsigned char tuner_init_tab55000[] PROGMEM = {
3, 0x14, 0x00, 0x01,
2, 0xff, 50,
9, 0x40, 0x04, 0x01, 0x03, 0x4E, 0x5A, 0xAE, 0x00, 0x01,
5, 0x40, 0x05, 0x01, 0x00, 0x01,
2, 0xff, 100,
};
bool Tuner_WriteBuffer(unsigned char *buf, uint16_t len) {
Wire.beginTransmission(0x64);
for (uint16_t i = 0; i < len; i++) Wire.write(buf[i]);