LCDWIKI
1.54inihi OLED SSD1309 IIC Kōwae MC154GX Pukapuka Kaiwhakamahi
CR2022-MI4601
1.54inihi OLED SSD1309 IIC Kōwae
MC154GW&MC154GB
Pukapuka Kaiwhakamahi
Whakataki ki OLED
Ko te OLED he Diode Maama-Marama (OLED). Ko te hangarau whakaatu OLED te atangatages o te whakamarama-whaiaro, whanui viewi te koki, tata kore mutunga, iti te kohi hiko, tere tauhohenga teitei, papa ngawari, te whanui o te pāmahana, te hanganga ngawari me te tukanga, me etahi atu.
He rereke te whakaaturanga OLED mai i te whakaaturanga LCD tuku iho, ka taea e ia te whakamarama i a ia ano, na reira kaore e hiahiatia he rama whakamuri, na reira he whakaaturanga OLED.
He angiangi ake te whakaaturanga i te whakaaturanga LCD me te pai ake o te whakaaturanga.
Whakaahuatanga Hua
He 1.54″ te rahi o te kōwae OLED, ā, he 128x64 te whakataunga mo te pango me te ma, te pango me te puru. Ka tangohia e ia te aratau korero IIC me te IC taraiwa o roto ko SH1106.
Nga waahanga hua
- 1.54 inihi te mata OLED me te whakaatu pango me te ma, pango me te kikorangi ranei
- 128×64 taumira mo te whakaatu marama me te rereke teitei
- Nui viewkoki: nui ake i te 160° (kotahi te mata nui rawa atu viewkoki i te whakaaturanga)
- Vol whanuitage tuku (3V~5V), he hototahi ki nga taumata arorau 3.3V me 5V, kaore he maramara neke taumata e hiahiatia ana
- Ma te pahi IIC, he torutoru noa nga IO ka taea te whakamahi hei whakamarama i te whakaaturanga
- He iti rawa te whakapau hiko: ko te whakaaturanga noa ko te 0.06W anake (kei raro iho i te whakaaturanga TFT)
- Ko nga paerewa mahi a te ope hoia, he mahi pumau mo te wa roa
- Ka whakaratohia he taonga sampte kaupapa mo nga papaahi STM32, C51, Arduino
- Whakarato tautoko hangarau taraiwa
Tawhā Hua
| Ingoa | Whakaahuatanga |
| Whakaatu Tae | Pango ma / pango puru |
| SKU | MC154GW MC154GB |
| Rahi Mata | 1.54(inihi) |
| Momo | OLED |
| IC taraiwa | SSD309 |
| Whakatau | 128*64(Pika) |
| Atanga Kōwae | IIC atanga |
| Rohe Hohe | 35.052 × 17.516 (mm) |
| Momo Mata Pa | Kaore he mata pa |
| Paa IC | Kaore he IC pa |
| Rahi PCB kōwae | 42.40 × 38.00 (mm) |
| Koki tirohanga | >160° |
| Te Waahi Mahi | -20℃~60℃ |
| Paemahana Rokiroki | -30℃~70℃ |
| Mahinga Mahi Voltage | 3.3V / 5V |
| Whakamahi Hiko | TDB |
| Taumaha Hua(Me te takai) | 12(g) |
Whakaahuatanga Atanga


