MMP Cvičenie 3: Rozdiel medzi revíziami
Zo stránky SensorWiki
Bez shrnutí editace |
Bez shrnutí editace |
||
Riadok 3: | Riadok 3: | ||
* 2x16 Parallel LCD [http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/lcd2x16par.pdf datasheet] | * 2x16 Parallel LCD [http://www.parallax.com/Portals/0/Downloads/docs/prod/audiovis/lcd2x16par.pdf datasheet] | ||
* Stamp Works - pp. 73 and more [http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf] | * Stamp Works - pp. 73 and more [http://www.parallax.com/Portals/0/Downloads/docs/books/sw/Web-SW-v2.1.pdf] | ||
[[Obrázok:Acrob_LCD_Schematic.png|center]] | |||
Zdrojáky | Zdrojáky | ||
Riadok 8: | Riadok 10: | ||
* Knižnica pre prácu s LCD zapojeným podľa obrázku - [[AVR lcd.c|lcd.c]], [[AVR lcd.h|lcd.h]] | * Knižnica pre prácu s LCD zapojeným podľa obrázku - [[AVR lcd.c|lcd.c]], [[AVR lcd.h|lcd.h]] | ||
<source lang="c"> | |||
#include "lcd.h" | |||
int main(void) | |||
{ | |||
unsigned char znak; | |||
lcdInit4(); | |||
lcdControlWrite(1<<LCD_CLR); | |||
for(znak='A';znak<'E';znak++) | |||
lcdDataWrite(znak); | |||
lcdControlWrite(0x40+0x80); | |||
for(znak='F';znak<'Q';znak++) | |||
lcdDataWrite(znak); | |||
while (1); | |||
return 0; | |||
} | |||
</source> | |||
Arduino: | Arduino: | ||
* [http://www.arduino.cc/en/Tutorial/LCDLibrary LCD Library] | * [http://www.arduino.cc/en/Tutorial/LCDLibrary LCD Library] |
Verzia z 11:46, 4. október 2010
- Nuts & Volts: Demystifying Character Based LCDs
- Hitachi 44780 Driver
- 2x16 Parallel LCD datasheet
- Stamp Works - pp. 73 and more [1]
Zdrojáky
#include "lcd.h"
int main(void)
{
unsigned char znak;
lcdInit4();
lcdControlWrite(1<<LCD_CLR);
for(znak='A';znak<'E';znak++)
lcdDataWrite(znak);
lcdControlWrite(0x40+0x80);
for(znak='F';znak<'Q';znak++)
lcdDataWrite(znak);
while (1);
return 0;
}
Arduino: