Microchip
直播中

蔡艳

8年用户 202经验值
私信 关注
[问答]

使用PIC16F84如何使用TIMER0在装配中使1秒的子程序延迟

嘿,我是新的PIC16F编程,我需要帮助如何使用time0生成1秒或2秒延迟,如何使用预分频器和谢谢

以上来自于百度翻译


      以下为原文

    hey im new to PIC16f programing i need help how to use timer0 to generate 1sec or 2sec delay and how to use prescaler and thank you

回帖(14)

王焕树

2019-3-4 13:46:02
你必须使用PIC16F84吗?有更便宜、更便宜的PIC设备,你的芯片运行吗?你能做一个简单的程序,只需打开一个LED断断续续?

以上来自于百度翻译


      以下为原文

    Do you HAVE to use a PIC16F84?
There are newer, cheaper PIC devices which are much easier to use.
 
Do you have your chip running at all?
Are you able to make a simple program to just flash an LED off and on?
 
 
举报

张丽

2019-3-4 14:05:25
OP的经验水平是EE学生。请求是做第一个汇编语言项目。目标微控制器是PIC16F84.这个列表强烈地暗示了动机是一个嵌入式固件车间的工作。它会节省很多。如果OP会发布所有的课程作业,那么我们可以在星期一之前完成所有的作业。

以上来自于百度翻译


      以下为原文

    The is the Original Posters first post.
The OP's experience level is EE Student.
The request is about doing a first assembly language project.
The target micrcontroller is the PIC16F84.
 
This list strongly suggests that the motivation is course work for an embedded firmware workshop.
 
It would save a lot of time and snarky posts if the OP would just post all of the course work assignments so we can complete all of the homework before Monday.
举报

林霆景

2019-3-4 14:20:55
我同意QHB,此外,为什么需要使用汇编语言?C更容易使用,1或2秒定时器工作得比C好。C组件通常只用于从MPU中挤出更多的性能。你当然不需要这里。但是,如果你真的需要使用这个MPU和汇编,我会帮助你。你看过数据表了吗?你下载并安装了免费的MPLABX软件吗?数据表解释了很多。让我知道你需要什么帮助。

以上来自于百度翻译


      以下为原文

    I agree with qhb, in addition, why do you need to use assembly language?  C is easier to use and a 1 or 2 second timer will work more than fine with C.  Assembly is usually only used to squeeze a little more performance out of the MPU.  You certainly don't need that here.
 
However, if you really need to use that MPU and assembly, I'll help.
 
You're going to have to help yourself, though, too.  Have you read the data sheet?  Have you downloaded and installed the free MPLABX software?  The data sheet explains a lot.  Let me know what you need help with.
举报

陈晨

2019-3-4 14:30:40
你设置计时器在一秒的时间内过流。你每过流重新启动它,清除溢出标志。如果你使用中断,那么你会在中断中进行。如果你的振荡器给你一分秒的时间,那么你就不需要重新加载计时器。没有人会做你的学校工作。用问题注释你的代码。

以上来自于百度翻译


      以下为原文

    you set up the timer to over flow at some fraction of a second.
You restart it with that value every over flow, and clear the overflow flag.  if you are using interrupts, that you would do it in the interrupt.  If you oscillator gives you an even fraction of a second, then you will not need to reload the timer.
No one is going to do your school work. Post you commented code with your questions.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分