Arduino LCD Kullanımı
Arduino ile LCD kullanımına örnek. Devre gayet basit. LCD parlaklığını ayarlamak için 5-10kohm luk potansiyometre kullanabilirsiniz.
DEVRE ŞEMASI:
/* 16x2, 20x4 vb karakter LCD'lerde metin görüntülemek için temel Arduino örnek kodu.*/
// Kütüphaneyi dahil ediyoruz:
#include <LiquidCrystal.h>
// Bir LCD nesnesi oluşturuyoruz. Parametreler: (RS, E, D4, D5, D6, D7):
LiquidCrystal lcd = LiquidCrystal(2, 3, 4, 5, 6, 7);
void setup() {
// LCD'nin sütun ve satır sayısını belirtiyoruz. 20x4 LCD için (20, 4) olarak değiştirin:
lcd.begin(16, 2);
}
void loop() {
// İmleci üçüncü sütuna ve ilk satıra konumluyoruz, (0'dan başlar):
lcd.setCursor(2, 0);
// Cümleyi yazdırıyoruz 'Selam!':
lcd.print("Selam!");
// İmleci üçüncü sütuna ve ikinci satıra konumlandırıyoruz:
lcd.setCursor(2, 1);
// Cümleyi yazdırıyoruz 'LCD deneme':
lcd.print("LCD deneme");
}
HEX KODLARI: (lcdardu.hex dosyası içeriği)
:100000000C945D000C9485000C9485000C94850084
:100010000C9485000C9485000C9485000C9485004C
:100020000C9485000C9485000C9485000C9485003C
:100030000C9485000C9485000C9485000C9485002C
:100040000C9467020C9485000C9485000C94850038
:100050000C9485000C9485000C9485000C9485000C
:100060000C9485000C94850000000008000201003B
:100070000003040700000000000000000000000072
:10008000250028002B0000000000240027002A0083
:10009000040404040404040402020202020203032E
:1000A0000303030301020408102040800102040836
:1000B00010200102040810202B0311241FBECFEFD3
:1000C000D8E0DEBFCDBF11E0A0E0B1E0E2EAF6E0AB
:1000D00002C005900D92AE31B107D9F721E0AEE133
:1000E000B1E001C01D92AF33B207E1F710E0CDE5FA
:1000F000D0E004C02197FE010E944903CC35D1070E
:10010000C9F70E94B1020C944F030C94000090E0D8
:10011000FC01EC55FF4F249180579F4FFC018491C7
:10012000882399F090E0880F991FFC01EA57FF4F50
:10013000A591B491FC01E458FF4F859194918FB73C
:10014000F894EC91E22BEC938FBF0895AF92BF929D
:10015000CF92DF92EF92FF920F931F93CF93DF9393
:100160006C017B018B01040F151FEB015E01AE18C2
:10017000BF08C017D10759F06991D601ED91FC91E4
:100180000190F081E02DC6010995892B79F7C50111
:10019000DF91CF911F910F91FF90EF90DF90CF9063
:1001A000BF90AF90089590E0FC01E859FF4F249173
:1001B000FC01EC55FF4F3491FC01E057FF4FE491F7
:1001C000EE23C9F0222339F0233001F1A8F42130C5
:1001D00019F1223029F1F0E0EE0FFF1FE458FF4F34
:1001E000A591B4918FB7F894EC91611126C0309528
:1001F0003E233C938FBF08952730A9F02830C9F0E3
:10020000243049F7809180008F7D03C08091800069
:100210008F7780938000DFCF84B58F7784BDDBCF6D
:1002200084B58F7DFBCF8091B0008F778093B00035
:10023000D2CF8091B0008F7DF9CF3E2BDACF0895D9
:1002400090E080E00895CF93DF93EC0160E08E8131
:100250000E94D30061E08E810E94D30060E08E8115
:100260000E94D3008BE891E00197F1F7DF91CF91E5
:100270000895CF92DF92EF92FF920F931F93CF9347
:10028000DF936C017C0187E0E80EF11CD0E0C0E058
:10029000062F10E0B8010C2E02C0759567950A94E0
:1002A000E2F76170F70181917F010E94D3002196EE
:1002B000C430D10579F7C601DF91CF911F910F911D
:1002C000FF90EF90DF90CF900C942301CF92DF92BC
:1002D000EF92FF920F931F93CF93DF93EC01F62ED3
:1002E000642F8C810E94D3008D818F3F19F060E0D4
:1002F0000E94D3000F2D10E08F8584FF25C06E0172
:1003000087E0C80ED11CF12CE12CB8010E2C02C0E4
:10031000759567950A94E2F76170F60181916F0116
:100320000E94D300FFEFEF1AFF0A88E0E816F104FD
:1003300061F7CE01DF91CF911F910F91FF90EF9068
:10034000DF90CF900C942301B80184E075956795F8
:100350008A95E1F7CE010E9439016F2DCE01DF9120
:10036000CF911F910F91FF90EF90DF90CF900C9461
:10037000390140E0682F87E291E00C946601CF9349
:10038000DF93823029F49091360198609093360182
:1003900080933A0110923B0180E480933C0180E11C
:1003A00080933D0180E580933E0180912B010E9466
:1003B000870080912C018F3F11F00E94870080916F
:1003C0002D010E948700C7E2D1E09E0127523140F3
:1003D0008091360184FD0AC084E090E021962817C0
:1003E00039073CF48E810E948700EFCF88E090E0CF
:1003F000F5CF8BE39DE00197F1F760E080912B0151
:100400000E94D30060E080912D010E94D300809172
:100410002C018F3F19F060E00E94D30080913601DB
:1004200084FD39C063E087E291E00E943901CBE4AA
:10043000D6E4CE010197F1F763E087E291E00E94F4
:1004400039012197F1F763E087E291E00E943901D9
:1004500083E592E00197F1F762E087E291E00E9484
:1004600039018091360180620E94B90184E0809355
:1004700037018CE00E94B90181E00E94B9018BE351
:100480009FE10197F1F782E08093380186E0DF91E8
:10049000CF910C94B90180620E94B9018BE496E47B
:1004A0000197F1F78091360180620E94B90183E5DE
:1004B00092E00197F1F78091360180620E94B901C4
:1004C000D0CF41E00E94660181E090E008951F9244
:1004D0000F920FB60F9211242F933F938F939F93F8
:1004E000AF93BF938091230190912401A0912501A6
:1004F000B09126013091220123E0230F2D3758F5CA
:100500000196A11DB11D2093220180932301909398
:100510002401A0932501B093260180911E019091A2
:100520001F01A0912001B09121010196A11DB11DD3
:1005300080931E0190931F01A0932001B09321018D
:10054000BF91AF919F918F913F912F910F900FBECF
:100550000F901F90189526E8230F0296A11DB11D3C
:10056000D2CF789484B5826084BD84B5816084BD27
:1005700085B5826085BD85B5816085BD80916E0041
:10058000816080936E001092810080918100826072
:1005900080938100809181008160809381008091AF
:1005A00080008160809380008091B100846080939E
:1005B000B1008091B00081608093B00080917A009A
:1005C000846080937A0080917A00826080937A00C0
:1005D00080917A00816080937A0080917A008068AF
:1005E00080937A001092C10082E00E94BF01C0E0B7
:1005F000D0E0E1E080913A018111E0E0E195F0E0A6
:10060000E95DFE4F84898E5F80680E94B90146E0F3
:1006100050E06CE071E087E291E00E94A600E0917A
:100620003A01E230B0F4E150F0E0E95DFE4F848938
:100630008E5F80680E94B9014AE050E063E171E09A
:1006400087E291E00E94A600209799F20E940000A4
:10065000D0CFE1E0E9CFE7E2F1E01382128284E05B
:1006600091E09183808382E084838FEF858383E0B0
:10067000868384E0878385E0808786E0818787E0C2
:1006800082871386148615861686178681E00C9459
:10069000BF01EE0FFF1F0590F491E02D0994F8942F
:0206A000FFCF8A
:1006A200000000006102A60020011F0153656C6179
:0E06B2006D21004C43442064656E656D65004B
:00000001FF
KULLANILAN PROGRAMLAR: Arduino 1.8.10, Proteus 8 Professional
Yorumlar
Yorum Gönder