- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
arm实验 万年历程序(Arm experimental calendar program)
arm实验 万年历程序(Arm experimental calendar program)
#包括“配置。”
#包括“stdio. h”
#包括“数学。”
uint8时间[ 4 ];
按键GPIO口*/ /*
#定义key1 1 16
#定义KEY2 1 17
#定义KEY3 1 18
#定义密钥1 19
#定义key5 1 20
#定义key6 1 21
#定义hc595_cs(1<<29)/ p0.29口为74HC595的片选
typedef struct uartmode /定义串口模式设置的数据结构
{
字长度uint8数据库;/ 5 / 6 / 7 / 8
卡片stopb;/ /停止位1 / 2
卡片校验;/ /奇偶校验0-无校验-奇校验,1,2-偶校验
}
uartmode;
卡片rcv_buf [ 6 ];// UART0数据接收缓冲区
挥发性uint8 rcv_new;/ /接收新数据标志
/ **********************************************************************
*函数名称:delayns()
*函数功能:长软件延时
*入口参数:DLY延时参数,值越大,延时越久
*出口参数:无
******************************************************************** /
DelayNS(UInt32 DLY)无效
{
UInt32 M;
为(;DLY 0;DLY --)
对于(m=0;m<5000;m + +);
}
mspi_init虚空(void)
{
/ / pinsel0 =(pinsel0和0xffff00ff)| 0/ /设置管脚连接SPI
pinsel0 =(pinsel0 (~(0xFF 8)))|(0x55 8);
spccr = 0x52;/ /设置SPI时钟分频
单链=(0<<3)| / CPHA = 0,数据在SCK的第一个时钟沿采样
(1 4)| / CPOL = 1,SCK为低有效
(1 5)| /个= 1,SPI处于主模式
(0 6)| / LSBF = 0,SPI数据传输MSB(位7)在先
(0 7);/ / SPIE = 0,SPI中断被禁止
}
/ ****************************************************************************函数名称:mspi_senddata()
*函数功能:向SPI总线发送数据。
*入口参数:数据待发送的数据
*出口参数:返回值为读取的数据
************************************************************************* /
mspi_senddata uint8(uint8数据)
{
ioclr = hc595_cs;/ /片选74HC595
spi_spdr =数据;
而(0 = =(spi_spsr 0x80));//等待SPIF置位,即等待数据发送完毕
* * entry parameter: no display position
* * char display characters, not FF
* * export parameters: None
********************************************************************/
Void PC_DispChar (uint8, no, uint8, Chr)
{
SendByte (0xff);
SendByte (0x81);
SendByte (no);
SendByte (Chr);
SendByte (0x00);
}
Uint8, const, SHOWTABLE[10] = {0x3f, 0x06,0x5b, 0x4f, 0x66,0x6d, 0x7d, 0x07,0x7f, 0x6f};
*
*********************************************************************
* * function name: SendTimeRtc ()
* * function: read the RTC time value, and when the readout value through the serial port to the host computer display.
* * entrance parameters: None
* * export
您可能关注的文档
- 2008年普通高等学校招生全国统一考试(安徽卷)(National unified examination for general institutions of higher learning (Anhui roll) in 2008).doc
- 24个字教你用好autocad提高绘图速度的个人习惯(24 words teach you to use AutoCAD to improve the speed of drawing personal habits).doc
- 24个适合大学生的团队游戏.(24 team games for College Students).doc
- 24个适合大学生的团队游戏(24 team games for College Students).doc
- 24c02读写c语言程序(24C02 read and write C language program).doc
- 24部带有哲理性电影(24 with philosophical films).doc
- 21天习惯养成法则(21 days rule of habit formation).doc
- 21世纪的书(Twenty-first Century book).doc
- 250部电影(250 films).doc
- 258个超搞笑有趣猜谜(258 funny funny puzzles).doc
- arm开发日益流行 target=_blank(Arm development is becoming more and more popular with target=_blank).doc
- asa防火墙简要手册(ASA firewall brief manual).doc
- as-i 总线技术及其应用(AS-I bus technology and its application).doc
- api 英语(API英语).doc
- ar205 209维修手册(Ar205 209 maintenance manual).doc
- asme ut-ⅱ级基础试题(asme ut - ⅱ级基础试题).doc
- asme标准中英文对照焊接术语(ASME standard English and Chinese welding terminology).doc
- at24c32 at24c56读写程序(At24c32 at24c56 read and write program).doc
- atx电源(ATX power).doc
- auto369驾驶培训版,依托驾校管理部门(Auto369 driving training edition, relying on driving school management).doc
最近下载
- 防腐、保温施工方案.docx VIP
- (完整版)沟槽开挖及支护专项施工方案(深基坑专家论证).doc
- 4.1 水循环(教案)2023-2024学年湘教版(2019)高中地理必修一.docx VIP
- EIM Book 1 Unit 1 Free time单元检测试题.pdf VIP
- 金风1.5MW型风机变流器断路器反馈丢失故障作业指导书.docx VIP
- 信息与通信技术产品供应链安全测试方法.docx VIP
- 高中必备成语及解释800个.docx VIP
- 公差配合与测量技术 第2版 项目三 千分尺与指示表的测量操作.pptx VIP
- 金风1.5MW型风机主控柜断路器状态反馈丢失故障作业指导书.docx VIP
- 第2课学会沟通交流(教学课件) 道德与法治统编版五年级上册.ppt
文档评论(0)