74hc595: duk game da rikodin rikodin IC

El 74HC595 guntuKamar yadda aka cire shi daga sunansa, yanki ne wanda aka buga wanda ke aiwatar da kewaye na CMOS a ciki. Musamman, rajista ce ta canzawa. Ga waɗanda har yanzu ba su san waɗannan rijistar ba, asalinta keɓaɓɓiyar kewaya ce ta dijital, ma'ana, ƙimarta a cikin kayan aikin kawai ya dogara da ƙimar shigarwar da ƙimar da ta gabata.

Wannan ya bambanta su daga haɗuwa, cewa sakamakon kawai ya dogara da ƙimar shigarwar. Wannan rajistar ta kunshi jerin tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle-tsalle da umarnin agogo. Wadancan jujjuyawar ruwa sune abubuwan tunawa wannan yana riƙe ƙimar da ta gabata. Kowannensu yana adana ɗan abu kaɗan, daga sunansa, zaku iya yanke hukuncin cewa zai iya canza su. Ta hanyar tafiyar da ragowa daga wannan gefe zuwa wancan za mu iya yin ayyukan dijital mai ban sha'awa.

Nau'in rajista na Shift

Zane rajista zane

A cewar nau'in kaura cewa suna yi akan ragowar da suka adana, rajistar na iya zama nau'uka daban-daban. Suna da ikon motsawa hagu ko dama, wasu bias bi, amma umarnin shine abin da zai ƙayyade nau'in, koda kuwa a wasu halaye suma suna da alamun kasuwanci bisa la'akari da yadda abubuwan shiga da kayan haɓaka suke:

  • Jeri-Series: waɗanda kawai farkon jujjuyawar flop ɗin suke karɓar bayanai kuma suna zuwa a jere har sai an cika cikakken rajistar. Farshen jujjuyawar ƙarshe shine wanda ke haɗe kai tsaye zuwa fitarwa kuma ta hanyar wacce za a fita rijistar.
  • Layi daya-jerin: Ban rarar suna tafiya a layi ɗaya don adana su a lokaci guda a cikin duka juji, amma sai suka fita a jere. Ana iya amfani dasu don canzawa daga jerin zuwa layi ɗaya kuma akasin haka.
  • Jerin-layi daya: kwatankwacin na baya, duk abubuwan da ake fitarwa ana samun damarsu daga dukkan juji-juji a lokaci guda. Amma bayanan za su shiga kawai ta farkon jerin.
  • Daidaici-layi daya- Bayanai suna tafiya a layi daya kuma suna fita a layi daya.

Daga cikin sanannun da'irorin da muke da su 74HC595, 74HC164, 74HC165, 74HC194, da dai sauransu 194 din duniya ne, ana iya saita shi yadda muke so. A gefe guda kuma, muna da wasu masu son karkatarwa kamar 165 da 164, saboda haka yana motsawa zuwa hagu ko dama, kamar yadda aka ƙayyade tare da siginar sarrafa shugabanci, amma suna da tsari guda ɗaya kawai: abubuwan da ke shigowa daidai da fitowar silsilar, da kuma shigar da serial da layi daya fitarwa. bi da bi.

l298n
Labari mai dangantaka:
L298N: koyaushe don sarrafa injuna don Arduino

Menene rajistar motsi?

Me yasa zaka canza ragowa? Canjin rarar bayanai na iya zama mai amfani sosai. Reasonaya daga cikin dalilai shi ne cewa kuna buƙatar canza ƙimomin don takamaiman dalili. Amma kuma sauyawa ya haɗa da yin wasu ayyuka akan rarar da aka adana. Misali, sauya wasu guntun bits zuwa hagu kamar ninka su ne da 2. Canza su daidai yana daidai da rabasu da 2. Sabili da haka, yin yawaitawa da rarrabuwa suna iya zama masu amfani sosai ...

Hakanan ana amfani dasu don ƙirƙirar ƙididdigar ɓarna, don ƙididdiga masu zuwa da aka saba amfani dasu a cikin masu sauya analog / dijital, don jinkirta, da dai sauransu. Da amfani a dabaru dijital dijital abu ne gama gari, don haka ba sabon abu bane ayi amfani dasu a wani aikin.

74HC595 Fasali

74HC595 fil-fito

El 74HC595 shine madaidaiciyar IC. Rijista ne mai canzawa sau 8, ma'ana, yana da juzu'i 8 don adana rago 8. Ana iya ganin pin-out ko pin na wannan guntu a hoton da ke sama, tare da Vcc da GND don ƙarfi, sannan waɗanda aka yiwa alama kamar Q waɗanda sune bayanan. Sauran sun dace da siginan agogo / sarrafawa.

da shigarwa yana da shi a cikin jerin kuma fitarwa a layi daya. Sabili da haka, tare da shigarwa ɗaya, ana iya sarrafa waɗannan abubuwan 8 a lokaci guda. Zaku buƙaci fil uku kawai daga microcontroller da aka yi amfani da shi (misali: Arduino) don fitar da shi. Wadannan sune Latch, Clock da Data. Latch pin 13 ne a wannan yanayin, kodayake yana iya bambanta, don haka ya kamata ku nemi takaddun bayanan masana'anta. Agogo na iya zama 11 ko wasu, kuma bit din data 14 ne.

La alamar agogo zai ciyar da da'irar don sanin ƙwanƙwasa ko ririn da zai yi aiki da shi. Bayanin bayanan zai canza halin guntu. Misali, yayin canzawa daga LOW zuwa HIGH da samar da sabon bugun agogo ta hanyar mika agogo daga HIGH zuwa LOW, abin da aka cimma shine yin rikodin matsayin yanzu inda inda aka tsugunnar yake, ƙimar da wannan lambar data ta shiga. Idan kun maimaita wannan sau 8, to, za ku yi rikodin duk wurare 8 kuma ku sami adana baiti ɗaya (Q0-Q7).

Yi amfani da Arduino

Arduino tare da 74hc595

Don kara bayyana, watakila misali tare da Arduino Yana bayyana muku shi a cikin hanyar fahimta da zane fiye da fara ƙaddamar da bayanan madogara. Misali, zaka iya ƙirƙirar kewaya mai sauƙi tare da Arduino da rijistar sauya 74HC595 don yin wasa tare da wasu fitilu ko ledodi. Wani zaɓi mafi kyau kuma mafi sauƙi shine amfani da nuni na yanki 7 don karanta ƙimomin daga rijistar.

2n2222 transistor
Labari mai dangantaka:
2N2222 transistor: duk abin da kuke buƙatar sani

Hoton shine wanda zaku iya gani a hoton da ya gabata, da zarar an haɗa Arduino ta wannan hanyar tare da - 74HC595 da nuni, Ya rage kawai don tsara shi tare da Arduino IDE kuma za mu ga damar rajistar canjin. Lambar zata kasance mai zuwa, tare da jerin lambobin binary 0bxxxxxxxx, inda x ragowa:

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);
                }
}

Takardar bayanai

allon fil

A kasuwa zaku samu daban-daban kwakwalwan 74HC595 daga masana'antun daban. Ofayan su shine labarin kayan masarufi na Texas ko Ti, amma fa yadda yake, kowane mai ƙira zai ba ku takaddun bayanan don zazzagewa daga shafin yanar gizonta. Hakanan zaka iya samun wasu kamar ɗaya a ciki A SAUKAR Semikonductor, sparkfun, LMR, NXP, da dai sauransu


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga.

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.

Gwajin IngilishiGwada Catalantambayoyin spanish