完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好,先生,
我有CY8CITK-04942XX PSoC 4原型套件。我是初学者,我做过LED闪烁项目。现在我想做更多的项目。我有DS1307实时时钟Ic。我想将RTC与PSoC 4接口 我的任务 LED将开启1小时 LED将关闭10分钟 LED将打开20秒 我查看了组件数据日志,但没有RTC组件。我不知道如何在PSoC创建者上做顶级设计 能请人帮帮我吗? 以上来自于百度翻译 以下为原文 Hello sir , I have cy8ckit -049-42xx Psoc 4 prototyping KIt. I am begainer, recentally I have done LED blinking Project.. now I want to do some more projects. I have Ds1307 real time clock Ic. I want to interface RTC with psoc 4 My task LED will turn on for 1 houre LED will turn off for 10 minute LED will turn on for 20 seconad I looked component data log But there no RTC component. I don't understand how to make Top design on psoc creator could someone help me please ..........! |
|
相关推荐
48个回答
|
|
|
不,我用万用表复查。这是5.6 K电阻
以上来自于百度翻译 以下为原文 No, I double checked with multimeter . That is 5.6 K resisters |
|
|
|
|
|
如果您在工作空间资源管理器中打开.CydWr文件
选择屏幕的PIN选项卡底部,你会看到哪里 创建者分配了I2C CLK和数据引脚。那些别针 反过来,你会连接到你的RTC芯片,当然也会有理由。 PSoC和RTC之间必须是共同的。 顺便看看其他选项卡,这是一般配置。 对于PSoC芯片,您将在设计中使用。作为旁白 模拟视图显示路由,并有欧姆表。 允许您从引脚测量路径的工具 组件和其他相互连接的模拟材料。 问候,Dana。 以上来自于百度翻译 以下为原文 If you open the .cydwr file in your workspace explorer then select the pins tab bottom of screen you will see where Creator assigned the I2C clk and data pins. Those pins in turn you wire to your RTC chip, and of course the grounds between PSOC and RTC must be common. By the way look at the other tabs, this is general config for PSOC chip you will use in designs. As an aside the analog view shows you routing and has an ohmmeter tool that allows you to measure routes from pins to components and other interconnected analog stuff. Regards, Dana. |
|
|
|
|
|
Vead,你不明白我跟你说过的几句话。你可以做到这一点,没有任何C代码只使用DS1307引脚7和PWM组件,我认为最大值将是2个PWM组件。只要把1Hz信号从DS1307引脚7发送到4200板,然后你可以使用PWM TC照亮你的LED,它将在10分钟,你也可以控制关闭时间也。2秒的时间,你根本不需要任何代码。您可能需要将输出馈入到或门以仅使用一个LED。但它会起作用。在100天的示例33中,你看过PSoC BLE 100项目吗?它展示了如何使用一个看门狗定时器进行RTC。您可能可以为项目使用一些代码。
以上来自于百度翻译 以下为原文 Vead did you not understand what I was telling you a few post back. You can do this without any C code just using the DS1307 pin 7 and PWM components I think the max would be 2 PWM components. Just send the 1hz signal from the DS1307 pin 7 to the 4200 board and then you can use the PWM TC to light your led and it will be at 10 minutes and you can control the off times also. And the 2 sec on time and you would not need any code at all. You may need to feed the outputs into an OR gate to use just one led. But it will work.. Have you looked at the Psoc Ble 100 projects in 100 days example 33 it shows how to use a watch dog timer for a RTC. You may be able to use some of that code for your project |
|
|
|
|
|
|
|
|
|
|
|
SCL和SDA分别是DS1307上的时钟和数据。
问候,Dana。 以上来自于百度翻译 以下为原文 SCL and SDA are clock and data respectively on the DS1307. Regards, Dana. |
|
|
|
|
|
你好,鲍伯先生
我读过你以前的帖子。我有问题。我们可以用两个PWM组件来设置几分钟、几个小时、几个月、几年的警报吗?如果是的话,我会听从你的劝告。 Dana先生 我对C编程知之甚少,我看了很多示例例子。我很难理解下面的示例代码。有时间数组。但我不明白,我不理解时间数组是如何在C程序中使用的。我知道我不使用液晶显示器。我只需要使用RTC设置警报 ******************************************************************************************机密和专有信息*这是你公司的财产。Stdio.H.& gt;包括:“DS1307.h”定义定义的SETION时间1 UINT8 WrBuff[ 9 ]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };int({)uint 32 rdSt= 0;uint 32 WrSt= 0;uint 32 NTI;***ME=0;UITN8 RDBuff[16 ];CyGloalActuable;/*取消注释此行以启用全局中断。“I2CM.Sistar());//StimeTimeNo.[WrBuff](1),0x00 104500,0x0213120,(DS1307A STY12HR,DS1307A STPM PM DS1307A STYSqOutOUT1HZ);StimeTimeLabor(WrBuff[ 1),0x000 05000,0x01131215,(DS1307A STY12HR,DS1307A STPM PM DS1307A STYSqOUTOX1HZ));CyDelay(200);*/LCDYSTART();LCDApReltScript(“你好”//设置时间函数,取消设置时间的注释。//WrStaseI2CMJi2CdMistRead Buf(ADDR,WrBuffi,9,I2CMY2CYMODEJOUTIOEXXFER);CyDelay(20);;O.I2CMistCurrStasuSube();RdStaseI2CMyI2CMASTRADEBUF(ADDR,RDBUFF,8,I2CMY2CYMODEJOUTIOEXXFER);CyDelay(20);RdStaseI2CMY2CMASTSTATUS();LCDA PrimStand(GETTimeStudio(RDBuffF,(DS1307A TimeDATE2,DS1307AYAMPM));LCDX位置(1,0);LCDA PrimtStand(GETTimeStand(RDBuff,DS1307YMDY);NTIME= GETS秒表(RDBuff);LCDX位置(1,9);LCDA PrimtIn16((UTIN 16)(NTIME & GT;GT;8));LCDX位置(1,13);LCDA PrimtIn 8((UTI8)(NTIME&0x00 FF));CyDelay(500);/*放置您的应用程序代码。*/}}/*[]文件结尾*/ 以上来自于百度翻译 以下为原文 hello mr. Bob I read your previous post . I have questions . can we set alarm for minute , for hours,for months , for years using two pwm components ? if yes then I will follow your advice Mr. Dana I know little bit about c programming, I looked many sample example. I am having problem to understand following sample code. there is time array. but I don't understand I don't understand how does time array used in that c program. I know I am not using LCD. I just need to set alarm using RTC /* ======================================== * * Copyright YOUR COMPANY, THE YEAR * All Rights Reserved * UNPUBLISHED, LICENSED SOFTWARE. * * CONFIDENTIAL AND PROPRIETARY INFORMATION * WHICH IS THE PROPERTY OF your company. * * ======================================== */ #include #include #include "DS1307.h" #define ADDR 0x68 #define SET_TIME 1 uint8 wrBuff[9] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; int main() { uint32 rdStatus = 0; uint32 wrStatus = 0; uint32 nTime = 0; uint8 rdBuff[16]; CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */ LCD_Start(); LCD_PrintString("Hello"); I2CM_Start(); // SetTimeArray(&wrBuff[1], 0x00104500, 0x02131209, (DS1307_ST_12HR|DS1307_ST_PM|DS1307_ST_SQOUT_1HZ) ); SetTimeArray(&wrBuff[1], 0x00054000, 0x01131215, (DS1307_ST_12HR|DS1307_ST_PM|DS1307_ST_SQOUT_1HZ) ); CyDelay(200); // Set time function, uncomment to set time. // wrStatus = I2CM_I2CMasterWriteBuf(ADDR, wrBuff, 9, I2CM_I2C_MODE_COMPLETE_XFER); CyDelay(20); ; for(;;) { I2CM_I2CMasterClearStatus(); wrStatus = I2CM_I2CMasterWriteBuf(ADDR, wrBuff, 1, I2CM_I2C_MODE_COMPLETE_XFER); CyDelay(20); wrStatus = I2CM_I2CMasterStatus(); I2CM_I2CMasterClearStatus(); rdStatus = I2CM_I2CMasterReadBuf(ADDR, rdBuff, 8, I2CM_I2C_MODE_COMPLETE_XFER); CyDelay(20); rdStatus = I2CM_I2CMasterStatus(); LCD_Position(0,0); LCD_PrintString(GetTimeString(rdBuff, (DS1307_TIMEDATE2|DS1307_AMPM))); LCD_Position(1,0); LCD_PrintString(GetTimeString(rdBuff, DS1307_MDY)); nTime = GetSeconds(rdBuff); LCD_Position(1,9); LCD_PrintInt16((uint16)(nTime >> 8) ); LCD_Position(1,13); LCD_PrintInt8((uint8)(nTime & 0x00FF)); CyDelay(500); /* Place your application code here. */ } } /* [] END OF FILE */ |
|
|
|
|
|
这里是设计手册HTTP://www. MigItActudio.CON/Enp/NoPTES/NETX.MVP/ID/504.Stand信息,以及如何将它们挂钩到IC HTTP://www. MigimiTald.COM/En/APP-NOTES/DIXX.MVP/ID/58。
以上来自于百度翻译 以下为原文 Here is the design manual http://www.maximintegrated.com/en/app-notes/index.mvp/id/504.Crystal info and how to hook them up to the IC http://www.maximintegrated.com/en/app-notes/index.mvp/id/58. |
|
|
|
|
|
时间阵列,在这种情况下,rdBufff,从1307通道读取数据。
I2C连接。数据读取字节为字节,8字节,并且是 在1307数据表内存映射的字节内格式化 数据PSoC读入RDBUFF) 功能/代码MEH在DS1307C中编写,然后处理EDBIFF中的字节,提取时间、日期等。 上面的格式化现在位于RDBuff. 你的问题——我读过你以前的帖子。我有问题。我们可以用两个PWM组件来设置几分钟、几个小时、几个月、几年的警报吗? 通过查询DS1307和一些C代码,您可以根据时间、日期在C代码中设置警报。所以,不,你 不需要PWMs为此,将DS1307数据读入RDBuffe,然后通过MEH提取。 C代码将创建这些警报。在C代码中,您将创建比较闹钟设置的测试。 从DS1307中读取的内容。 TimeLoad是用来初始化1307,第一次你把它加起来它不 “知道”时间/日期是什么,所以你需要输入它。 问候,Dana。 以上来自于百度翻译 以下为原文 The time array, in this case rdBuff, reads the data from the 1307 via the I2C connection. The data is read byte for byte, 8 bytes, and is formatted within the bytes per 1307 datasheet memory map (the data PSOC reads into rdBuff) - The functions/code meh has written in DS1307.c then process the bytes in edBuff to extract time, day, etc. per the formatting above that now resides in rdBuff. Your question - I read your previous post . I have questions . can we set alarm for minute , for hours,for months , for years using two pwm components ? By polling the DS1307 and some C code you can set alarms in C code based on time, date. So no, you do not need PWMs for this, the DS1307 data being read into rdBuff and then extracted via meh C code would create these alarms. In C code you would create tests comparing the alarm settings to what was read from the DS1307. The timArray is used to initialize the 1307, first time you power it up it does not "know" what time/date is, so you need to init it. Regards, Dana. |
|
|
|
|
|
这个芯片有一个1Hz,4kHz,8kHz,32 kHz的输出取决于它是如何编程的引脚7。我认为你可以在PSoC的计数器中计数1Hz信号,然后当你计数600个脉冲时触发LED,你可以点亮LED,然后把它发送到另一个计数器来计数OFA。在时间上。那么你就不需要从时钟寄存器中解码时间了。这将是较少的编程。这是RTC上的数据表,以及如何编程PIN 7、http://www. Mistimist.com/En/产品/数字/实时时钟/DS1307.html
以上来自于百度翻译 以下为原文 This chip has a 1Hz, 4kHz, 8kHz, 32kHz output on pin 7 depending on how it is programmed I was thinking that you could count the 1hz signal in a counter on the psoc and then trigger the LED when you have counted 600 pulses you can light the led and then send it to another counter to count the off and on times. Then you would not need to decode the time from the clock registers. It would be less programming. Here is the data sheet on the RTC and how to program pin 7,http://www.maximintegrated.com/en/products/digital/real-time-clocks/DS1307.html#popuppdf |
|
|
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7088 浏览 0 评论
2474 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2073 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7566浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6114浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
742浏览 2评论
710浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
7962浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 00:39 , Processed in 1.484863 second(s), Total 78, Slave 71 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2458