MSP430 按键程序范例(附原理图)
//P1.4输出低电平
P1OUT &= ~(BIT4);
nP10 = P1IN & BIT0;
if (nP10 == 0) nRes = 13;
nP11 = P1IN & BIT1;
if (nP11 == 0) nRes = 14;
nP12 = P1IN & BIT2;
if (nP12 == 0) nRes = 15;
nP13 = P1IN & BIT3;
if (nP13 == 0) nRes = 16;
//P1.5输出低电平
P1OUT &= ~(BIT4);
nP10 = P1IN & BIT0;
if (nP10 == 0) nRes = 9;
nP11 = P1IN & BIT1;
if (nP11 == 0) nRes = 10;
nP12 = P1IN & BIT2;
if (nP12 == 0) nRes = 11;
nP13 = P1IN & BIT3;
if (nP13 == 0) nRes = 12;
//P1.6输出低电平
P1OUT &= ~(BIT4);
nP10 = P1IN & BIT0;
if (nP10 == 0) nRes = 5;
nP11 = P1IN & BIT1;
if (nP11 == 0) nRes = 6;
nP12 = P1IN & BIT2;
if (nP12 == 0) nRes = 7;
nP13 = P1IN & BIT3;
if (nP13 == 0) nRes = 8;
//P1.7输出低电平
P1OUT &= ~(BIT4);
nP10 = P1IN & BIT0;
if (nP10 == 0) nRes = 1;
nP11 = P1IN & BIT1;
if (nP11 == 0) nRes = 2;
nP12 = P1IN & BIT2;
if (nP12 == 0) nRes = 3;
nP13 = P1IN & BIT3;
if (nP13 == 0) nRes = 4;
P1OUT = 0x00;//恢复以前值。
很好的按键程序范例!!#i nclude <MSP430x14x.h> void Init_Port(void) { //将P1口所有的管脚在初始化的时候...
MSP430 X14X按键程序范例(附原理图) 430430隐藏>> http://hi.baidu.com/117190815/blog/item/168a33b6221ca0cac0995997.html #i nclude <msp430x14x.h> void ...
MSP430 LED扫描程序范例(采用HC595芯片扩展)(附原理图)_电子/电路_工程科技_专业资料。#i nclude <MSP430x14x.h> #i nclude "led.h" unsigned char seg[...
按键程序范例按键程序范例隐藏>> MSP430 按键程序范例(附原理图) 按键程序范例(附原理图) MSP430 2010-02-27 21:51:50 阅读 71 评论 0 字号:大中小 714 ...
我的程序是按列扫描的(行列扫描原理一样,只是行列进行了交换) 。 这里,同时... MSP430键盘程序 3页 免费 MSP430 按键程序范例(附... 5页 免费...
MSP430单片机 矩阵键盘与数码管实验(附原理图)_信息与通信_工程科技_专业资料... msp430矩阵键盘程序-MSP... 1页 免费 MSP430_C语言例程注释详 21页 1下载...
我的程序是按列扫描的(行列扫描原理一 样,只是行列进行了交换) 。 这里,同时... MSP430 按键程序范例(附... 5页 免费 MSP430_4x4阵列按键程序... 8页 ...
MSP430 单片机按键程序(毕业设计调试过的,带着笔者的汗水的)_计算机硬件及网络... MSP430 X14X按键程序范例... MSP430 24C64控制程序1/2 相关文档推荐...
msp430 按键控制LED 最基本程序_工程科技_专业资料。msp430,按键控制LED,最...那么,下面进行按键扫描程序。 按键的定义是这样的,根据我板子的按键原理图如下 ...
MSP430_4x4阵列按键程序与3x3键盘程序_教学案例/设计_教学研究_教育专区。MSP430_4x4阵列按键程序与3x3键盘程序MSP430 4x4 阵列按键程序 作者:cxjr 摘自:匠人的...
热门文档