動作
Feature #45
已結束Feature #58: 光源模組連接ESP32
光源模組連接ESP32_TCA6507 datasheet研讀
開始日期:
2023-09-25
完成日期:
2023-10-31
完成百分比:
100%
預估工時:
檔案
是由 宏益 廖 於 約 1 年 前更新
- 檔案 clipboard-202309291441-slgdu.png clipboard-202309291441-slgdu.png 已新增
- 檔案 clipboard-202309291441-cdaby.png clipboard-202309291441-cdaby.png 已新增
- 檔案 clipboard-202309291442-qfp6r.png clipboard-202309291442-qfp6r.png 已新增
*Datasheet¶
"強烈建議"還是自己讀過一遍datasheet,這樣對自己比較有幫助
Datasheet:
https://www.ti.com/lit/ds/symlink/tca6507.pdf?ts=1695970436803&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTCA6507%253Futm_source%253Dgoogle%2526utm_medium%253Dcpc%2526utm_campaign%253Dasc-int-null-44700045336317593_prodfolderdynamic-cpc-pf-google-tw_int%2526utm_content%253Dprodfolddynamic%2526ds_k%253DDYNAMIC%2BSEARCH%2BADS%2526DCM%253Dyes%2526gclid%253DCjwKCAjwyNSoBhA9EiwA5aYlb7JddEi5t0lPffNHRYaTY-DATnTsM2m6wT50RoShAkQ86KoaUz1-oRoCvgYQAvD_BwE%2526gclsrc%253Daw.ds¶
------------------------------------------------------------------------------------------------------------------------------------------------------------------¶
讀過datasheet之後發現要讓燈亮只需更改Select0、Select1、Select2三個暫存器(register)
------------------------------------------------------------------------------------------------------------------------------------------------------------------
且我們只需控制P1、P2、P3、P4四個腳位
------------------------------------------------------------------------------------------------------------------------------------------------------------------
所以我們只需做以下更改
即可將燈打開
¶
======================================================================================================¶
*結論¶
其實我們只需要改動Select2這個暫存器的值就可以控制燈的亮滅
亮:Select2 = 00011110 = 0x1E
滅:Select2 = 00000000 = 0x00¶
動作