完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
一个按钮被按下,一个计数器上升。我想看到计数器的值与7段。我使用27段多路复用。按下按钮的数字增加,但第二位(十进制数字)闪烁短暂的时间。例如,我想计算25、26、27。5、6、7位数字计数。Buttens数字(2)闪光灯。你能看到这个程序吗?我做错了什么。 CabelSe.Bull 012Zip 3兆字节 以上来自于百度翻译 以下为原文 Hi, A button is pressed the rise a counter.I want to see the values of counter with 7 segment. I am using two seven segment multiplexing. Pressing button ones digit increasing but second digit(tens digit) is flashing a short period of time. Example, i want to count 25,26,27. 5,6,7 digits counting. But tens digits(2) flashing.CAn you see the program? What I'm doing wrong.
|
|
相关推荐
12个回答
|
|
美拉巴!
你写OnLAR,等待一点,然后写下BILAL,这个信号一直停留到中断的下一个周期发生。别忘了你只能同时做一位数的照明。 更改以下内容以保持中断: 将解码后的7段数字分成两个字节。 在100Hz频率下运行中断 在每个中断显示一个数字,在另一个中断,所以这两个数字将具有相同的亮度。 鲍勃 以上来自于百度翻译 以下为原文 Merhaba! You write the onlar, wait a bit, then write the birlar, this signal stays until the next cycle of the interrupt happens. Do not forget that you only can make one digit lighting at the same time. Change to the following to keep the interrupt short: Put the decoded 7-segment digits into two bytes. run interrupt at frequency of 100Hz At each interrupt show one of the digits, at next interrupt the other, so both digits will have same brightness. Bob |
|
|
|
首先,谢谢你的回答,鲍伯。我应该再加一个中断吗?我不明白你能在zip文件上给我看吗?
以上来自于百度翻译 以下为原文 Firstly, thanks for your answer Bob.Should i add one more interrupt?I didn't understand can you show me on zip file? |
|
|
|
首先,有一个由克里斯Kees准备使用的组件,你可以在这里得到它:
HTTP://www. CyPress?COM/?APP =论坛和ID ID=2492和;RID=70446 我认为你正在努力学习PSoC,所以找到自我解决方案总是一个很好的练习。 然而,这里是一个例子,未测试,所以测试自己 鲍勃 CabelSe.Bull 01.CyWrk.CaseV01.Zip 758.1 K 以上来自于百度翻译 以下为原文 At first: There is a ready-to-use component made by chris kees, you may get hands on it here: http://www.cypress.com/?app=forum&id=2492&rID=70446 I think you are trying to learn PSoC, so it is always a good exercise to find solutions for yourself. Nevertheless, here is an example, untested so test yourself Bob |
|
|
|
谢谢你,鲍伯,我试着举例,但不工作。7节不照明。我会工作的例子感谢一切。应该编写代码,你必须提供编码的来源吗?
以上来自于百度翻译 以下为原文 Thank you Bob,i try to example but not working. 7 segment is not lighting. i will work on example Thanks for everything. ı should develop writing code Do you have to offer the source for coding? |
|
|
|
对不起,没听懂你的意思,你需要什么代码?
鲍勃 以上来自于百度翻译 以下为原文 Sorry, did not understand you right, what code do you need? Bob |
|
|
|
PS:我在中断处理程序中错误地将“StEngLeLe()”定义为“StEngTeNe()”,请更改
鲍勃 以上来自于百度翻译 以下为原文 PS: I mistook "segmentler()" for "segment()" in the interrupt handler, please change that Bob |
|
|
|
谢谢鲍伯。我加了黑德数字。我想,UIT8数字(3)={0,0,0};否则,(RaCAM==3){Pin Culnn1x写(0);Pin Calnn2x写(0);Pin Calpn3x写(1);}数字[2 ]=((RakAM/100)% 10);CysISR(SeGeMthHANDELL){static UTI8数字=0;if(数字)!= 0)数字数=0;否则(数字);= 1)数字数=1;否则数字数=2;段(数字[数字]);数字数;PixNoLn2x写(数字);Pin Calpn3x写(数字);}但我有一些错误。也许CysISR(SegmentHandler)线误差。我没有发现错误。你能告诉我我的错误吗?非常感谢。
以上来自于百度翻译 以下为原文 Thanks Bob. I added hundereds digits. i thought this; uint8 Digits[3] = {0,0,0}; else if(rakam==3) { PinColumn1_Write(0); PinColumn2_Write(0); PinColumn3_Write(1); } Digits[2] = ((rakam/100)%10); CY_ISR(SegmentHandler) { static uint8 DigitNumber = 0; if(DigitNumber != 0) DigitNumber = 0; else if(DigitNumber != 1) DigitNumber = 1; else DigitNumber = 2; segment(Digits[DigitNumber]); PinColumn1_Write(!DigitNumber); PinColumn2_Write( DigitNumber); PinColumn3_Write( DigitNumber); } But I have some error. Maybe CY_ISR(SegmentHandler) lines error. I dont find error. Can you show me my mistakes?. Thanks a lot |
|
|
|
你得到了什么错误?它不是编译,还是它显示了你的期望?
以上来自于百度翻译 以下为原文 Which error do you get? Doesn't it compile, or doesn't it show what you expect? |
|
|
|
YIMAZ,请不要在文本框中提供代码。论坛软件(归咎于柏树!)无法处理。取而代之的是上传你的项目,就像你以前做的那样,附加一个拉链(NoTrw)文件。
鲍勃 以上来自于百度翻译 以下为原文 Yilmaz, Please do not supply code here in the text-box. The forum software (blame Cypress!) is not able to handle that. Instead upload your project as you did before ot attach a zipped (NOT RAW) file. Bob |
|
|
|
对不起,鲍伯,我不知道。我编译文件.TENS和HANDDS数字写相同的数字
CopyLo.013Zip 2.3兆字节 以上来自于百度翻译 以下为原文 I'm sorry Bob, I don't know. I compile file.Tens and hunderds digits writes the same number
|
|
|
|
是的,你需要理解和编程多路复用。
在程序中正确地驱动段。但是随着多路复用器的每一个中断,必须显示下一个数字。这是通过驱动适当的引脚低的数字连接到。所以你循环通过3个引脚,只有一个是低的,其他的是高的。 你可以在我提供的例子中看到这一点。当使用超过3位数字时,可以做的改进是:不关掉所有数字,而是以前访问过的数字,而不是切换所有数字,但只有一个必须被驱动的数字。 可以考虑的另一个改进是使用指向函数的指针数组来编写PIN。这可以使中断例程为5行。伊瓦努!在PSoC3的世界里(只在这里),这是很复杂的,因为一些奇怪的编译器行为,我在一年前就遇到了这个陷阱,如果我能避开它们,就决定不使用PSoC3S。 鲍勃 CabelSe.Bull 01.CyWrk.CaseV011Zip 758.2 K 以上来自于百度翻译 以下为原文 Yes, you need to understand and to program multiplexing. The segments are driven correctly in your program. But with every interrupt of the multiplexer the next digit must be shown. This is done by driving low the appropiate pin where the digit is connnected to. So you cycle through your 3 pins and only one of them is low and the others are high. You can see that in my provided example. An improvement you could do when using more than 3 digits could be: Not to switch off ALL digits, but that digit that was accessed before AND not to switch all digits, but only that one which has to be driven low. Another improvement which can be thought of could be to use an array of pointers to the function to write the pin. This could make the interrupt routine a 5-liner. I WARN YOU! In the world of PSoC3 (only here) this is complicated to implement because of some strange compiler behaveour, I ran into that trap a year ago and decided not to use PSoC3s if I could avoid them. Bob |
|
|
|
谢谢你,鲍伯,你帮了大忙。还有最后一个问题,我希望你能回答我。我尝试制作定时电路。按钮按下增加或减少时间,当“设置”按钮按压计时器将减少每分钟。但是有问题。当我设置定时器6分钟,按下“设置按钮定时器必须减少1分钟,计数零槽。但我看不到液晶显示器。你看到了吗?
Cabele014Zip 3兆字节 以上来自于百度翻译 以下为原文 Thank you Bob,You were very helpful. There is last question i would be glad if you answer me . I try to make timer circuit. Button pressed increase or decrease time and when "set" button pressed timer will decrease every minute. but there is problem. when i set timer 6 minute and press "set button timer must decrease 1 minute and count trough zero. But I can't see lcd. Can you see that?
|
|
|
|
只有小组成员才能发言,加入小组>>
719个成员聚集在这个小组
加入小组1913 浏览 1 评论
1667 浏览 1 评论
3419 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1584 浏览 6 评论
1389 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
210浏览 2评论
195浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
343浏览 2评论
369浏览 1评论
76浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-5-15 21:37 , Processed in 0.947429 second(s), Total 98, Slave 82 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号