FAKATOKANGA:
- Ka tautokohia e tenei kōwae te whakawhiti wahitau taputapu pononga IIC (e whakaatuhia ana i te pouaka whero i te Pikitia 2), penei:
A. Whakakotahitia te parenga taha 0x78, momotuhia te taha 0x7A, ka kowhiri i te wahitau pononga 0x78 (taunoa);
B. Whakakotahitia te parenga taha 0x7A, momotuhia te taha 0x78, ka kowhiria te wahitau pononga 0x7A; - Ka hurihia e te taputapu te IIC mai i te wahitau kua whakaritea, me whakarereke ano te rorohiko. Mo te tikanga whakarereke motuhake, tirohia nga tohutohu whakarereketanga wahitau o te taputapu IIC e whai ake nei.
| Tau | Pin Module | Whakaahuatanga titi |
| 1 | GND | Papa hiko OLED |
| 2 | VCC | OLED mana pai (3.3V~5V) |
| 3 | SCL | OLED IIC pahi tohu karaka |
| 4 | SDA | OLED IIC pahi tohu raraunga |
| 5 | RES | Ko te tohu tautuhi OLED, te tautuhi taumata iti (He ara iahiko tautuhi kei te kōwae, ka taea te hiko me te tautuhi) |
Whirihoranga Pūmārō
Ko te ara iahiko taputapu o tenei kōwae e rima nga waahanga: te ara iahiko whakaatu OLED, te ara iahiko whakanui OLED, te ara iahiko whiriwhiri wahitau taputapu IIC, te atanga huinga titi, me te vol supply hiko.tage whakau ana iahiko.
Ko te ara iahiko mana whakaatu OLED te nuinga o te whakamahi hei whakahaere i te whakaaturanga OLED, tae atu ki te kowhiringa maramara, te tautuhi, te raraunga me te mana tuku whakahau.
Ka whakamahia te ara iahiko whiriwhiringa wahitau pononga IIC ki te kowhiri i nga wahitau pononga rereke.
Ka whakamahia te ara iahiko whakanui OLED ki te whakanui i te voli whakaurutage ki te OLED puia tuku ramatage.
Ka whakamahia te atanga huinga titi mo te hononga o waho o te poari whanaketanga mana matua.
Ko te tuku hiko voltagKa whakamahia te iahiko whakapumau mo te 3.3V voltage whakapumau ana i te tuku hiko.
Ko te kōwae OLED te whakamahi i te aratau korero IIC, ka whirihorahia te taputapu me nga titi e rua: SCL (IIC raraunga pine) me SDA (IIC karaka titi). Ka taea te whakaoti i te tuku raraunga IIC ma te whakahaere i enei titi e rua kia rite ki te wa mahi IIC.
Te kaupapa mahi
1. Whakataki ki SSD1309 Controller
Ko te SSD1309 he kaiwhakahaere OLED/PLED e tautoko ana i te taumira teitei o te 128*64 me te 1024-byte GRAM. Tautoko 8-bit 6800 me 8-bit 8080 whakarara pahi raraunga tauranga, tautoko hoki 3-waea me te 4-waea SPI pahi rangatū me I2C pahi. I te mea ko te mana whakarara me nui te maha o nga tauranga IO, ko te nuinga o te whakamahi ko te pahi rangatū SPI me te pahi I2C. E tautoko ana i te panuku poutū, ka taea te whakamahi i roto i nga taputapu kawe iti penei i nga waea pūkoro, nga kaitoro MP3 me etahi atu.
Ka whakamahia e te kaiwhakahaere SSD1309 te 1 bit hei whakahaere i te whakaaturanga pika, na ka taea e ia pika anake te whakaatu i te pango me te ma, te pango me te puru. Kua wehea te RAM kua whakaatuhia ki nga wharangi 8, me nga rarangi 8 mo ia wharangi me te 128 pika mo ia raina. I te wa e tautuhi ana i nga raraunga pika, me tohu koe i te wahitau wharangi i te tuatahi, katahi ka tohua te wahitau iti o te pou me te wahitau teitei o te pou, na reira me whakarite kia 8 nga pika ki te ahunga poutū i te wa ano. Kia taea ai te whakahaere ngawari i nga tohu pika ki tetahi waahi, ka whakatakoto tuatahi te rorohiko i te huinga ahua kotahi o te ao rite te rahi ki te RAM whakaatu, ka mapi tuatahi i nga raraunga tohu pika ki te huinga o te ao, ka whakamahia e te tukanga te OR ranei te mahi ki te whakarite kia tuhia te huinga o te ao i mua. Ko nga raraunga kaore i te kino, ka tuhia nga raraunga o te huinga o te ao ki te GRAM kia taea ai te whakaatu ma te OLED.
2. Whakataki ki te IIC Communication Protocol
Ko te tukanga tuhi raraunga i runga i te pahi IIC e whakaatuhia ana i te ahua e whai ake nei:
I muri i te tiimata o te pahi IIC, ka tukuna te wahitau taputapu pononga i te tuatahi. I muri i te whiwhinga i te whakautu taputapu taurekareka, ka tukuna he paita mana ki te whakamohio i te taputapu pononga mena ko nga raraunga ka tukuna atu he whakahau kua tuhia ki te rehita IC kua tuhia ranei. Ko nga raraunga RAM, i muri i te whiwhinga i te whakautu taputapu pononga, ka tukuna he uara o nga paita maha kia oti ra ano te tuku ka mutu te mahi a te pahi IIC.
i roto ia ratou:
C0=0: Ko te paita mana whakamutunga tenei, a ko nga paita raraunga katoa e tukuna ana e whai ake nei he paita raraunga katoa.
C0=1: Ko nga paita e rua ka tukuna ko te paita raraunga me tetahi atu paita mana.
D/C(—)=0: ko te paita mahi whakahau rehita
D/C(—)=1: paita mahi mo nga raraunga RAM
Ko nga hoahoa IIC timata me te whakamutu i te wa e whai ake nei:
I te wa e pupurihia ana te raina raraunga me te raina karaka o te IIC ki te taumata teitei, kei te noho noa te IIC. I tenei wa, ka huri te raina raraunga mai i te taumata teitei ki te taumata iti, a kei te noho tonu te raina karaka ki te taumata teitei, a ka timata te pahi IIC ki te tuku raraunga. I te wa e mau ana te raina karaka ki runga, ka huri te raina raraunga mai i te iti ki te teitei, ka mutu te pahi IIC ki te tuku raraunga.
Ko te hoahoa wa mo te IIC ki te tuku i te iti o nga raraunga e whai ake nei:
Ko ia karaka karaka (te tukanga o te toia teitei me te tohe iti) ka tuku 1 moka raraunga.
I te wa e teitei ana te raina karaka, me pumau tonu te raina raraunga, ka whakaaetia kia huri te raina raraunga ina iti te raina karaka.
Ko te hoahoa wa tuku ACK e whai ake nei:
I te wa e tatari ana te rangatira mo te ACK o te taurekareka, me mau tonu te raina karaka.
Ina tukuna e te pononga he ACK, kia iti te raina raraunga.
Nga tohutohu mo te whakamahi
1. Nga tohutohu Arduino
Nga tohutohu waea:
Tirohia te whakaahuatanga atanga mo nga taumahi titi.
Arduino UNO microcontroller whakamātautau hōtaka tohutohu waea
| Tau | Pin Module | He rite ki nga titi waea a te poari whanaketanga UNO |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | A5 |
| 4 | SDA | A4 |
| 5 | RES | Kaore he take ki te hono |
Arduino MEGA2560 microcontroller whakamātautau hōtaka tohutohu waea
| Tau | Pin Module | He rite ki nga titi waea a te poari whanaketanga UNO |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | 21 |
| 4 | SDA | 22 |
| 5 | RES | Kaore he take ki te hono |
Nga Mahi Mahi:
A. Honoa te kōwae OLED me te Arduino MCU kia rite ki nga tohutohu waea i runga ake nei, me te kaha;
B. Tīpakohia te exampe hiahia ana koe ki te whakamatautau, penei i raro nei:
(Tena koa tirohia te tuhinga whakamaarama i te hotaka whakamatautau mo te whakamaarama i te kaupapa whakamatautau)
C. Whakatuwheratia nga s kua tohuaampte kaupapa, whakahiato me te tango.
Ko nga tikanga mahi motuhake mo te kaupapa whakamatautau Arduino e whakawhirinaki ana ki te kape whare pukapuka, te whakahiato me te tango e whai ake nei:
http://www.lcdwiki.com/res/PublicFile/Arduino_IDE_Use_Illustration_EN.pdf
D. Mēnā ka whakaatu te kōwae OLED i ngā pūāhua me ngā whakairoiro i te nuinga o te wā, ka rere angitu te hōtaka;
2. STM32 tohutohu
Nga tohutohu waea:
Tirohia te whakaahuatanga atanga mo nga taumahi titi.
| Tau | Pin Module | He rite ki te STM32F103C8T6 te titi waea papa whanaketanga |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | PA5 |
| 4 | SDA | PA7 |
| 5 | RES | Kaore he take ki te hono |
STM32F103RCT6 morokoro whakahaere tohu tohu waea waea
| Tau | Pin Module | E rite ana ki te titi waea papa whanaketanga MiniSTM32 |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | PB13 |
| 4 | SDA | PB15 |
| 5 | RES | Kaore he take ki te hono |
STM32F103ZET6 tohu tohu waea hotaka whakamatautau moroiti
| Tau | Pin Module | E rite ana ki te titi waea papa whanaketanga Elite STM32 |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | PB13 |
| 4 | SDA | PB15 |
| 5 | RES | Kaore he take ki te hono |
STM32F407ZGT6 nga tohutohu moroiti mo te whakamatautau waea
| Tau | Pin Module | E rite ana ki te titi waea papa whanaketanga Explorer STM32F4 |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | PB3 |
| 4 | SDA | PB5 |
| 5 | RES | Kaore he take ki te hono |
STM32F429IGT6 morokoro whakahaere tohu tohu waea waea
| Tau | Pin Module | He rite ki te tohu waea a Apollo STM32F4/F7 |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | PF7 |
| 4 | SDA | PF9 |
| 5 | RES | Kaore he take ki te hono |
Nga Mahi Mahi:
A. Whakauruhia te waahanga LCD me te STM32 MCU kia rite ki nga tohutohu waea i runga ake nei, me te kaha;
B. Whakatuwherahia te raarangi kei reira te kaupapa whakamatautau STM32 ka tohua te exampkia whakamatauria, penei i raro nei:
(Tena koa tirohia te tuhinga whakamaarama i te hotaka whakamatautau mo te whakamaarama i te kaupapa whakamatautau)
C. Whakatuwherahia te kaupapa kaupapa whakamatautau kua tohua, whakahiato me te tango;
Ko te whakamaarama taipitopito mo te whakahiato hotaka whakamatautau STM32 me te tango ka kitea i roto i te tuhinga e whai ake nei:
http://www.lcdwiki.com/res/PublicFile/STM32_Keil_Use_Illustration_EN.pdf
D. Mēnā ka whakaatu te kōwae OLED i ngā pūāhua me ngā whakairoiro i te nuinga o te wā, ka rere pai te hōtaka;
3. C51 tohutohu
Nga tohutohu waea:
Tirohia te whakaahuatanga atanga mo nga taumahi titi.
STC89C52RC me STC12C5A60S2 nga tohutohu moroiti hotaka whakamatautau waea
| Tau | Pin Module | He rite ki te titi waea a te poari whanaketanga STC89/STC12 |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | P17 |
| 4 | SDA | P15 |
| 5 | RES | Kaore he take ki te hono |
Nga Mahi Mahi:
A. Whakauruhia te waahanga LCD me te C51 MCU kia rite ki nga tohutohu waea i runga ake nei, me te kaha;
B. Whakatuwherahia te whaiaronga kei reira te kaupapa whakamatautau C51 ka tohua te exampkia whakamatauria, penei i raro nei:
(Tena koa tirohia te tuhinga whakamaarama i te hotaka whakamatautau mo te whakamaarama i te kaupapa whakamatautau)
C. Whakatuwherahia te kaupapa kaupapa whakamatautau kua tohua, whakahiato me te tango;
Ko te whakamaarama taipitopito mo te whakahiato hotaka whakamatautau C51 me te tango ka kitea i roto i te tuhinga e whai ake nei:
http://www.lcdwiki.com/res/PublicFile/C51_Keil%26stc-isp_Use_Illustration_EN.pdf
D. Mēnā ka whakaatu te kōwae OLED i ngā pūāhua me ngā whakairoiro i te nuinga o te wā, ka rere angitu te hōtaka;
4. Nga tohutohu RaspberryPi
Nga tohutohu waea:
Tirohia te whakaahuatanga atanga mo nga taumahi titi.
FAKATOKANGA:
Ko te titi tinana e tohu ana ki te tohu tohu GPIO o te poari whanaketanga RaspBerry Pi.
E tohu ana te whakawaehere BCM ki te tohu tohu GPIO ina whakamahi ana i te whare pukapuka BCM2835 GPIO.
Ko te tohu WiringPi e tohu ana ki te tohu tohu GPIO ina whakamahi ana i te whare pukapuka wiringPi GPIO.
Ko tehea whare pukapuka GPIO e whakamahia ana i roto i te waehere, me whakamahi te whakamaarama titi i te waehere whare pukapuka GPIO e rite ana, tirohia te Pikitia 1 te tepu mahere GPIO mo nga taipitopito.
Raspberry Pi nga tohutohu waea hotaka whakamatautau
| Tau | Pin Module | E rite ana ki te pine waea a te poari whanaketanga |
| 1 | GND | GND (Pina tinana:6,9,14,20,25,30,34,39) |
| 2 | VCC | 5V/3.3V ( Pin tinana:1,2,4) |
| 3 | SCL | Pin tinana:5 Waehere BCM:3 WiringPi waehere:9 |
| 4 | SDA | Pin tinana:3 Waehere BCM:2 WiringPi waehere:8 |
Nga Mahi Mahi:
A. whakatuwheratia te mahi IIC o RaspberryPi
Takiuru ki te RaspberryPi ma te whakamahi i te taputapu kapeka rangatū (penei i te putty) ka uru ki te whakahau e whai ake nei: sudo raspi-config
Tīpakohia Kōwhiringa Atanga->I2C->ĀE
Tīmatahia te atekōkiri kernel I2C a RaspberryPi
B. tāuta te whare pukapuka mahi
Mo nga tikanga whakaurunga taipitopito o te bcm2835, wiringPi, me nga whare pukapuka mahi python o RaspberryPi, tirohia nga tuhinga e whai ake nei:
http://www.lcdwiki.com/res/PublicFile/Raspberrypi_Use_Illustration_EN.pdf
C. tīpakohia te exampKo nga mea e tika ana kia whakamatauria, penei i raro nei:
(Tena koa tirohia te tuhinga whakamaarama i te hotaka whakamatautau mo te whakamaarama i te kaupapa whakamatautau)
D. bcm2835 tohutohu
a) Honoa te kōwae OLED ki te papa whanaketanga RaspberryPi e ai ki nga waea waea i runga ake nei
b) Tāruahia te whaiaronga papatono whakamātautau Demo_OLED_bcm2835_IIC ki RaspberryPi (ka taea te kape ma te kaari SD, ma te taputapu FTP ranei (penei i FileZilla))
c) Whakahaerehia te whakahau e whai ake nei hei whakahaere i te kaupapa whakamatautau bcm2835:
cd Demo_OLED_bcm2835_IIC
hanga sudo ./ 1.54_IIC_OLED
Ka rite ki te whakaatu i raro nei:
E. wiringPi tohutohu
a) Honoa te kōwae OLED ki te papa whanaketanga RaspberryPi e ai ki nga waea waea i runga ake nei
b) Tāruahia te whaiaronga papatono whakamātautau Demo_OLED_ wiringPi _IIC ki te RaspberryPi (ka taea te kape ma te kaari SD, ma te taputapu FTP ranei (penei i FileZilla))
c) Whakahaerehia te whakahau e whai ake nei hei whakahaere i te kaupapa whakamatautau wiringPi:
cd Demo_OLED_ wiringPi _IIC
hanga
sudo ./ 1.54_IIC_OLED
Ka rite ki te whakaatu i raro nei:
Mena kei te hiahia koe ki te whakarereke i te tere whakawhiti IIC, me whakauru e koe nga mea e whai ake nei ki te /boot/config.txt file, ka whakaara ano i te raspberryPi , i2c_arm_baudrate=2000000 (kia mahara ano me hiahia ano te piko)
Ka rite ki te whakaatu i raro nei (ko te pouaka whero te ihirangi taapiri, ko te nama 2000000 te reeti kua whakaritea, ka taea te whakarereke):
F. nga tohutohu python
a) Me whakauru te whare pukapuka tukatuka whakaahua PIL i mua i te whakahaere i te kaupapa whakamatautau python. Ko te tikanga whakaurunga motuhake e whai ake nei:
http://www.lcdwiki.com/res/PublicFile/Python_Image_Library_Install_Illustration_EN.pdf
b) Honoa te kōwae OLED ki te papa whanaketanga RaspberryPi pera i te korero i runga ake nei.
c) Tāruahia te whaiaronga papatono whakamātautau Demo_OLED_python_IIC ki te RaspberryPi (ma te kaari SD, ma te taputapu FTP ranei (pērā i FileZilla))
d) Whakahaerehia te whakahau e whai ake nei hei whakahaere wehe i nga kaupapa whakamatautau python e toru:
cd Demo_OLED_python_IIC/puna
sudo python show_graph.py
sudo python show_char.py
sudo python show_bmp.py
Ka rite ki te whakaatu i raro nei:
5. MSP430 tohutohu
Nga tohutohu waea:
Tirohia te whakaahuatanga atanga mo nga taumahi titi.
| Tau | Pin Module | He rite ki te pine waea papa whanaketanga MSP430 |
| 1 | GND | GND |
| 2 | VCC | 5V/3.3V |
| 3 | SCL | P54 |
| 4 | SDA | P53 |
Nga Mahi Mahi:
A. Whakauruhia te waahanga LCD me te MSP430 MCU kia rite ki nga tohutohu waea i runga ake nei, me te kaha;
B. Whakatuwherahia te whaiaronga kei reira te kaupapa whakamatautau MSP430 ka tohua te exampkia whakamatauria, penei i raro nei:
(Tena koa tirohia te tuhinga whakamaarama i te hotaka whakamatautau mo te whakamaarama i te kaupapa whakamatautau)
C. Whakatuwherahia te kaupapa kaupapa whakamatautau kua tohua, whakahiato me te tango;
Ko te whakamaarama taipitopito mo te whakahiato hotaka whakamatautau C51 me te tango ka kitea i roto i te tuhinga e whai ake nei:
http://www.lcdwiki.com/res/PublicFile/IAR_IDE%26MspFet_Use_Illustration_EN.pdf
D. Mēnā ka whakaatu te kōwae OLED i ngā pūāhua me ngā whakairoiro i te nuinga o te wā, ka rere angitu te hōtaka;
Whakaahuatanga Raupaparorohiko
1. Hanganga Waehere
A. Arduino waehere hoahoanga whakaahuatanga
Ko te hanganga waehere e whakaatuhia ana i raro nei
Ko te waehere papatono whakamatautau a Arduino e rua nga waahanga: te whare pukapuka U8glib me te waehere tono.
Kei roto i te whare pukapuka U8glib te maha o nga whirihoranga IC mana, te nuinga o te kawenga mo nga rehita whakahaere, tae atu ki te whakaurunga o nga taputapu taputapu, te raraunga me te whakawhiti whakahau, nga taunga pika me nga tautuhinga tae, te whirihoranga aratau whakaatu, aha atu.
He maha nga whakamatautau kei roto i te tonoamples, he rereke nga momo whakamatautau kei roto i ia waahanga. Ka whakamahia e ia te API e whakaratohia ana e te whare pukapuka U8glib, ka tuhi etahi o nga whakamatautauamples, me te whakatinana i etahi ahuatanga o te mahi whakamatautau.
B. C51 , STM32 me MSP430 whakaahuatanga hoahoanga waehere
Ko te hanganga waehere e whakaatuhia ana i raro nei:
Ko te waehere Demo API mo te wa whakahaere kaupapa matua kei roto i te waehere whakamatautau;
Ko te arawhitinga OLED me te tauranga parallel parallel parallel write data operations kei roto i te waehere OLED;
Ko nga tohu tuhi, nga raina, nga whakairoiro, me nga mahi e pa ana ki te whakaatu kiripuaki Hainamana me te reo Ingarihi kei roto i te waehere GUI;
Ko te mahi matua ka whakatinana i te tono kia rere;
He rereke te waehere papaa ma ia turanga;
Ko te timatanga o te IIC me nga mahi e pa ana ki te whirihoranga kei roto i te waehere IIC;
C. Whakaahuatanga hoahoanga waehere RaspberryPi
Ko te hoahoanga waehere papatono whakamatautau python e whakaatuhia ana i raro nei:
Ko te kaupapa whakamatautau python engari ko tetahi waahanga: PIL whare pukapuka tukatuka whakaahua, waehere arataki OLED, whakamatautau sampte waehere
Ko te whare pukapuka tukatuka whakaahua a PIL te kawenga mo te tuhi whakaahua, te ahua me nga mahi whakaatu tuhinga, aha atu.
Ko te waehere arawhiti OLDE te kawenga mo te whakahaere i nga rehita, tae atu ki te arawhitinga waahanga taputapu, te raraunga me te whakawhiti whakahau, nga taunga pika me nga tautuhinga tae, te whirihoranga aratau whakaatu, aha atu.
Ko te whakamatautau exampKo te whakamahi i te API e whakaratohia ana e nga waahanga e rua o runga ake o te waehere hei whakatinana i etahi mahi whakamatautau.
Ko te bcm2835 me te wiringPi te hoahoanga waehere kaupapa whakamatautau he penei:
Ko te waehere Demo API mo te wa whakahaere kaupapa matua kei roto i te waehere whakamatautau;
Ko te whakaurunga OLED me nga mahi e pa ana kei roto i te waehere OLED;
Ko nga tohu tuhi, nga raina, nga whakairoiro, me nga mahi e pa ana ki te whakaatu kiripuaki Hainamana me te reo Ingarihi kei roto i te waehere GUI;
Ko te whare pukapuka GPIO e whakarato ana i nga mahi GPIO;
Ko te mahi matua ka whakatinana i te tono kia rere;
He rereke te waehere papaa ma ia turanga;
Ko te timatanga o te IIC me nga mahi e pa ana ki te whirihoranga kei roto i te waehere IIC;
2. Whakaahuatanga whakamaramatanga GPIO
A. Arduino whakamātautau hōtaka GPIO whakamāramatanga whakamāramatanga
Ko te kaupapa whakamatautau Arduino e whakamahi ana i te mahi IIC taputapu, a kua whakaritea te GPIO.
B. STM32 hōtaka whakamātautau GPIO whakamāramatanga whakamāramatanga
Ko te kaupapa whakamatautau STM32 e whakamahi ana i te mahi rorohiko whaihanga IIC, a ka whakanohoia te whakamaramatanga GPIO ki te iic.h file, e whakaatuhia ana i te ahua e whai ake nei:
Ko OLED_SDA me OLED_SCL ka taea te tautuhi hei GPIO mangere.
C. C51 te hōtaka whakamātautau GPIO whakamāramatanga whakamāramatanga
Ko te kaupapa whakamatautau C51 e whakamahi ana i te mahi rorohiko whaihanga IIC, a ka whakanohoia te whakamaramatanga GPIO ki te iic.h file, e whakaatuhia ana i te ahua e whai ake nei:
Ko OLED_SDA me OLED_SCL ka taea te tautuhi hei GPIO mangere.
D. RaspberryPi hōtaka whakamātautau GPIO whakamāramatanga whakamāramatanga
Ko te kaupapa whakamatautau RaspberryPi e whakamahi ana i te mahi IIC taputapu, a kua whakaritea te GPIO.
E. MSP430 hōtaka whakamātautau GPIO whakamāramatanga whakamāramatanga
Ko te kaupapa whakamatautau MSP430 e whakamahi ana i te mahi rorohiko whaihanga IIC, a ka whakanohoia te whakamaramatanga GPIO ki te iic.h file, e whakaatuhia ana i te ahua e whai ake nei:
Ko OLED_SDA me OLED_SCL ka taea te tautuhi hei GPIO mangere
3. IIC whakakē wāhitau pūrere pononga
A. Arduino whakamātautau hōtaka IIC whakarerekētia i wāhitau pūrere
Ko te wahitau taputapu pononga o IIC kua tautuhia i te u8g_com_arduino_ssd_i2c.c file, e whakaatuhia ana i te ahua i raro nei:
Whakakē tika I2C_SLA(taunoa ko 0x3c*2).Mo exampNa, huri ki te 0x3d*2, katahi ko te wahitau pononga IIC ko 0x3d*2
B. STM32 me C51 hōtaka whakamātautau IIC whakarerekētia i wāhitau pūrere
Ko te wahitau taputapu pononga o te STM32 me C51 te kaupapa whakamatautau IIC kua tautuhia i roto i te iic.h file, e whakaatuhia ana i te ahua e whai ake nei:
Whakakē tika IIC_SLAVE_ADDR (taunoa ko 0x78).Mo example, huri ki 0x7A, ka ko te wahitau pononga IIC ko 0x7A.
C. RaspberryPi hōtaka whakamātautau IIC whakarerekētia i te wāhitau pūrere
Ko te wāhitau pononga o bcm2835 me wiringPi hōtaka whakamātautau IIC kua tautuhia i roto i te iic.h file, e whakaatuhia ana i te ahua e whai ake nei:
Whakatikatika IIC_SLAVE_ADDR(taunoa ko 0x3C (e rite ana ki te 0x78)).
Mo te example, huri ki te 0x3D, katahi ko te wahitau pononga IIC ko 0x3D (e rite ana ki te 0x7A);
Ko te wahitau taputapu pononga o te kaupapa whakamatautau python IIC kua tautuhia i roto i te oled.py file, e whakaatuhia ana i te ahua e whai ake nei:
Whakakē tika IIC_SLAVE_ADDR(taunoa ko 0x3C (e rite ana ki te 0x78)):
Mo te exampme, huri ki te 0x3D, katahi ko te wahitau pononga IIC ko 0x3D (e rite ana ki te 0x7A)
D. MSP430 te kaupapa whakamatautau IIC i whakarerekehia mai i te wahitau taputapu
Ko te wahitau taputapu pononga o te kaupapa whakamatautau MSP430 IIC kua tautuhia i roto i te iic.h file, e whakaatuhia ana i te ahua e whai ake nei:
Whakakē tika IIC_SLAVE_ADDR (taunoa ko 0x78).Mo example, huri ki 0x7A, ka ko te wahitau pononga IIC ko 0x7A.
4. Te whakatinanatanga waehere korero IIC
A. Arduino te kaupapa whakamatautau IIC te whakatinana waehere korero
Ko te kaupapa whakamatautau Arduino Ko te waehere whakawhitiwhiti IIC ka whakatinanahia e U8glib, ko te tikanga whakatinana motuhake ka taea te korero ki te waehere U8glib
B. STM32 te kaupapa whakamatautau IIC te whakatinana waehere korero
Ko te kaupapa whakamatautau STM32 Ko te waehere korero IIC ka whakatinanahia i roto i te iic.c (he rereke nga rereketanga i waenga i nga whakatinanatanga MCU rereke), penei i te ahua e whai ake nei:
C. C51 te kaupapa whakamatautau IIC te whakatinana waehere korero
Ka whakatinanahia te kaupapa whakamatautau C51 IIC waehere korero i roto i te iic.c, penei i raro nei:
A. RaspberryPi te kaupapa whakamatautau IIC te whakatinana waehere korero
Ka whakatinanahia te kaupapa whakamatautau wiringPi IIC waehere korero ki iic.c, penei i raro nei:
Karanga tuatahi IIC_init ki te arawhiti, whakaturia te wahitau pononga IIC, tikina te taputapu IIC file whakaahua, ka whakamahi i te taputapu IIC file Kaituhi hei tuhi i te whakahau rehita me nga raraunga mahara.
Ko te bcm2835 te kaupapa whakamatautau IIC waehere whakawhitiwhiti ka whakatinanahia ki iic.c, penei i raro nei:
Karanga tuatahi IIC_init ki te arawhiti, whakaturia te wahitau pononga IIC, tikina te taputapu IIC file whakaahua, ka whakamahi i te taputapu IIC file Kaituhi hei tuhi i te whakahau rehita me nga raraunga mahara.
Ka whakatinanahia te kaupapa whakamatautau Python IIC waehere korero ki oled.py, penei i raro nei:
Tuatahi waea atu ki a SMBus mo te arawhiti, katahi ka waea atu ki te mahi write_byte_data hei tuhi i te whakahau rehita me nga raraunga mahara.
D. MSP430 te kaupapa whakamatautau IIC te whakatinana waehere korero
Ko te kaupapa whakamatautau MSP430 Ko te waehere korero IIC kua whakatinanahia ki iic.c, penei i raro nei:


