矿石收音机论坛

 找回密码
 加入会员

QQ登录

只需一步,快速开始

搜索
楼主: Edward

我的51初学故事+初学作品:有功能菜单的DS1302+1602表

  [复制链接]
     
发表于 2011-8-22 20:43:28 | 显示全部楼层
你太有才了
回复 支持 反对

使用道具 举报

     
发表于 2011-8-22 21:26:52 | 显示全部楼层
1602做汉字显示的确不容易
回复 支持 反对

使用道具 举报

     
发表于 2011-8-25 22:46:33 | 显示全部楼层
顶一个~呵呵~楼主毅力实在佩服~
回复 支持 反对

使用道具 举报

     
 楼主| 发表于 2011-8-25 23:06:02 | 显示全部楼层
更正一下,不是HEX文件是6.8kB,是需要6.8kB的ROM空间,HEX文件有20kB大小。
回复 支持 反对

使用道具 举报

     
发表于 2011-8-29 21:23:50 | 显示全部楼层
回复 19# 生活的旋律
旋律兄 最近进展如何
回复 支持 反对

使用道具 举报

     
发表于 2011-9-14 08:25:18 | 显示全部楼层
菜单实现的不错,但是这样容易让代码太长
回复 支持 反对

使用道具 举报

     
发表于 2011-9-14 09:42:28 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

发表于 2011-9-17 02:02:21 | 显示全部楼层
我还在摸索。
回复 支持 反对

使用道具 举报

     
发表于 2011-10-31 22:47:43 | 显示全部楼层
这位大哥方便吗?加弟弟QQ562633046
回复 支持 反对

使用道具 举报

     
发表于 2011-11-14 20:55:24 | 显示全部楼层
不错!第一次做就成功了。
回复 支持 反对

使用道具 举报

发表于 2011-11-14 22:27:02 | 显示全部楼层
我的51初学故事+初学作品:有功能菜单的DS1302+1602表


I would encourage you to make a few modules out of this, so your life is easier in the future.

for example, you are dealing with two (or three) distinct devices and you can make a module that drives the lcd and another that drives the ds1302.

in the future, you can simply include the lcd source file in a project, and include the lcd header file in your user code. compile and you can then write to that lcd.

the purpose of programming is really so that you don't have to do it again in the future. That way, you build on your prior investment.
回复 支持 反对

使用道具 举报

发表于 2011-11-14 22:30:34 | 显示全部楼层
just noticed this in your code:

                ACC>>=1;


you should never ever do anything like that in a high-level language (like C). Let the compiler handle that.
回复 支持 反对

使用道具 举报

     
发表于 2011-11-14 22:42:13 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

     
 楼主| 发表于 2011-11-14 23:46:37 | 显示全部楼层
I would encourage you to make a few modules out of this, so your life is easier in the future.
...
millwood 发表于 2011-11-14 22:27


Thank you! I know you can read Chinese, and I speak poor English, so ...

现在我已经基本在这样做了,我用过的1602、1302都基本copy以前的代码,18B20正准备这样做。现在也没有时间形成更系统的什么东西,课程比较紧啊。

you should never ever do anything like that in a high-level l ...
millwood 发表于 2011-11-14 22:30


这段是不是这样理解,就是在高级语言中不要使用低级语句?我的想法是8051单片机性能有限,就尽量节约一下,少定义一些变量。
回复 支持 反对

使用道具 举报

发表于 2011-11-15 02:04:15 | 显示全部楼层
but you simply do not, nor could you, predict if the compiler is using ACC for other purposes, particularly true in an interrupted environment.

so using a special register like that is very dangerous and incredibly difficult to debug in a large system.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

小黑屋|手机版|矿石收音机 ( 蒙ICP备05000029号-1 )

蒙公网安备 15040402000005号

GMT+8, 2025-5-2 14:11

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表