El I-chip ye-74HC595Njengoko icacisiwe kwigama layo, isekethe eprintiweyo esebenzisa isekethe ye-CMOS ngaphakathi. Ngokukodwa, irejista yokutshintsha. Kulabo abangazaziyo ezi rejista, ngokusisiseko isekethe yedijithali elandelelanayo, oko kukuthi, amaxabiso aso kwimveliso axhomekeke nje kumaxabiso egalelo kunye namaxabiso angaphambili agciniweyo.
Oko kwahlulahlula kwiindibaniselwano, ukuba iziphumo zixhomekeke kwixabiso lokufaka. Le rejista yenziwe ngothotho lwe-D-uhlobo lweflip-flops okanye i-flip-flops eyalelwe ngumqondiso wewotshi. Abo iiflipsi ziinkumbulo ezigcina ixabiso langaphambili. Nganye igcina kancinci kwaye, kwigama layo, unokuqonda ukuba inokubasusa. Ngokusebenzisa iibits ukusuka kwelinye icala ukuya kwelinye sinokwenza imisebenzi enomdla yedijithali.
Iindidi zerejista yeShift
Ngokutsho kwe uhlobo lokufuduka abakwenzayo kwiibhithi abazigcinayo, iirejista zinokuba ziindidi ezahlukeneyo. Bayakwazi ukuhambisa ngasekhohlo okanye ngasekunene, abanye banamacala amabini, kodwa iodolo yiyo eya kuthi ichonge uhlobo, nokuba kunjalo kwezinye iimeko zikhathalisiwe ngokusekwe kwindlela yegalelo neziphumo:
- Uthotho lweeNqaku: ezo ekuthi kuphela i-flip-flop yokuqala ifumane idatha kwaye ziya kuthotho de kugcwaliswe irejista epheleleyo. I-flip-flop yokugqibela yile idityaniswe ngokuthe ngqo kwimveliso kwaye irejista iya kukhutshwa kuyo.
- Uthotho-manqaku: iibits zingena ngokudibeneyo ukuze zigcinwe ngaxeshanye kuzo zonke iiflops, kodwa emva koko ziyaphuma zilandelelana. Zingasetyenziselwa ukuguqula ukusuka kuthotho ziye kuthi ga ngokufanayo.
- Uthotho-Olufanayo: efanayo neyangaphambili, zonke iziphumo ziyafikeleleka ngaxeshanye kuzo zonke iiflops. Kodwa idatha iya kungena kuphela kowokuqala kuthotho.
- UkufanaIdatha ihamba ngokuhambelana kwaye iphuma ngokuhambelana.
Phakathi kweesekethe ezaziwa kakhulu esinazo 74HC595, 74HC164, 74HC165, 74HC194njl. I-194 yeyendalo iphela, inokuqwalaselwa ngendlela esifuna ngayo. Kwelinye icala, sinazo ezinye izinto eziya kumacala amabini anje nge-165 kunye ne-164, ke ngoko iya ngasekhohlo okanye ekunene, njengoko kuchaziwe ngophawu lolawulo kodwa banolungelelwaniso olunye: amagalelo afanayo kunye nokukhutshelwa ngokulandelelana, kunye nokufakelwa ngokulandelelana kunye nokufana ngokulandelanayo.
Yintoni irejista yokutshintsha?
Kutheni ushiya iibits? Ukutshintsha iinkcukacha zeedatha kunokuba luncedo kakhulu. Isizathu esinye kukuba kufuneka uhambise amaxabiso ngenjongo ethile. Kodwa ukutshintsha kubandakanya ukwenza eminye imisebenzi kwiibhithi ezigciniweyo. Umzekelo, ukuhambisa iseti yeebits ngasekhohlo kufana nokuphindaphinda ngo-2. Ukuzihambisa ngasekunene kufana nokwahlula-hlula ngo-2. Ke ngoko, ukwenza ukuphinda-phinda kabini kunye nokwahlulahlula kunokuba luncedo kakhulu ...
Zikwasetyenziselwa ukuvelisa amaxabiso okonyuka okungaqondakaliyo, ukulungiselela uqikelelo olusetyenziswa ngokubanzi kwisiguquli seanalog / digital, ukulibazisa, njl. Ukusetyenziswa kwi iingcinga zemijikelezo yedijithali Kuqhelekile, ke akunqabile ukuba uzisebenzise kwiprojekthi ethile.
Iimpawu ze74HC595
El I-74HC595 yi-IC ethe tye. Yirejista yokutshintsha eyi-8-bit, oko kukuthi, ineeflipsi eziyi-8 zokugcina iibits ezisibhozo. Ukuphuma okanye izikhonkwane zale chip kunokubonwa kumfanekiso ongentla, kunye neVcc kunye ne-GND yamandla, emva koko ezo ziphawulwe njenge-Q eziyidatha. Eminye iyahambelana newotshi / imiqondiso yolawulo.
Las igalelo linalo kuthotho kunye nemveliso ngokuhambelana. Ke ngoko, ngegalelo elinye, ezi ziphumo zisibhozo zingalawulwa ngaxeshanye. Uzakufuna kuphela izikhonkwane ezintathu kwi-microcontroller esetyenzisiweyo (umzekelo: Arduino) ukuyiqhuba. Ezo ziLatch, iwotshi kunye nedatha. I-Latch yi-pin 8 kule meko, nangona inokwahluka, ke kuya kufuneka unxibelelane nedatha yakho yomenzi. Iwotshi inokuba li-13 okanye ezinye, kwaye isuntswana ledatha li-11.
La uphawu lwewotshi iya kondla isekethe ukumisela ukubetha okanye isingqisho apho iya kusebenza khona. Iziphumo zedatha ziya kutshintsha indlela yokuziphatha kwe-chip. Umzekelo, xa utshintsha ukusuka ku-LOW ukuya ku-HIGH kwaye uvelisa ukubetha kwewotshi entsha ngokudlula kwewotshi ukusuka ku-HIGH ukuya ku-LOW, okuphunyeziweyo kukurekhoda indawo yangoku apho ukufuduka kubekwe khona, ixabiso elifakwe yile pin yedatha. Ukuba uyaphinda-phinda la maxesha asi-8, emva koko uyakurekhoda zonke iindawo ezi-8 kwaye ugcine i-byte enye (Q0-Q7).
Sebenzisa kunye neArduino
Ukwenza icace gca, mhlawumbi umzekelo noArduino Icacisa kuwe ngendlela enomdla ngakumbi kunye nemizobo kunokuba uqale ukumilisela idatha yethiyori. Umzekelo, unokwenza isekethe elula ngeArduino kunye ne-74HC595 irejista yokutshintsha ukuze udlale ngezibane okanye ii-LED. Olunye ukhetho olungcono nolulula kukusebenzisa umboniso wecandelo le-7 ukufunda amaxabiso kwirejista.
Umzobo ngowona unokuwubona kumfanekiso ongaphambili, nje ukuba iArduino idityaniswe ngaloo ndlela kunye 74HC595 kunye nomboniso, Kuhleli kuphela ukuyicwangcisa nge-Arduino IDE kwaye siza kubona amathuba erejista yokutshintsha. Ikhowudi iya kuba yile ilandelayo, kunye noluhlu lweekhowudi ze-binary 0bxxxxxxxx, apho i-x bits:
const int latchPin = 8; // Pin conectado al Pin 12 del 74HC595 (Latch) const int dataPin = 9; // Pin conectado al Pin 14 del 74HC595 (Data) const int clockPin = 10; // Pin conectado al Pin 11 del 74HC595 (Clock) int i =0; const byte numeros[16] = { 0b11111100, 0b01100000, 0b11011010, 0b11110010, 0b01100110, 0b10110110, 0b10111110, 0b11100000, 0b11111110, 0b11100110, 0b11101110, 0b00111110, 0b10011100, 0b01111010, 0b10011110, 0b10001110 }; void setup() { Serial.begin(9600); pinMode(latchPin, OUTPUT); pinMode(clockPin, OUTPUT); pinMode(dataPin, OUTPUT); } void loop() { for (i=0;i<16;i++) { delay(1000); digitalWrite(latchPin, LOW); shiftOut(dataPin, clockPin, LSBFIRST, numeros[i]); digitalWrite(latchPin, HIGH); } }
Ishiti yedatha
Kwimarike uya kuyifumana Iichips ezahlukeneyo ezingama-74HC595 ezivela kubavelisi abohlukeneyo. Enye yazo ziintsomi zeTexas Instruments okanye iTi, kodwa makube njalo, umenzi ngamnye kufuneka akunike iphepha ledatha lokukhuphela kwiwebhusayithi yayo esemthethweni. Unokufumana ezinye ezinje nge KWI-Semiconductor, i-sparkfun, STMicroelectronics, NXP, njl.