Cov txheej txheem:

I2C Backlight Control ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc: 4 Kauj Ruam
I2C Backlight Control ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc: 4 Kauj Ruam

Video: I2C Backlight Control ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc: 4 Kauj Ruam

Video: I2C Backlight Control ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc: 4 Kauj Ruam
Video: Adjusting the LCD I2C Backlight Using 10k Variable || Control of an LCD Display 1602 / 2004 HD44780 2024, Hlis ntuj nqeg
Anonim
I2C Backlight Tswj ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc
I2C Backlight Tswj ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc
I2C Backlight Control ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc
I2C Backlight Control ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc
I2C Backlight Tswj ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc
I2C Backlight Tswj ntawm LCD Zaub 1602 /2004 lossis HD44780 Etc

Cov lus qhia no qhia koj li cas koj tuaj yeem tswj lub teeb pom kev ntawm lub LCD los ntawm I2C ADC module. Qhov sib txawv tuaj yeem tswj tau hauv tib txoj kev tom qab tshem lub zog txiav tawm

Kauj Ruam 1: Qhov xwm txheej uas twb muaj lawm

Qhov xwm txheej uas muaj
Qhov xwm txheej uas muaj
Qhov xwm txheej uas muaj
Qhov xwm txheej uas muaj

Lub teeb pom kev rov qab yog tswj los ntawm P3 ntawm PCF8574. P3 txuas nrog lub hauv paus ntawm lub transistor thiab qhov no rov ua dua nrog 4.7 Kohm resistor ntawm 5 volt. Duab 04 thiab 05.

Kauj ruam 2: Kev daws teeb meem

Tshuaj
Tshuaj
Tshuaj
Tshuaj
Tshuaj
Tshuaj
Tshuaj
Tshuaj

DAC, digital analog converter, MPC4725 uas tseem tuaj yeem tswj tau ntawm I2C, tam sim no kuv siv los tswj qhov ci ci. Duab 06.

Rau qhov no peb yuav tsum tau muag yam tsis tau tsuas yog 4.7 Kohm tsis kam. Duab 07 lub voj voog liab.

Tus qauv muaj kev sib txuas zoo ib yam li PIC thiab tuaj yeem raug muab txuas mus rau lub dav hlau pins. Duab 07.

Vim tias txhua tus qauv thiab cov arduino muaj rub tawm qhov kuv tau xiam lawv los ntawm DAC. Qhov no tuaj yeem ua tiav los ntawm khawb los ntawm kev sib txuas. Daim duab 08. Qhov no ua rau cov resistors los xoob los ntawm 5 volt. Duab 09.

Kuv tau txuas tus qauv nrog daim kab xev ob tog rau PCF8574 nti, Daim Duab 10, thiab kev sib txuas ua. Pic 11 thiab 12. Ib qho tshiab 4.7 Kohm resistor, uas yog qhov loj heev hauv kev sib raug zoo, txuas DAC cov zis nrog P3-puag txuas.

Tam sim no koj tuaj yeem tswj qhov ci ci los ntawm kev tswj DAC hla I2C.

Hauv kuv qhov xwm txheej ntawm 0, yuav luag tawm mus rau 700, siab kawg. Ib txoj haujlwm yooj yim los qhia txog kev ua haujlwm tau ntxiv.

Koj tuaj yeem siv qhov no hauv koj tus kheej cov cai kom koj tuaj yeem kho qhov ci ci rau koj tus kheej xav tau.

Kev qhib / tawm kev tswj hwm ntawm lub interface module txuas ntxiv ua haujlwm.

DAC tuav tus txheej txheem teeb tsa, yog li txawm tias tom qab rov pib dua qhov teeb tsa kawg tau khaws tseg.

Kauj ruam 3: Software

I2C chaw nyob yuav tsum tau teeb tsa kom raug. Kuv muaj 0x3F rau LCD zaub thiab 0x62 rau DAC raws li qhov chaw nyob. DAC yog 12 ntsis, yog li 4096 muaj peev xwm. Qhov no yog rau 0 rau 5 volts. Qhov no yog li yuav luag 1 mV ib ntsis. Dab tsi peb tam sim no tswj hwm yog lub hauv paus emitter voltage ntawm transistor thiab qhov no yog 0.6 txog 0.7 volts. Txoj hauv kev no tsuas yog ib feem me me uas muaj qhov cuam tshuam rau kev tswj lub teeb, tab sis nws muaj ntau tshaj li txaus. Peb xa los ntawm 4.7 Kohm resistor uas ib txwm dai ntawm 5 volts, yog li qhov siab tshaj plaws ntawm DAC tsis muaj teeb meem. Vim tias qhov hloov pauv tseem ceeb tsis tau hloov pauv, qhov qhib / kaw uas twb muaj lawm tuaj yeem ua haujlwm txuas ntxiv mus. Kev tswj hwm DAC yog software-based thiab koj yuav tsum suav nrog nws hauv cov cai thiab kho nws raws li koj tus kheej xav tau.

Ino cov ntaub ntawv yog cov ntawv xeem yooj yim.

Kauj Ruam 4: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim
Qhov tshwm sim

Nws tsis yog qhov yooj yim los ntes lub teeb hloov vim tias tus kws kho mob hloov kho.

Tab sis tseem muaj cov duab.

Lub ntsuas ntsuas qhia txog mA ntawm lub teeb pom kev.

Pom zoo: