新手刚入门在论坛学习了知识,做了一个1602 helloworld,继续学习!!
本帖最后由 jason1986 于 2014-8-29 17:43 编辑1602LED,4线接法,输出helloworld,代码简单,如下:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
lcd.begin(16, 2);
lcd.print("hello, world!");
}
void loop() {
}
接线步骤用官方的helloworld接法:
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
不错,有机会再试试 i2c的 1602吧 更省线 楼主用了1602的8线接法,建议使用I2C的串行模块,省好多接口,只需4线 zoologist 发表于 2014-8-29 19:15 static/image/common/back.gif
不错,有机会再试试 i2c的 1602吧 更省线
好的!必须试一试。。 潇洒哥 发表于 2014-8-29 19:53 static/image/common/back.gif
楼主用了1602的8线接法,建议使用I2C的串行模块,省好多接口,只需4线
需要另外增加模块吗? 需要另外增加模块吗?
嗯,需要,不贵,就几块钱我的1602和2004都用的I2C模块 潇洒哥 发表于 2014-8-30 08:39 static/image/common/back.gif
嗯,需要,不贵,就几块钱我的1602和2004都用的I2C模块
我想请问用I2C怎么来做1602,而且,应该用串行来写程序吧,只有数据和时钟接口 是这个模块,焊接上就行,接到1602上无需做修改,接到2004上需要把地址改成0x27
声明,我不是推销的,也不是某宝店主,我只是晶莹透亮的爱好者一枚,看看这个
http://detail.tmall.com/item.htm?spm=a230r.1.14.57.GgdGM0&id=38022506557
页:
[1]