Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
The T-Watch 2020 sound system | ||||||||
Changed: | ||||||||
< < | The t-watch has an integrated loudspeaker which is be driven by a MAX9835a ![]() | |||||||
> > | The t-watch has an integrated loudspeaker which is driven by a MAX9835a ![]() | |||||||
The MAX9835a uses I2S communication invented by Philips in the late 1980 ies for the transfer of digital sound samples. The protocol uses 3 signals:
| ||||||||
Line: 23 to 23 | ||||||||
Enabling the sound systemIn the t-watch the MAX9835a is powered through the AXP202 power manager and the power line to the sound chip must be enabled before using it. Here is the initialization procedure I use: | ||||||||
Changed: | ||||||||
< < | ||||||||
> > | | |||||||
from machine import Pin,I2S import ttgo from axp_constants import AXP202_VBUS_VOL_ADC1,AXP202_VBUS_CUR_ADC1,AXP202_BATT_CUR_ADC1,AXP202_BATT_VOL_ADC1 watch = ttgo.Watch() watch = watch tft = watch.tft power = watch.pmu power.adc1Enable(AXP202_VBUS_VOL_ADC1 | AXP202_VBUS_CUR_ADC1 | AXP202_BATT_CUR_ADC1 | AXP202_BATT_VOL_ADC1, True) watch.lvgl_begin() watch.tft.backlight_fade(100) print("enable power") watch.enable_audio_power() Mike Teachman's example programs with the power initialization added in, have been uploaded to https://github.com/uraich/twatch2020_firmware/tree/main/hardware/sound. ![]() |
Line: 1 to 1 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Added: | |||||||||||||||||||
> > |
The T-Watch 2020 sound systemThe t-watch has an integrated loudspeaker which is be driven by a MAX9835a![]()
The softwareWe use the I2S driver![]()
import machine.I2S Enabling the sound systemIn the t-watch the MAX9835a is powered through the AXP202 power manager and the power line to the sound chip must be enabled before using it. Here is the initialization procedure I use: from machine import Pin,I2Simport ttgo from axp_constants import AXP202_VBUS_VOL_ADC1,AXP202_VBUS_CUR_ADC1,AXP202_BATT_CUR_ADC1,AXP202_BATT_VOL_ADC1 watch = ttgo.Watch() watch = watch tft = watch.tft power = watch.pmu power.adc1Enable(AXP202_VBUS_VOL_ADC1 | AXP202_VBUS_CUR_ADC1 | AXP202_BATT_CUR_ADC1 | AXP202_BATT_VOL_ADC1, True) watch.lvgl_begin() watch.tft.backlight_fade(100) print("enable power") watch.enable_audio_power() Mike Teachman's example programs with the power initialization added in, have been uploaded to https://github.com/uraich/twatch2020_firmware/tree/main/hardware/sound. ![]() ![]() ![]() Comments |