共阴数码管显示1到15
2016-09-24 18:49
232 查看
//seg.c #include #include #include "delay.h" #define SEGPORT P0 sbit bit_select = P2^0; sbit seg_select = P2^1; unsigned char segdata[16] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; void main() { unsigned char i; SEGPORT = 0; bit_select = 1; bit_select = 0; for(i = 0; i < 16; i++) { SEGPORT = segdata[i]; seg_select = 1; seg_select = 0; delay_ms(255); } }
相关文章推荐
- 图解Linux命令之--echo命令
- explicit
- cir_head_dlink
- 元素位置互换之逆置算法
- react-native 目录结构
- Leetcode 82 Remove Duplicates from Sorted List II
- Android开发艺术探索笔记 五到八章
- 本地存储,文件内容的拼接
- 王爽汇编第二版实验5
- 图像特征— —LBP特征
- LeetCode-------24. Swap Nodes in Pairs(两两交换)
- hihoCoder #1388 : Periodic Signal ( 2016 acm 北京网络赛 F题)
- Linux入门-虚拟机安装Fedora server版本
- debug assertion failed line 40
- Fragment相关
- 走向程序员之路
- 【spring in action 学习--springMVC搭建】在不使用web.xml的情况下,配置Srping MVC工程
- JAVA多进程服务器与客户机实现收发异步
- PostgreSQL生成测试数据
- linux文件类命令练习