标签:http ar os sp 2014 bs 代码 ad as
oe低电位输出
上图很清楚,只需要sqh接到下一级的si,其他全部并联sck,rck,每次输出就可以向下传递1个字节。
arduino测试用的代码:
int sck=10; int rck=9; int si=8; int oe=11; void setup(){ pinMode(si,OUTPUT); pinMode(rck,OUTPUT); pinMode(sck,OUTPUT); pinMode(oe,OUTPUT); digitalWrite(oe,LOW); } void loop(){ digitalWrite(rck,LOW); shiftOut(si,sck,MSBFIRST,128); digitalWrite(rck,HIGH); delay(3000); digitalWrite(rck,LOW); shiftOut(si,sck,MSBFIRST,127); digitalWrite(rck,HIGH); delay(3000); digitalWrite(rck,LOW); shiftOut(si,sck,MSBFIRST,0); digitalWrite(rck,HIGH); delay(3000); }
标签:http ar os sp 2014 bs 代码 ad as
原文地址:http://my.oschina.net/u/1777508/blog/355796