Muhammad al Xorazmiy nomidagi
Toshkent Axborot Texnologiyalari Universiteti
Telekommunikatsiya texnologiyalari fakulteti
413-20 guruh talabasi
Hilola Hakimovaning
O’rnatilgan tizimlar fanidan tayyorlagan
1-amaliy mashg’ulot
Bajardi: Hakimova H.
Tekshirdi: Qobilov S.
O’rnatilgan tizimlar fanidan o’tilgan lobaratoriya ishlari bo’yicha 2-laboratoriya mashg’ulot.
Har bir talabaga biriktirilgan suruvchi registr mikrosxemasi yordamida LED chiroqlarini yoqish sxemasini va dasturini Tinkercad platformasida simulyatsiyasini bajarish va 4 razryadli matrisani boshqarish.
Namuna:
Harakat, yorug’lik, gaz, ovoz va h.k. sensor datchiklaridan foydalangan xolda ma’lum jarayonni avtomatlashtirish sxemasini Tinkercad platformasida simulyatsiya qilish va dsturini tuzish.
Namuna:
Bajarilgan lobaratoriya ishlarini himoya qilish.
1-topshiriq (21-variant) CD4511
// C++ code
//
int dataPin = 9;
int latchPin = 10;
int clockPin = 11;
int pwmPin = 6;
void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(pwmPin, OUTPUT);
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, B111);
digitalWrite(latchPin, HIGH);
}
void loop() {
for (int i=0; i<256; i++) {
analogWrite(pwmPin,i);
delay(2);
}
}
2-topshiriq
// C++ code
int buttonState =0;
void setup()
{
pinMode (2, INPUT);
pinMode (LED_BUILTIN, OUTPUT);
}
void loop ()
{
buttonState = digitalRead(2);
if (buttonState == HIGH)
{
digitalWrite (LED_BUILTIN, HIGH);
}
else{
digitalWrite (LED_BUILTIN, LOW);
}
delay(10);
}
Do'stlaringiz bilan baham: |