O‘ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI Telekommunikatsiya texnologiyalari fakulteti 416-19 guruh talabasi Aytbaeva Shohistaning O'rnatilgan tizimlar fanidan tayyorlagan 2-topshiriq Bajardi: 416-19 guruh talabasi Aytbaeva Shohista Tekshirdi:Xoldorov Sh Toshkent 2022 1-vazifa. RGB-yorug‘lik diodi orqali jarayonlarni boshqarish. Kerakli komponentlar: Quyida keltirilgan kerakli komponentlar va elementlar virtual platformada mavjud va ulardan foydalaniladi. Tinkercad.com Arduino UNO kontrolleri-1 ta ; sxemani yig‘ish uchun plata-1 ta ; Temperatura datchigi-1 ta ; 220 om qarshilik-1ta ; RGB-svetodiod-3ta ; aloqa simlari. Nazariy qism RGB rang modeli qo'shimcha rang modelidir , unda qizil , yashil va ko'k asosiyyorug'likranglari ranglarning keng doirasini yaratish uchun turli usullar bilan birlashtiriladi . Modelning nomi qizil, yashil va ko'k rangdagi uchta asosiy rangning bosh harflaridan kelib chiqqan. RGB rang modelining asosiy maqsadi televizorlar va kompyuterlar kabi elektron tizimlardagi tasvirlarni sezish, tasvirlash va namoyish qilishdir, garchi u an'anaviy fotografiyada ham ishlatilgan .RGB - bu qurilmaga bog'liq rang modeli: turli qurilmalar ma'lum RGB qiymatini boshqacha aniqlaydi yoki ko'paytiradi, chunki rang elementlari (masalan, fosfor yoki bo'yoqlar ) va ularning qizil, yashil va ko'k darajalariga munosabati ishlab chiqaruvchidan ishlab chiqaruvchiga farq qiladi, yoki hatto vaqt o'tishi bilan bir xil qurilmada. Laboratoriya ishini bajarish tartibi: Biz temperaturadatchigiyordamida RGB svetodiodiniyonishiniboshqaramiz.Laboratoriya ishini bajarish uchun asosiy 3 ta qadamda amalgaoshiramiz. 1-qadam. Bu qadamda laboratoriya ishini amaliyotda qo’llash uchun elektron sxemasi chizamiz (1.2-chizmada keltirilgan). 1.2-chizma. Temperaturadatchigini ulashningelektronsxemasi. 3-qadam. Laboratoriyaishining strukturaviy va electron sxemasi Tinkercad.com platformasida ishni emulatsion formasinixosil qilamiz(1.3-chizma). yordamida 1.3chizma.Temperatura datchigini ulashning emulatsion holati. Biz Arduino ning oyoqchalarini chiqish kabi ishlatamiz, shuning uchun uni o‘zgartirish kerak bo‘ladi, buning uchun kontrollerga quyidagi tegishli buyruq beriladi. } 1.4-chizma. Temperatura datchigini ulashning kod qismini kiritish. int pinRed = 11; int pinGreen = 10; int pinBlue = 9; int pinPotRed = A0; int pinPotGreen = A1; int pinPotBlue = A2; int potRed = 0; int potGreen = 0; int potBlue = 0; void setup() { pinMode(pinRed, OUTPUT); pinMode(pinGreen, OUTPUT); pinMode(pinBlue, OUTPUT); } void loop() { potRed = analogRead(pinPotRed) / 4; // Получает результат из потенциометра (насколько выкручен). Делим на 4, так как значение от 0 до 1023, а интенсивность цвета можно менять от 0 до 255. potGreen = analogRead(pinPotGreen) / 4; potBlue = analogRead(pinPotBlue) / 4; analogWrite(pinRed, potRed); использовать интенсивность цвета // Замена digitalWrite, только можно analogWrite(pinGreen, potGreen); analogWrite(pinBlue, potBlue); } Yig’ilgan sxemani quyidagi havola orqali ko’rishingiz mumkin: https://www.tinkercad.com/things/1gwvmjTCPv3-powerfulesboo/editel?sharecode=99Jeru6z3tj-nqRlyEMV1FOjK2-HhehLDxJyv94lbMQ Xulosa. Ushbu laboratoriya ishida biz potentsial, LEDning yorqinligini o'zgartirish (MK Arduino yordamida) kabi tushunchalar bilan tanishdik. Bundan tashqari, potansiyometrni aylantirib, nurliledlar sonini o'zgartirdi va RGB LEDni ishlatdi. 2-vazifa. Bir razryadli yetti segmetli indicator orqali jarayonlarni ifodalash. Kerakli komponentlar: Quyida keltirilgan kerakli komponentlar va elementlar virtual platformada mavjud va ulardan foydalaniladi. Tinkercad.com Arduino UNO kontrolleri-1 ta ; sxemani yig‘ish uchun plata-1 ta; aloqa simlari. 500 om qarshilik-2 ta 7 segmentliindikator- 1ta Микросервопривод -1 ta Nazariyqism Etti segmentlidispley o'nlik raqamlarni ko'rsatish uchun elektron displey qurilmasi shakli bo'lib, murakkabroq nuqta matritsali displeylarga muqobildir . Etti segmentli displeylar raqamli soatlar , electron hisoblagichlar, asosiy kalkulyatorlar va raqamli ma'lumotlarni aks ettiruvchi boshqa electron qurilmalarda keng qo'llaniladi . Laboratoriya ishini bajarish tartibi: Biz Arduiono Uno yordamida 7-segmentli indikatordaraqamlarhosilqilamizva shunga mos mikroservoni aylanishini boshqaramiz. Laboratoriya ishini bajarish uchun asosiy 3 ta qadamda amalga oshiramiz. 1-qadam. Laboratoriya ishini bajarish uchun ulanish sxemasi tashkil qilamiz. Birinchi navbatda quyidagistrukturaviy sxema chiziladi (1.1-chizmada keltirilgan). 1.1-chizma. 7-segmantli indikatorniulashningsxemasi. 2-qadam. Bu qadamda laboratoriya ishini amaliyotda qo’llash uchun elektron sxemasi chizamiz (1.2-chizmada keltirilgan). 1.2-chizma. 7-segmantli indikatorningelektronsxemasi. 3-qadam. Laboratoriyaishiningstrukturaviyvaelektronsxemasiyordamida Tinkercad.com platformasidaishniemulatsionformasixosilqilinadi (1.3-chizma). 1.3-chizma. 7-segmantli indikatorrni ulashningemulatsionholati. .Biz7-segmantli indikatordaketma-ketraqamlarhosilqilamiz, shunga mosmikroservoniaylanishini ham boshqaramiz.Buninguchun kontrollerga quyidagi tegishli buyruq beriladi. #include <Servo.h> Servo servo_10; unsigned const int A = 13; unsigned const int B = 12; unsigned const int C = 11; unsigned const int D = 10; unsigned const int E = 9; unsigned const int F = 8; unsigned const int G = 7; unsigned const int H = 6; void setup(void) { pinMode(A, OUTPUT); pinMode(B, OUTPUT); pinMode(C, OUTPUT); pinMode(D, OUTPUT); pinMode(E, OUTPUT); pinMode(F, OUTPUT); pinMode(G, OUTPUT); pinMode(H, OUTPUT); servo_10.attach(2, 500, 2500); } void zero(void) { digitalWrite(A, LOW); digitalWrite(B, HIGH); digitalWrite(C, HIGH); digitalWrite(D, HIGH); digitalWrite(E, HIGH); digitalWrite(F, HIGH); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void one(void) { digitalWrite(A, LOW); digitalWrite(B, LOW); digitalWrite(C, LOW); digitalWrite(D, HIGH); digitalWrite(E, LOW); digitalWrite(F, LOW); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void two(void) { digitalWrite(A, HIGH); digitalWrite(B, LOW); digitalWrite(C, HIGH); digitalWrite(D, HIGH); digitalWrite(E, HIGH); digitalWrite(F, HIGH); digitalWrite(G, LOW); digitalWrite(H, LOW); } void three(void) { digitalWrite(A, HIGH); digitalWrite(B, LOW); digitalWrite(C, HIGH); digitalWrite(D, HIGH); digitalWrite(E, LOW); digitalWrite(F, HIGH); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void four(void) { digitalWrite(A, HIGH); digitalWrite(B, HIGH); digitalWrite(C, LOW); digitalWrite(D, HIGH); digitalWrite(E, LOW); digitalWrite(F, LOW); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void five(void) { digitalWrite(A, HIGH); digitalWrite(B, HIGH); digitalWrite(C, HIGH); digitalWrite(D, LOW); digitalWrite(E, LOW); digitalWrite(F, HIGH); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void six(void) { digitalWrite(A, HIGH); digitalWrite(B, HIGH); digitalWrite(C, HIGH); digitalWrite(D, LOW); digitalWrite(E, HIGH); digitalWrite(F, HIGH); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void seven(void) { digitalWrite(A, LOW); digitalWrite(B, LOW); digitalWrite(C, HIGH); digitalWrite(D, HIGH); digitalWrite(E, LOW); digitalWrite(F, LOW); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void eight(void) { digitalWrite(A, HIGH); digitalWrite(B, HIGH); digitalWrite(C, HIGH); digitalWrite(D, HIGH); digitalWrite(E, HIGH); digitalWrite(F, HIGH); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void nine(void) { digitalWrite(A, HIGH); digitalWrite(B, HIGH); digitalWrite(C, HIGH); digitalWrite(D, HIGH); digitalWrite(E, LOW); digitalWrite(F, HIGH); digitalWrite(G, HIGH); digitalWrite(H, LOW); } void loop(void) { servo_10.write(0); zero(); delay(1500); one(); servo_10.write(20); delay(1000); two(); servo_10.write(40); delay(1000); three(); servo_10.write(60); delay(1000); four(); servo_10.write(80); delay(1000); five(); servo_10.write(100); delay(1000); six(); servo_10.write(120); delay(1000); seven(); servo_10.write(140); delay(1000); eight(); servo_10.write(160); delay(1000); nine(); servo_10.write(180); delay(1000); } 1.4-chizma. 7 segmentliindikatorni ulashningkodqisminikiritish. Yig’ilgansxemaniquyidagihavolaorqaliko’rishingizmumkin: https://www.tinkercad.com/things/ipZUHOwvzzR-2topshiriq/editel?sharecode=iNEAfSvLbDwvueTLsTnjeDOga0TXnQ4TwK8xUbAgCNA Xulosa: Men ushbutopshiriqnibajarishdavomida 7 segmentliindikatordaraqamlarhosilqilishnio’rgandim.Topshiriqnibajarishdavomidamikroservonia ylanishini ham boshqardim. Mikroservoningaylanishi 7 segmentliindikatordagiraqamgamosravishdaaylantirdim. 3-vazifa. 8x8 yorug’ikdiodlimatritsadajarayonlarniifodalash. Keraklikomponentlar: Quyidakeltirilgankeraklikomponentlarvaelementlar platformadamavjudvaulardanfoydalaniladi. Tinkercad.com Arduino UNO kontrolleri-1 ta ; virtual sxemani yig‘ish uchun plata-1 ta; 8x8 yorug’likdiodi - 1ta ; aloqa simlari. Nazariyqism Nuqta - matritsalidispley busoatlar, kalkulyatorlarvacheklangano'lchamdagioddiyalfanumerikdispleyqurilmasini talab qiluvchiboshqako'plabqurilmalarkabimashinalarhaqidagima'lumotlarniaksettiruvchi arzonnarxlar dagielektronraqamli displeyqurilmasi . Displeyto'rtburchaklarkonfiguratsiyadajoylashtirilganyorug'likyokimexanikko'rsatkichlarning nu qtamatritsasidan iborat , shundayqilibtanlanganchiroqlarniyoqishyokio'chirishorqalimatnyokigrafiklarniko'rsatishmumkin . Nuqta matritsalikontrollerprotsessordanolinganko'rsatmalarnikeraklidispleyhosilbo'lishiuchunmatritsad agiindikatorelementlariniyoqadiganyokio'chiradigansignallargaaylantiradi. Laboratoriya ishini bajarish tartibi: Biz 8x8 matritsaliyorug’likdiodi yordamida sxemani yig’ib olamiz.Laboratoriya ishini bajarish uchun asosiy 3 ta qadamda amalgaoshiramiz. 1-qadam. Bu qadamda laboratoriya ishini amaliyotda qo’llash uchun elektron sxemasi chizamiz (1.2-chizmada keltirilgan). 1.2-chizma.8x8 matritsaliyorug’likdiodiningelektronsxemasi. 2-qadam. Laboratoriyaishiningstrukturaviyvaelektronsxemasiyordamida Tinkercad.com platformasidaishniemulatsionformasixosilqilinadi (1.3-chizma). 1.3-chizma.8x8 matritsaliyorug’likdiodini ulashningemulatsionholati. 8x8 matritsaliyorug’likdiodidaanimatsiyahosilbo’lishiuchunquyidagichakodyozamiz. #define ROW1 13 #define ROW2 12 #define ROW3 11 #define ROW4 10 #define ROW5 9 #define ROW6 8 #define ROW7 7 #define ROW8 6 #define COL1 5 #define COL2 4 #define COL3 3 #define COL4 2 #define COL5 A4 #define COL6 A3 #define COL7 A2 #define COL8 A1 const int row[] = {ROW1, ROW2, ROW3, ROW4, ROW5, ROW6, ROW7, ROW8}; const int col[] = {COL1,COL2, COL3, COL4, COL5, COL6, COL7, COL8}; int SH[8][8]= {{1,1,1,1,1,1,1,1}, {1,0,0,0,0,1,0,1}, {1,0,1,1,0,1,0,1}, {1,0,1,1,0,1,0,1}, {1,0,0,0,0,0,0,1}, {1,1,1,0,0,1,0,1}, {1,0,0,0,0,1,0,1}, {1,1,1,1,1,1,1,1}}; int O[8][8] = {{1,1,1,1,1,1,0,1}, {1,1,0,0,0,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,0,0,0,1,1}, int X[8][8] = {{1,1,1,1,1,1,1,1}, {1,1,0,1,1,0,1,1}, {1,1,1,0,0,1,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,1,1,1,1,1,1}}; {1,1,0,1,1,0,1,1}, {1,1,1,1,1,1,1,1}}; int S[8][8] = {{1,1,1,1,1,1,1,1}, {1,1,0,0,0,0,1,1}, {1,1,0,1,1,1,1,1}, {1,1,0,1,1,1,1,1}, {1,1,0,0,0,0,1,1}, {1,1,1,1,1,0,1,1}, {1,1,0,0,0,0,1,1}, {1,1,1,1,1,1,1,1}}; int T[8][8] = {{1,1,1,1,1,1,1,1}, {1,0,0,0,0,0,0,1}, {1,1,1,0,0,1,1,1}, {1,1,1,0,0,1,1,1}, {1,1,1,0,0,1,1,1}, {1,1,1,0,0,1,1,1}, {1,1,1,0,0,1,1,1}, {1,1,1,1,1,1,1,1}}; int A[8][8] = {{1,1,1,1,1,1,1,1}, {1,1,0,0,0,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,0,0,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,0,1,1,0,1,1}, {1,1,1,1,1,1,1,1}}; void setup() { Serial.begin(9600); for (int i = 2; i <= 13; i++) { pinMode(i, OUTPUT); digitalWrite(i, LOW); } pinMode(A1, OUTPUT); digitalWrite(A1, LOW); pinMode(A2, OUTPUT); digitalWrite(A2, LOW); pinMode(A3, OUTPUT); digitalWrite(A3, LOW); pinMode(A4, OUTPUT); digitalWrite(A4, LOW); } void loop() { delay(1000); yaz(SH); delay(1000); yaz(O); delay(1000); yaz(X); delay(1000); yaz(S); delay(1000); yaz(T); delay(1000); yaz(A); delay(1000); } void yaz(int matrix[8][8]){ for (int c=0; c<8; c++){ digitalWrite(col[c], HIGH); for (int r = 0; r < 8; r++){ digitalWrite(row[r], 255*matrix[r][c]); delay(1); } for (int r = 0; r < 8; r++){ digitalWrite(row[r], HIGH); delay(1); } digitalWrite(col[c], LOW); }}} 1.4-chizma. 8x8 ga matritsaliyorug’likdiodini ulashningkodqisminikiritish. Yig’ilgansxemaniquyidagihavolaorqaliko’rishingizmumkin: https://www.tinkercad.com/things/5zbF5dOjuEW-franticdensor/editel?sharecode=9p9zkEE4YOvYGJ_EJXaOLvhfdXHFpgG19fjkNFalky8 Xulosa: Men ushbutopshiriqnibajarishdavomida matritsaliyorug’likdiodiniulashnio’rgandim.Topshiriqnibajarishdavomida matritsaliyorug’likdiodidaanimatsiyahosilqildim. 8x8 8x8