Pūmanawa noa
Ko tenei huinga whakamatautau exampme whakaatu te Hainamana me te reo Ingarihi, nga tohu me nga pikitia, na reira ka whakamahia te rorohiko modulo PCtoLCD2002. I konei, ka whakamaramahia te whakatakotoranga o te rorohiko modulo mo te kaupapa whakamatautau anake. Ko nga tautuhinga rorohiko modulo PCtoLCD2002 e whai ake nei:
Ko te whakatakotoranga ira matrix ka kowhiria te Waehere pouri te aratau modulo ka kowhiri i te aratau ahu whakamua (Me whiriwhiri te kaupapa whakamatautau C51 me te MSP430 i te taupatupatu)
Tangohia te tauira ki te whiriwhiri i te ahunga (turanga teitei tuatahi) (Me whiriwhiri te kaupapa whakamatautau C51 me MSP430 whakamuri (turanga iti i te tuatahi))
Ka tohua e te punaha tau huanga te tau hautekauono
Whakaritenga whakatakotoranga whiriwhiringa C51
Ko te tikanga tautuhinga motuhake e whai ake nei:
http://www.lcdwiki.com/Chinese_and_English_display_modulo_settings 
Tuhinga / Rauemi
![]() |
LCD wiki MC154GX 1.54inihi IIC OLED Kōwae [pdf] Pukapuka Kaiwhakamahi MC154GX 1.54inihi IIC OLED Kōwae, MC154GX, 1.54inihi IIC OLED Kōwae, IIC OLED Kōwae, OLED Kōwae |
