版本协议

Public Domain

专业版
#第八届立创电赛#快乐时钟

创建时间:1年前

562 1

描述

<div class="document"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">注:* 为必填项</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><strong><span style="color:#0093e6;">请在报名阶段填写 ↓</span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 1、项目功能介绍</h3> <hr class="horizontal-splitline normal-bold-2"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请输入内容…</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">基于瑞萨MCU做一款多功能电子时钟</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">还只做了时间基础功能,联网和存储还没做。还没搞明白瑞萨这个单片机</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:主题不限,可以是解决生活/工作中的某个问题、为某个人群/场景设计的方案、毕业设计/课程设计/DIY项目/纯属炫酷项目等。主要讲一下自己通过什么手段解决了什么问题。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*2、项目属性</h3> <hr class="horizontal-splitline normal-bold-2"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请输入内容…</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">首次公开</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:请说明项目是否首次公开;项目是否为原创;项目是否曾经在其他比赛中获奖,若有获奖则叙述获奖详情;项目是否在学校参加过答辩。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 3、开源协议</h3> <hr class="horizontal-splitline normal-bold-2"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请输入内容…</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">GPL3.0</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:利他即利己,请认真阅读下述内容。</span></p> <ol style="line-height:1.8;"> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">拥抱开源,赋予项目无限价值。建议项目核心功能开源80%以上;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">若某一部分功能不可替代且删掉之后项目无法解决对应的问题,则这一部分实现的功能就是项目的核心功能;比如设计了一台电子负载且设计了一款上位机软件监控功率变化,则电子负载为核心功能,上位机软件为辅助功能;比如电子负载中使用了一款隔离485模块与上位机通信,则此485模块实现的通讯功能为辅助功能;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">项目应选择适合自己的<span style="text-decoration:underline;"><a href="/posts/98fdb2accd754af7b51990790db3b47a" target="_blank">开源协议</a></span>,若项目引用其他开源项目,应注明来源并遵循原作者的开源协议规定;原创项目推荐使用GPL3.0开源协议;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">直接引用开源项目的原电路或原代码实现的功能不可作为自己项目的核心功能、使用市场上通用模块直接实现的功能不可作为自己项目的核心功能。</span></li> </ol> <p style="line-height:1.8;"> </p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><strong><span style="color:#0093e6;">请在竞赛阶段填写 ↓</span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*4、硬件部分</h3> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/4JYxCUG7QZ7kYknv27gkQvg0Nl6lueDzy6qEHFxL.png" alt="4JYxCUG7QZ7kYknv27gkQvg0Nl6lueDzy6qEHFxL.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">显示部分使用的1.69寸SPI LCD,可做丰富的内容显示。</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/H0ZJboaz2LQzQxbJh81WaINGtKlaXlc7OuTSZozQ.png" alt="H0ZJboaz2LQzQxbJh81WaINGtKlaXlc7OuTSZozQ.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">3.3V稳压使用MT3410LB搭建开关电源,并使用ETA6093做锂电管理,该芯片内置升压,可为我后面的WS2812B供电。</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/MU9GHRXx558jruOcuLeU8D64t9vWFxj5PJjWOh5g.png" alt="MU9GHRXx558jruOcuLeU8D64t9vWFxj5PJjWOh5g.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">温湿度部分使用的AHT10,使用I2C通讯。</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/TANOL3GZsmEDZftna6tXqsSn17bUayncZuAaRpwl.png" alt="TANOL3GZsmEDZftna6tXqsSn17bUayncZuAaRpwl.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">板载USB转串口,CH340E。为串口下载和通讯提供方便。</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/ajk6Z2v2ZfDrowSTZ7CVrRA05iczim7leQZKzP05.png" alt="ajk6Z2v2ZfDrowSTZ7CVrRA05iczim7leQZKzP05.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">使用ESP-01S做联网获取时钟。功能还没调好。</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:推荐使用<span style="text-decoration:underline;"><a href="https://lceda.cn/editor" target="_blank">嘉立创EDA</a></span>。若选择其他EDA工具,请在附件上传PDF格式的原理图,PDF格式的PCB图纸,Gerber格式的PCB文件。这里可以详细说明您的项目实现原理和机制、注意事项、调试方法、测试方法等。推荐图文并茂的形式向别人介绍您的想法。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*5、软件部分</h3> <hr class="horizontal-splitline normal-bold-2"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">使用瑞萨的FSP 3.5生成KEIL MDK工程,在MDK中进行程序开发。主要用到了SPI驱动屏幕,I2C驱动温湿度传感器,串口用于打印LOG,WS2812B部分的灯实现还没做。</p> <p><code>void hal_entry(void)</code><br><code>{</code><br><code>    /* TODO: add your own code here */</code></p> <p><code>    fsp_err_t err;</code><br><code>    /* Initialize the IOPORT module and configure the pins</code><br><code>     * Note: The default pin configuration name in the RA Configuraton tool is g_bsp_pin_cfg */</code><br><code>    err = R_IOPORT_Open(&g_ioport_ctrl, &g_bsp_pin_cfg);</code><br><code>    /* Handle any errors. This function should be defined by the user. */</code><br><code>    assert(FSP_SUCCESS == err);</code></p> <p><code>    /* Open the transfer instance with initial configuration. */</code><br><code>    err = R_SCI_UART_Open(&g_uart0_ctrl, &g_uart0_cfg);</code><br><code>    assert(FSP_SUCCESS == err);</code><br><code>    err = R_SCI_UART_Open(&g_uart1_ctrl, &g_uart1_cfg);</code><br><code>    assert(FSP_SUCCESS == err);</code></p> <p><code>    float Nhumidity, Ntemperature;</code><br><code>    unsigned char buff[] = "RA START\n";</code><br><code>    uint8_t buff_len = strlen(buff);</code><br><code>    HAL_UART_Transmit(buff, buff_len);</code><br><code>    ST7789_BL_OFF();</code><br><code>    sensorAht110_test();</code><br><code>    /**********************RTC开启***************************************/</code><br><code>    /* Initialize the RTC module*/</code><br><code>    err = R_RTC_Open(&g_rtc0_ctrl, &g_rtc0_cfg);</code><br><code>    // R_RTC_Close(&g_rtc0_ctrl);</code><br><code>    // /* Handle any errors. This function should be defined by the user. */</code><br><code>    assert(FSP_SUCCESS == err);</code></p> <p><code>    // /* R_RTC_CalendarTimeSet must be called at least once to start the RTC */</code><br><code>    R_RTC_CalendarTimeSet(&g_rtc0_ctrl, &set_time);</code><br><code>    // //    /* Set the periodic interrupt rate to 1 second */</code><br><code>    R_RTC_PeriodicIrqRateSet(&g_rtc0_ctrl, RTC_PERIODIC_IRQ_SELECT_1_SECOND);</code></p> <p><code>    R_RTC_CalendarAlarmSet(&g_rtc0_ctrl, &set_alarm_time);</code><br><code>    err = R_RTC_Open(&g_rtc0_ctrl, &g_rtc0_cfg);</code><br><code>    /* Handle any errors. This function should be defined by the user. */</code><br><code>    assert(FSP_SUCCESS == err);</code><br><code>    uint8_t rtc_second = 0; // 秒</code><br><code>    uint8_t rtc_minute = 0; // 分</code><br><code>    uint8_t rtc_hour = 0;   // 时</code><br><code>    uint8_t rtc_day = 0;    // 日</code><br><code>    uint8_t rtc_month = 0;  // 月</code><br><code>    uint16_t rtc_year = 0;  // 年</code><br><code>    uint8_t rtc_week = 0;   // 周</code><br><code>    rtc_time_t get_time;</code></p> <p><code>    // ESP01S_AT_GET_TIME(&set_time);</code><br><code>    // R_RTC_CalendarTimeSet(&g_rtc0_ctrl, &set_time);</code></p> <p><code>    static uint8_t time_ticks_up = 0;</code><br><code>    ST7789_Init();</code><br><code>    HAL_UART_Transmit("Inited lcd\n", sizeof("Inited lcd\n") - 1);</code><br><code>    ST7789_BL_ON();</code><br><code>    DeviceButtonsInit();</code><br><code>    Timer_Init();</code><br><code>    while (1)</code><br><code>    {</code><br><code>        if (rtc_flag)</code><br><code>        {</code><br><code>            R_RTC_CalendarTimeGet(&g_rtc0_ctrl, &get_time); // 获取RTC计数时间</code><br><code>            rtc_flag = 0;</code><br><code>            rtc_second = get_time.tm_sec; // 秒</code><br><code>            rtc_minute = get_time.tm_min; // 分</code><br><code>            rtc_hour = get_time.tm_hour;  // 时</code><br><code>            rtc_day = get_time.tm_mday;   // 日</code><br><code>            rtc_month = get_time.tm_mon;  // 月</code><br><code>            rtc_year = get_time.tm_year;  // 年</code><br><code>            rtc_week = get_time.tm_wday;  // 周</code><br><code>            //            sprintf(uart_send_buffer, " %d y %d m %d d %d h %d m %d s %d w\n", rtc_year + 1900, rtc_month, rtc_day, rtc_hour, rtc_minute, rtc_second, rtc_week);</code><br><code>            //            HAL_UART_Transmit(uart_send_buffer, sizeof(uart_send_buffer));</code><br><code>            // 时间显示</code><br><code>            GetSeensorSingle(&Nhumidity, &Ntemperature);</code><br><code>//            sprintf(uart_send_buffer, "H=%.1f,T=%.1f\r\n", Nhumidity, Ntemperature);</code><br><code>//            HAL_UART_Transmit(uart_send_buffer, sizeof(uart_send_buffer));</code><br><code>            ST7789_WriteString(40, 200, uart_send_buffer, Font_16x26, MAGENTA, BLACK); // BLACK</code><br><code>        }</code><br><code>        if (rtc_alarm_flag)</code><br><code>        {</code><br><code>            rtc_alarm_flag = 0;</code><br><code>            // sprintf(uart_send_buffer, "/************************Alarm Clock********************************/\n");</code><br><code>            // HAL_UART_Transmit(uart_send_buffer, sizeof(uart_send_buffer));</code><br><code>        }</code></p> <p><code>        KeyHandler();</code></p> <p><code>        HAL_Delay(10);</code><br><code>        time_ticks_up++;</code><br><code>        if (time_ticks_up >= 10)</code><br><code>        {</code><br><code>            time_ticks_up = 0;</code><br><code>            if (ClockMode == 0)</code><br><code>                TimeDateShow(get_time);</code><br><code>            else if (ClockMode)</code><br><code>                TimeDateShow(set_time);</code><br><code>        }</code><br><code>    }</code><br><code>#if BSP_TZ_SECURE_BUILD</code><br><code>    /* Enter non-secure code */</code><br><code>    R_BSP_NonSecureEnter();</code><br><code>#endif</code><br><code>}</code></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:若您的项目涉及软件开发,请在附件上传对应的工程源码。这里可以详细说明您的软件流程图、功能模块框图、相关算法的解释或科普、源码结构、编译环境的搭建和配置、源码编译方法、程序烧录方法等。推荐图文并茂的形式向别人介绍您的想法。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*6、BOM清单</h3> <hr class="horizontal-splitline normal-bold-2"> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请输入内容…</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/akH23Qg9aYQ8xaxaym4jTBwT0jUZ2i10bsgcXEr4.png" alt="akH23Qg9aYQ8xaxaym4jTBwT0jUZ2i10bsgcXEr4.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">注:项目涉及的BOM清单。这个位置请上传BOM的截图。清单详情请以PDF的格式上传到附件中。建议包括型号、品牌、名称、封装、采购渠道、用途等内容。具体内容和形式应以表达清楚项目构成为准。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">*7、大赛LOGO验证</h3> <hr class="horizontal-splitline normal-bold-2"> <p style="line-height:1.8;"><img src="//image.lceda.cn/pullimage/PthuDcqMpNBIxKXvPeWv6evqEtbK2oSlhdXeqF2B.png" alt="PthuDcqMpNBIxKXvPeWv6evqEtbK2oSlhdXeqF2B.png"></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">请上传包含大赛logo的项目图片,logo以丝印形式印刷在PCB上面。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">点击zip下载大赛logo标识! <span style="text-decoration:underline;"><a href="https://image.lceda.cn/easyedaResource/images/%E7%AB%8B%E5%88%9B%E7%94%B5%E8%B5%9B%E6%A0%87%E8%AF%86.rar" target="_blank">(大赛标识).zip</a></span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;">* 8、演示您的项目并录制成视频上传</h3> <hr class="horizontal-splitline normal-bold-2"> <p style="line-height:1.8;"> </p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">视频要求:请横屏拍摄,分辨率不低于1280×720,格式Mp4/Mov,单个视频大小限100M内;</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="color:#95a5a6;font-size:14px;">视频标题:立创电赛:{项目名称}-{视频模块名称};如立创电赛:《自动驾驶》-团队介绍。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"><span style="font-size:14px;">更多详情:<a href="/posts/15a52db9fd7d40c492eb505280278e45" target="_blank">https://diy.szlcsc.com/posts/15a52db9fd7d40c492eb505280278e45</a></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height:1.8;"> </p> </div>

文档

BOM

暂无

附件

附件名 下载
RA_PROJECTS.zip
立创电赛:快乐时钟-RTC时钟部分.mp4

成员

评论(0)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
goToTop
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow