4 Laboratoriya ishi Mavzu: 8x8 yoruglik diodli matritsani Arduino da boshqarish Pezonurlatgich. Pezonurlatgichni boshqarish: tonni ozgartirish, davomiyligini ozgartirish. Tranzistorning kuchaytirish xususiyatini namoyish etish




Download 14,93 Kb.
bet1/3
Sana13.01.2024
Hajmi14,93 Kb.
#136692
  1   2   3
Bog'liq
4 Laboratoriya ishi Mavzu 8x8 yoruglik diodli matritsani Arduin-fayllar.org


4 Laboratoriya ishi Mavzu: 8x8 yoruglik diodli matritsani Arduino da boshqarish Pezonurlatgich. Pezonurlatgichni boshqarish: tonni ozgartirish, davomiyligini ozgartirish. Tranzistorning kuchaytirish xususiyatini namoyish etish

4 Laboratoriya ishi
Mavzu:8x8 yoruglik diodli matritsani Arduino da boshqarish Pezonurlatgich. Pezonurlatgichni boshqarish: tonni ozgartirish, davomiyligini ozgartirish. Tranzistorning kuchaytirish xususiyatini namoyish etish. Elektroyuritgich misolida aylanishini ozgartirish
Ishdan maqsad: Arduino platformasida 8x8 LED matritsasida foydalanib,ma’lumotlarni namoyish qilish imkoniyatini o’rganish. Ushbu tajribada biz Arduinoning 3 pimidan foydalanib, bir nechta pimlarni boshqarishga imkon beradigan bir nechta 74HC595 chiplarini kaskadlash usulini ko'rib chiqamiz, bu 8 × 8 LED matritsasining ekranida raqamlarni ko'rsatish misolida namoyish etiladi. Kerakli komponentlar:
•Arduino UNO R3 platformasi;
•prototip tayyorlash uchun maket;
•8 × 8 matritsali RGB;
•74HC595 mikrosxemasi - 2 dona;
•Ulash uchun simlar.
Yorug’lik diodlaridan ma'lum tartibda joylashtirilgan va pinlar
o'rnatish uchun qulay tartibda joylashgan matritsa bilan tanishib
chiqamiz. Yorug’lik diodlaridan yig’ilgan matritsa bitta rangli, ikki
rangli va RGB-da mavjud.
Tajribada biz ikkita rangli yorug’lik diodlaridan yig’ilgan matritsasidan
foydalanamiz FYM-23881BUG-11, bu 8 × 8 matritsada yig'ilgan 64 ta
yashil yorug’lik diodlar to'plamidir. Matritsa pimlarining sxemasi 10.1-
rasmda keltirilgan.

10.1-rasm. FYM matritsasi pin out - 23881 BUG-11


LED matritsasini Arduino-ga ulash uchun biz 2 ta 74HC595
mikrosxemasining kaskadli ulanishidan foydalanamiz. Ushbu ulanish
bilan birinchi registrdan bitlar kaskaddagi keyingi registrga suriladi.
Birinchi registrning QH 'pinini DS (MOSI) piniga ulashingiz kerak.
Bolalar sxemasi 10.2-rasmda keltirilgan.
int tDelay = 100;

int latchPin = 11; // (11) ST_CP [RCK] on 74HC595


int clockPin = 9; // (9) SH_CP [SCK] on 74HC595
int dataPin = 12; // (12) DS [S1] on 74HC595
byte leds = 0;

/* The most common method of using 74CH595


* lctchPin->LOW : Begin transmitting signals.
* shiftOut(dataPin, clockPin, bitOrder, value)
* dataPin: the pin on which to output each bit. Allowed data types: int.
* clockPin: the pin to toggle once the dataPin has been set to the correct value. Allowed data types: int.
* bitOrder: which order to shift out the bits; either MSBFIRST or LSBFIRST. (Most Significant Bit First, or, Least Significant Bit First).
* value: the data to shift out. Allowed data types: byte.
* lctchPin->HIch : The end of the transmission signal.
*/
void updateShiftRegister()
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, leds);
digitalWrite(latchPin, HIGH);
}
void setup()

{
pinMode(latchPin, OUTPUT);


pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
}
void loop()

{
//Turn off all led


leds = 0;
updateShiftRegister();
delay(tDelay);
//Create a for loop:i 0 through 7 have gradually increased
for (int i = 0; i < 8; i++)
{
//turn on the led with the i transform
bitSet(leds, i);
updateShiftRegister();
delay(tDelay);
}
}
#include "LedControl.h"
/*
Now we need a LedControl to work with.

Download 14,93 Kb.
  1   2   3




Download 14,93 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



4 Laboratoriya ishi Mavzu: 8x8 yoruglik diodli matritsani Arduino da boshqarish Pezonurlatgich. Pezonurlatgichni boshqarish: tonni ozgartirish, davomiyligini ozgartirish. Tranzistorning kuchaytirish xususiyatini namoyish etish

Download 14,93 Kb.