文件名称:DS1307

  • 所属分类:
  • 单片机(51,AVR,MSP430等)
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2016-08-30
  • 文件大小:
  • 107kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 科***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

通过串口数据设置可调整时钟程序

1、程序说明:

该例程演示了如何通过串口数据设定时钟,采用数码管显示。



2、  操作:   1、该串口1可以设置为通过USB口输出或者通过DB9口输出。

     如果使用USB输出,请使用USB线将开发板连接至电脑,

         如果使用DB9输出,请使用DB9直连线将开发板的J25插座连接至电脑.

          同时将跳线插座J28跳到TxD1和RxD1.

        

         打开STC-ISP下载软件中的串口助手,选择相应串口号,

         选择波特率9600,8位数据位,1位停止位,无校验。

     点打开串口 接收缓冲区选择“HEX模式”

         发送缓冲区选择“HEX模式”



         从串口助手发送区输入数据格式如下

         aa 55 n1 n2 n3 n4 n5 n6 n7 xx

         其中aa 55为两个开始数据,xx为校验数据,

         n1 n2 n3 n4 n5 n6 n7为秒、分、时、星期、日、月、年的数据。

         检验数据为aa+55+n1+n2+n3+n4+n5+n6+n7的结果。

         十六进制数据,例如 aa 55 00 25 09 05 01 05 15 4d点击发送,

         发送数据后,如果数据合法,时钟将重新设置。

-The adjustable clock program through the serial data

1. Program Descr iption:

 This example demonstrates how to set the clock via the serial data, the use of digital display.

 

2: 1, 1 serial port that can be set to output via USB port or via DB9 port output.

    If you use a USB output, use a USB cable connected to the computer board,

If you use a DB9 output, use a DB9 straight cable to connect the socket J25 development board to the computer.

While the socket J28 jumper to jump TxD1 and RxD1.



Open the STC-ISP download software serial assistant, the corresponding serial number,

Select the baud rate of 9600, 8 data bits, 1 stop bit, no parity.

Point to open the serial port receive buffer  HEX mode

Transmit Buffer Select HEX mode



Input data serial format to send aides area below

aa 55 n1 n2 n3 n4 n5 n6 n7 xx

Wherein aa 55 to start two data, xx To verify that data,

n1 n2 n3 n4 n5 n6 n7 seconds, minutes, hours, day, date, month, and year of data.

Test data
(系统自动生成,下载前可以参看下载内容)

下载文件列表





43_通过串口数据设置DS1307时钟实验\Application\Doc\readme.txt

.................................\...........\Header\ds1307.h

.................................\...........\......\main.h

.................................\...........\......\STC15W4K32S4.h

.................................\...........\......\tm1638.h

.................................\...........\Source\ds1307.c

.................................\...........\......\main.c

.................................\...........\......\tm1638.c

.................................\...........\.tartup\STARTUP.A51

.................................\Lis\ds1302.lst

.................................\...\ds1307.lst

.................................\...\hc595.lst

.................................\...\main.lst

.................................\...\Serial_DS1302.m51

.................................\...\STARTUP.lst

.................................\...\tm1638.lst

.................................\Obj\ds1302.obj

.................................\...\ds1307.obj

.................................\...\hc595.obj

.................................\...\main.obj

.................................\...\Serial_DS1302

.................................\...\Serial_DS1302.hex

.................................\...\Serial_DS1302.lnp

.................................\...\Serial_DS1302.plg

.................................\...\STARTUP.obj

.................................\...\tm1638.obj

.................................\Serial_DS1307.plg

.................................\Serial_DS1307.uvgui.Administrator

.................................\Serial_DS1307.uvgui_Administrator.bak

.................................\Serial_DS1307.uvopt

.................................\Serial_DS1307.uvproj

.................................\Serial_DS1307_uvopt.bak

.................................\Serial_DS1307_uvproj.bak

.................................\Application\Doc

.................................\...........\Header

.................................\...........\Source

.................................\...........\Startup

.................................\Application

.................................\Lis

.................................\Obj

43_通过串口数据设置DS1307时钟实验

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org