PY32F003F18之RTC

一、RTC振荡器

PY32F003F18实时时钟的振荡器是内部RC振荡器,频率为32.768KHz。它也可以使用HSE时钟,不建议使用。HAL库提到LSE振荡器,但PY32F003F18实际上没有这个振荡器。

缺点:CPU掉电后,需要重新配置RTC,这个确实不太友好,有点像是鸡肋,在要求不严格的场合,凑合使用吧。

RTC时钟框图如下:

二、RTC的HAL库有一个不是很严重的bug

 PY32F003F18的HAL库润年函数中有一个BUG,不是很严重,因为2400年是一个闰年,它把年定义为字节型变量,是没有办法分辨出是不是闰年。

闰年的计算方法:年数能被4整除,但不能被100年整除,为闰年;若年数能400年整除,也为闰年

HAL库确实不大好,它喜欢用全局变量来实现其功能,让人受不了。我改了,让它适合自己需要的。HAL处的好处,就是我们可以从中抠出自己需要的部分,修修改改,就可以了,比HAL库的灵活多了。时刻不忘黑它一把,因为人云亦云的人太多了。

三、非完全HAL库测试程序

如果你觉得HAL库,就用HAL中的程序,也是可以的。

#include "RTC.h"
#include "LED.h"
#include "stdio.h"  //getchar(),putchar(),scanf(),printf(),puts(),gets(),sprintf()uint8_t Century;//世纪,21世纪用20表示
RTC_DateTypeDef  RTC_DateStructureure;//用来保存读到的"年月日"
RTC_TimeTypeDef  RTC_TimeStructureure;//用来保存读到的"时分秒"
RTC_AlarmTypeDef RTC_AlarmStructureure;void RTC_Init(void);
void RTC_Display(void);//函数功能:读"RTC计数寄存器"
uint32_t Read_RTC_Time_Counter(void)
{uint16_t high1 = 0U, high2 = 0U, low = 0U;uint32_t timecounter = 0U;high1 = READ_REG(RTC->CNTH & RTC_CNTH_RTC_CNT);//读"RTC计数寄存器高位RTC_CNTH"low   = READ_REG(RTC->CNTL & RTC_CNTL_RTC_CNT);//读"RTC计数寄存器低位RTC_CNTL"high2 = READ_REG(RTC->CNTH & RTC_CNTH_RTC_CNT);//读"RTC计数寄存器高位RTC_CNTH"if (high1 != high2){//读"RTC计数寄存器低位RTC_CNTL"时,发现"RTC计数寄存器高位RTC_CNTH"中的数据发生改变了//In this case the counter roll over during reading of CNTL and CNTH registers,//read again CNTL register then return the counter valuetimecounter = (((uint32_t) high2 << 16U) | READ_REG(RTC->CNTL & RTC_CNTL_RTC_CNT));}else{//No counter roll over during reading of CNTL and CNTH registers, //counter value is equal to first value of CNTL and CNTHtimecounter = (((uint32_t) high1 << 16U) | low);}return timecounter;
}//函数功能:
//等待RTC写操作结束
//返回0,表示退出RTC配置模式,开始更新RTC寄存器
HAL_StatusTypeDef Enter_RTC_Init_Mode(void)
{uint32_t tickstart = 0U;tickstart = HAL_GetTick();/* Wait till RTC is in INIT state and if Time out is reached exit */while ( (RTC->CRL & RTC_CRL_RTOFF) == (uint32_t)RESET ){//读"RTC控制寄存器RTC_CRL"中的RTOFF,若RTOFF=0,则上一次对RTC寄存器的写操作仍在进行if ((HAL_GetTick() - tickstart) >  RTC_TIMEOUT_VALUE){//RTC_TIMEOUT_VALUE=2000,最大等待时间为2000msreturn HAL_TIMEOUT;}}_HAL_RTC_WRITEPROTECTION_DISABLE(RTC);//将"RTC控制寄存器RTC_CRL"中的CNF=0,退出配置模式,开始更新RTC寄存器//Disable the write protection for RTC registersreturn HAL_OK;
}//函数功能:
//等待RTC写操作结束
//返回0,表示RTC写操作结束
HAL_StatusTypeDef Exit_RTC_Init_Mode(void)
{uint32_t tickstart = 0U;_HAL_RTC_WRITEPROTECTION_ENABLE(RTC);//将"RTC控制寄存器RTC_CRL"中的CNF=1,进入RTC配置模式tickstart = HAL_GetTick();while ((RTC->CRL & RTC_CRL_RTOFF) == RTC_CRL_RTOFF){//读"RTC控制寄存器RTC_CRL"中的RTOFF,若RTOFF=1,则上一次对RTC寄存器的写操作已经完成if ((HAL_GetTick() - tickstart) >  RTC_RTOFF_RESET_TIMEOUT_VALUE){//RTC_RTOFF_RESET_TIMEOUT_VALUE=4,最大等待时间为4msbreak;}}tickstart = HAL_GetTick();while ((RTC->CRL & RTC_CRL_RTOFF) == (uint32_t)RESET){//读"RTC控制寄存器RTC_CRL"中的RTOFF,若RTOFF=0,则上一次对RTC寄存器的写操作仍在进行if ((HAL_GetTick() - tickstart) >  RTC_TIMEOUT_VALUE){//RTC_TIMEOUT_VALUE=2000,最大等待时间为2000msreturn HAL_TIMEOUT;}}return HAL_OK;
}//函数功能:将TimeCounter写入"RTC计数寄存器"
HAL_StatusTypeDef Write_RTC_Time_Counter( uint32_t TimeCounter )
{HAL_StatusTypeDef status = HAL_OK;if (Enter_RTC_Init_Mode() != HAL_OK){//等待RTC写操作结束//返回0,表示退出RTC配置模式,开始更新RTC寄存器status = HAL_ERROR;}else{WRITE_REG(RTC->CNTH, (TimeCounter >> 16U));//写"RTC计数寄存器高位RTC_CNTH"//Set RTC COUNTER MSB wordWRITE_REG(RTC->CNTL, (TimeCounter & RTC_CNTL_RTC_CNT));//写"RTC计数寄存器低位RTC_CNTL"//Set RTC COUNTER LSB wordif (Exit_RTC_Init_Mode() != HAL_OK){//等待RTC写操作结束status = HAL_ERROR;}}return status;
}//函数功能:读"RTC闹钟寄存器"
uint32_t Read_RTC_Alarm_Counter(void)
{uint16_t high1 = 0U, low = 0U;high1 = READ_REG(RTC->ALRH & RTC_CNTH_RTC_CNT);//读"RTC闹钟寄存器高位RTC_ALRH"low   = READ_REG(RTC->ALRL & RTC_CNTL_RTC_CNT);//读"RTC闹钟寄存器低位RTC_ALRL"return (((uint32_t) high1 << 16U) | low);
}//函数功能:将AlarmCounter写入"RTC闹钟寄存器"
HAL_StatusTypeDef Write_RTC_Alarm_Counter( uint32_t AlarmCounter)
{HAL_StatusTypeDef status = HAL_OK;/* Set Initialization mode */if (Enter_RTC_Init_Mode() != HAL_OK){//等待RTC写操作结束//返回0,表示退出RTC配置模式,开始更新RTC寄存器status = HAL_ERROR;}else{WRITE_REG(RTC->ALRH, (AlarmCounter >> 16U));//写"RTC闹钟寄存器高位RTC_ALRH",Set RTC COUNTER MSB wordWRITE_REG(RTC->ALRL, (AlarmCounter & RTC_ALRL_RTC_ALR));//写"RTC闹钟寄存器低位RTC_ALRL",Set RTC COUNTER LSB word/* Wait for synchro */if (Exit_RTC_Init_Mode() != HAL_OK){//等待RTC写操作结束status = HAL_ERROR;}}return status;
}//函数功能:返回0表示闰年
uint8_t Is_LeapYear(uint16_t nYear)
{uint16_t y;y=Century;//2023年9月26日y=y*100;//2023年9月26日nYear=y+nYear;//2023年9月26日if ((nYear % 4U) != 0U){return 0U;}if ((nYear % 100U) != 0U){return 1U;}if ((nYear % 400U) == 0U){return 1U;}else{return 0U;}
}//函数功能;读取星期几的值
uint8_t Read_RTC_WeekDay(uint32_t nYear, uint8_t nMonth, uint8_t nDay)
{uint32_t year = 0U, weekday = 0U;year = 2000U + nYear;if (nMonth < 3U){/*D = { [(23 x month)/9] + day + 4 + year + [(year-1)/4] - [(year-1)/100] + [(year-1)/400] } mod 7*/weekday = (((23U * nMonth) / 9U) + nDay + 4U + year + ((year - 1U) / 4U) - ((year - 1U) / 100U) + ((year - 1U) / 400U)) % 7U;}else{/*D = { [(23 x month)/9] + day + 4 + year + [year/4] - [year/100] + [year/400] - 2 } mod 7*/weekday = (((23U * nMonth) / 9U) + nDay + 4U + year + (year / 4U) - (year / 100U) + (year / 400U) - 2U) % 7U;}return (uint8_t)weekday;
}void Update_RTC_Date(RTC_DateTypeDef *update_RTCDate, uint32_t DayElapsed)
{uint32_t year = 0U, month = 0U, day = 0U;uint32_t loop = 0U;/* Get the current year*/year = update_RTCDate->Year;/* Get the current month and day */month = update_RTCDate->Month;day = update_RTCDate->Date;for (loop = 0U; loop < DayElapsed; loop++){if ((month == 1U) || (month == 3U) || (month == 5U) || (month == 7U) || \(month == 8U) || (month == 10U) || (month == 12U)){if (day < 31U){day++;}/* Date structure member: day = 31 */else{if (month != 12U){month++;day = 1U;}/* Date structure member: day = 31 & month =12 */else{month = 1U;day = 1U;year++;}}}else if ((month == 4U) || (month == 6U) || (month == 9U) || (month == 11U)){if (day < 30U){day++;}/* Date structure member: day = 30 */else{month++;day = 1U;}}else if (month == 2U){if (day < 28U){day++;}else if (day == 28U){if (Is_LeapYear(year))//不闰年{//返回0表示闰年day++;}else //闰年{month++;day = 1U;}}else if (day == 29U){month++;day = 1U;}}}if(year>=100)//2023年9月26日{Century++;year=year-100;}/* Update year */update_RTCDate->Year = year;/* Update day and month */update_RTCDate->Month = month;update_RTCDate->Date = day;/* Update day of the week */update_RTCDate->WeekDay = Read_RTC_WeekDay(year, month, day);//读取星期几的值
}HAL_StatusTypeDef Read_RTC_Time(RTC_DateTypeDef *update_RTCDate, RTC_TimeTypeDef *sTime)
{uint32_t counter_time = 0U, counter_alarm = 0U, days_elapsed = 0U, hours = 0U;counter_time = Read_RTC_Time_Counter();//读"RTC计数寄存器",总秒数hours = counter_time / 3600U;//计算有多少小时sTime->Minutes  = (uint8_t)((counter_time % 3600U) / 60U);//计算分钟数值sTime->Seconds  = (uint8_t)((counter_time % 3600U) % 60U);//计算秒数值if (hours >= 24U){days_elapsed = (hours / 24U);//计算"天"sTime->Hours = (hours % 24U);//计算今天的"小时时间"counter_alarm = Read_RTC_Alarm_Counter();//读"RTC闹钟寄存器"//Read Alarm counter in RTC registers/* Calculate remaining time to reach alarm (only if set and not yet expired)*/if ((counter_alarm != 0xFFFFFFFF) && (counter_alarm > counter_time)){//RTC_ALARM_RESETVALUE=0xFFFFFFFFUcounter_alarm -= counter_time;//计算"距离报警时间的差值"}else{/* In case of counter_alarm < counter_time *//* Alarm expiration already occurred but alarm not deactivated */counter_alarm = 0xFFFFFFFF;//RTC_ALARM_RESETVALUE=0xFFFFFFFFU}/* Set updated time in decreasing counter by number of days elapsed */counter_time -= (days_elapsed * 24U * 3600U);//计算"今天的总秒数"/* Write time counter in RTC registers */if (Write_RTC_Time_Counter(counter_time) != HAL_OK){//将"今天的总秒数"counter_time写入"RTC计数寄存器"return HAL_ERROR;}/* Set updated alarm to be set */if (counter_alarm != 0xFFFFFFFF){//RTC_ALARM_RESETVALUE=0xFFFFFFFFUcounter_alarm += counter_time;//报警时间 = "距离报警时间的差值" + "今天的总秒数"if (Write_RTC_Alarm_Counter(counter_alarm) != HAL_OK){//将AlarmCounter写入"RTC闹钟寄存器"return HAL_ERROR;}}else{/* Alarm already occurred. Set it to reset values to avoid unexpected expiration */if (Write_RTC_Alarm_Counter(counter_alarm) != HAL_OK){//将AlarmCounter写入"RTC闹钟寄存器"return HAL_ERROR;}}/* Update date */Update_RTC_Date(update_RTCDate, days_elapsed);}else{sTime->Hours = hours;}return HAL_OK;
}HAL_StatusTypeDef Read_RTC_Date(RTC_DateTypeDef *update_RTCDate,RTC_DateTypeDef *sDate)
{RTC_TimeTypeDef stime = {0U};/* Call HAL_RTC_GetTime function to update date if counter higher than 24 hours */if (Read_RTC_Time(update_RTCDate, &stime) != HAL_OK){return HAL_ERROR;}/* Fill the structure fields with the read parameters */sDate->WeekDay  = update_RTCDate->WeekDay;sDate->Year     = update_RTCDate->Year;sDate->Month    = update_RTCDate->Month;sDate->Date     = update_RTCDate->Date;return HAL_OK;
}void RTC_Init(void)
{RTC_HandleTypeDef RTC_HandleStructureure;RCC_OscInitTypeDef        RCC_OscInit_Structureure;RCC_PeriphCLKInitTypeDef  PeriphClkInit_Structureure;Century=20;//世纪,21世纪用20表示RTC_HandleStructureure.Instance = RTC;                       //选择RTCRTC_HandleStructureure.Init.AsynchPrediv = RTC_AUTO_1_SECOND; //RTC一秒时基自动计算//HAL_RTC_MspInit函数开始//RCC_OscInit_Structureure.OscillatorType =  RCC_OSCILLATORTYPE_LSI;RCC_OscInit_Structureure.LSIState = RCC_LSI_ON;HAL_RCC_OscConfig(&RCC_OscInit_Structureure);PeriphClkInit_Structureure.PeriphClockSelection = RCC_PERIPHCLK_RTC;PeriphClkInit_Structureure.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit_Structureure);__HAL_RCC_RTCAPB_CLK_ENABLE();//使能RTC APB外部设备时钟,Enable RTC peripheral Clocks__HAL_RCC_RTC_ENABLE();//使能RTC时钟,Enable RTC ClockHAL_NVIC_SetPriority(RTC_IRQn, 0x01, 0);//设置RTC中断优先级为0x01,0无意义NVIC_EnableIRQ(RTC_IRQn);//使能RTC中断__HAL_RTC_OVERFLOW_ENABLE_IT(&RTC_HandleStructureure, RTC_IT_OW);//使能溢出中断,Overflow interrupt__HAL_RTC_ALARM_ENABLE_IT(&RTC_HandleStructureure, RTC_IT_ALRA);//使能报警中断,Alarm interrupt__HAL_RTC_SECOND_ENABLE_IT(&RTC_HandleStructureure, RTC_IT_SEC);//使能秒中断,Second interrupt
//HAL_RTC_MspInit函数结束//HAL_RTC_Init(&RTC_HandleStructureure);//RTC初始化/设置日期: 2023/9/27 星期三/RTC_DateStructureure.Year = 23;RTC_DateStructureure.Month =9;RTC_DateStructureure.Date = 27;RTC_DateStructureure.WeekDay = RTC_WEEKDAY_WEDNESDAY;HAL_RTC_SetDate(&RTC_HandleStructureure, &RTC_DateStructureure, RTC_FORMAT_BIN);//设置RTC日期/设置时间: 09:00:00/RTC_TimeStructureure.Hours = 9;RTC_TimeStructureure.Minutes =00;RTC_TimeStructureure.Seconds = 00;HAL_RTC_SetTime(&RTC_HandleStructureure, &RTC_TimeStructureure, RTC_FORMAT_BIN);//设置RTC时间/设置RTC闹钟,时间到09:01:00产生中断/RTC_AlarmStructureure.AlarmTime.Hours = 9;RTC_AlarmStructureure.AlarmTime.Minutes = 1;RTC_AlarmStructureure.AlarmTime.Seconds = 00;HAL_RTC_SetAlarm_IT(&RTC_HandleStructureure, &RTC_AlarmStructureure, RTC_FORMAT_BIN);
}void RTC_Display(void)
{Read_RTC_Time(&RTC_DateStructureure,&RTC_TimeStructureure);
//	Read_RTC_Date(&RTC_DateStructureure,&RTC_DateStructureure);//	RTC_HandleTypeDef RTC_HandleStructureure;//	RTC_HandleStructureure.Instance = RTC;//选择RTC
//  printf("RTC_IT_SEC\r\n");
//  HAL_RTC_GetTime(&RTC_HandleStructureure, &RTC_TimeStructureure, RTC_FORMAT_BIN);//读取"RTC时间"
//  HAL_RTC_GetDate(&RTC_HandleStructureure, &RTC_DateStructureure, RTC_FORMAT_BIN);//读取"RTC日期"printf("%02d%02d-%02d-%02d %02d:%02d:%02d\r\n", Century,RTC_DateStructureure.Year,RTC_DateStructureure.Month,RTC_DateStructureure.Date,RTC_TimeStructureure.Hours, RTC_TimeStructureure.Minutes, RTC_TimeStructureure.Seconds);//显示时间格式为 : YY-MM-DD hh:mm:ssif(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_SUNDAY) printf("Sunday\r\n");if(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_MONDAY) printf("Monday\r\n");if(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_TUESDAY) printf("Tuesday\r\n");if(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_WEDNESDAY) printf("Wednesday\r\n");if(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_THURSDAY) printf("Thursday\r\n");if(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_FRIDAY) printf("Friday\r\n");if(RTC_DateStructureure.WeekDay==RTC_WEEKDAY_SATURDAY) printf("Saturday\r\n");
}//函数功能;RTC中断服务函数
void RTC_IRQHandler(void)
{if (_HAL_RTC_SECOND_GET_FLAG(RTC,RTC_FLAG_SEC)){if (_HAL_RTC_SECOND_GET_FLAG(RTC, RTC_FLAG_OW)){//RTC计数器溢出中断
/HAL_RTCEx_RTCEventCallback函数开始/printf("%s","\r\nRTC Overflow!!!\r\n");
/HAL_RTCEx_RTCEventCallback函数结束/_HAL_RTC_OVERFLOW_CLEAR_FLAG(RTC, RTC_FLAG_OW);//清除溢出中断}else{//RTC产生秒中断
/HAL_RTCEx_RTCEventCallback函数开始/MCU_LED_Toggle();
/HAL_RTCEx_RTCEventCallback函数结束/}_HAL_RTC_SECOND_CLEAR_FLAG(RTC, RTC_FLAG_SEC);}if (_HAL_RTC_ALARM_GET_FLAG(RTC, RTC_FLAG_ALRAF) != (uint32_t)RESET){//RTC产生报警中断
/HAL_RTC_AlarmAEventCallback函数开始/printf("%s","\r\nRTC Alarm!!!\r\n");
/HAL_RTC_AlarmAEventCallback函数结束/_HAL_RTC_ALARM_CLEAR_FLAG(RTC, RTC_FLAG_ALRAF);//Clear the Alarm interrupt pending bit}
}
#ifndef __RTC_H
#define __RTC_H#include "py32f0xx_hal.h"#define _HAL_RTC_SECOND_GET_FLAG(__INSTANCE__, __FLAG__)        (((((__INSTANCE__)->CRL) & (__FLAG__)) != RESET)? SET : RESET)
#define _HAL_RTC_OVERFLOW_CLEAR_FLAG(__INSTANCE__, __FLAG__)      ((__INSTANCE__)->CRL) = ~(__FLAG__)
#define _HAL_RTC_SECOND_CLEAR_FLAG(__INSTANCE__, __FLAG__)      ((__INSTANCE__)->CRL) = ~(__FLAG__)
#define _HAL_RTC_ALARM_GET_FLAG(__INSTANCE__, __FLAG__)        (((((__INSTANCE__)->CRL) & (__FLAG__)) != RESET)? SET : RESET)
#define _HAL_RTC_ALARM_CLEAR_FLAG(__INSTANCE__, __FLAG__)      ((__INSTANCE__)->CRL) = ~(__FLAG__)
//#define _HAL_RTC_ALARM_ENABLE_IT(__INSTANCE__, __INTERRUPT__)  SET_BIT((__INSTANCE__)->CRH, (__INTERRUPT__))#define _HAL_RTC_WRITEPROTECTION_ENABLE(__INSTANCE__)          CLEAR_BIT((__INSTANCE__)->CRL, RTC_CRL_CNF)
//将"RTC控制寄存器RTC_CRL"中的CNF=1,进入RTC配置模式#define _HAL_RTC_WRITEPROTECTION_DISABLE(__INSTANCE__)         SET_BIT((__INSTANCE__)->CRL, RTC_CRL_CNF)
//将"RTC控制寄存器RTC_CRL"中的CNF=0,退出配置模式,开始更新RTC寄存器
extern void RTC_Init(void);
extern void RTC_Display(void);#endif /* __RTC_H */
#include "py32f0xx_hal.h"
#include "SystemClock.h"
#include "delay.h"
#include "LED.h"
#include "SystemClock.h"
#include "USART2.h"
#include "stdio.h"  //getchar(),putchar(),scanf(),printf(),puts(),gets(),sprintf()
#include "string.h" //使能strcpy(),strlen(),memset()
#include "RTC.h"const char CPU_Reset_REG[]="\r\nCPU reset!\r\n";
int main(void)
{HSE_Config();
//	HAL_Init();//systick初始化delay_init();HAL_Delay(1000);USART2_Init(115200);
//PA0是为USART2_TX,PA1是USART2_RX
//中断优先级为0x01
//波特率为115200,数字为8位,停止位为1位,无奇偶校验,允许发送和接收数据,只允许接收中断,并使能串口printf("%s",CPU_Reset_REG);MCU_LED_Init();RTC_Init();while (1){delay_ms(1000);RTC_Display();}
}

四、误差分析

误差: 每10分钟误差6秒。1%的误差,还行。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/143094.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

【深度学习】图像去噪(2)——常见网络学习

【深度学习】图像去噪 是在 【深度学习】计算机视觉 系列文章的基础上&#xff0c;再次针对深度学习&#xff08;尤其是图像去噪方面&#xff09;的基础知识有更深入学习和巩固。 1 DnCNN 1.1 网络结构 1.1.1 残差学习 1.1.2 Batch Normalization (BN) 1.1.2.1 背景和目标…

java项目之人事管理系统(ssm源码+文档)

项目简介 人事管理系统实现了以下功能&#xff1a; 管理员&#xff1a;个人中心、员工管理、部门经理管理、部门信息管理、员工考勤管理、签到管理、请假申请管理、工资查询管理、部门类型管理.部门经理&#xff1a;个人中心、员工管理、部门信息管理、员工考勤管理、签到管理…

Baichuan2 技术报告笔记

文章目录 预训练预训练数据模型架构TokenizerPositional EmbeddingsAcitivations and NormalizationsOptimizations 对齐Supervised Fine-TuningRLHF 安全性预训练阶段对齐阶段 参考资料 对Baichuan2技术报告阅读后的笔记 Baichuan2 与其他大模型的对比如下表 预训练 预训练数…

【Linux】C语言实现对文件的加密算法

异或加密 解密方式是进行第二次加密后自动解密 #define BUF_SIZE (16384) //16k /************************************************************** 功能描述: 加密实现 输入参数: --------------------------------------------------------------- 修改作者: 修改日期…

山西电力市场日前价格预测【2023-09-27】

日前价格预测 预测说明&#xff1a; 如上图所示&#xff0c;预测明日&#xff08;2023-09-27&#xff09;山西电力市场全天平均日前电价为342.48元/MWh。其中&#xff0c;最高日前电价为454.24元/MWh&#xff0c;预计出现在18: 30。最低日前电价为171.32元/MWh&#xff0c;预计…

如何永久关闭WPS任务窗口?

1、按住任务窗口上的浮动按钮&#xff0c;将其拖出来成悬浮窗口。 第二步&#xff0c;使用火绒弹窗拦截&#xff0c;选中弹出的窗口&#xff0c;进行拦截。注意&#xff1a;拦截次数为2次。即进行2次操作。 操作两次后&#xff0c;弹窗被拦截&#xff0c;此时Word文档改为双页显…

蓝桥杯每日一题20223.9.26

4407. 扫雷 - AcWing题库 题目描述 分析 此题目使用map等都会超时&#xff0c;所以我们可以巧妙的使用哈希模拟散列表&#xff0c;哈希表初始化为-1首先将地雷读入哈希表&#xff0c;找到地雷的坐标在哈希表中对应的下标&#xff0c;如果没有则此地雷的位置第一次出现&#…

QQ怎么上传大于1G的视频啊?视频压缩这样做

当我们想要在QQ上分享一段大容量的视频时&#xff0c;往往会因为超过1G的限制而感到无助。不过&#xff0c;不用担心&#xff0c;今天我们将为你介绍三种可以压缩视频大小的方法&#xff0c;一起来看看吧~ 一、嗨格式压缩大师 嗨格式压缩大师是一款专业的视频压缩软件&#xf…

全渠道客服体验:Rocket.Chat 的无缝互动 | 开源日报 No.41

RocketChat/Rocket.Chat Stars: 36.9k License: NOASSERTION Rocket.Chat 是一个完全可定制的开源通信平台&#xff0c;适用于具有高标准数据保护要求的组织。我们是团队沟通场景下的最终免费开源解决方案&#xff0c;可以实现同事之间、公司之间或客户之间的实时对话。提高生…

13. ShardingSphere-Proxy 数据库代理

Spring Cloud 微服务系列文章&#xff0c;点击上方合集↑ 1. 简介 ShardingSphere-Proxy是ShardingSphere分布式数据库中间件的一部分&#xff0c;它提供了数据库代理功能。通过引入ShardingSphere-Proxy&#xff0c;可以在无需改动应用程序代码的情况下&#xff0c;实现分库…

使用Process Monitor工具探测日志文件是程序哪个模块生成的

目录 1、问题描述 2、使用Process Monitor监测目标文件是哪个模块生成的思路说明 3、操作Process Monitor监测日志文件是哪个模块生成的 4、通过screenctach.dll库的时间戳&#xff0c;找到其pdb文件&#xff0c;然后去查看详细的函数调用堆栈 5、最后 VC常用功能开发汇总…

用智能文字识别技术赋能古彝文数字化之路

目录 1、前言 2、对古彝文古籍的保护迫在眉睫 3、古彝文识别的难点问题 4、古彝文文字识别的关键技术 4.1、智能高清滤镜技术 4.2、图像矫正 4.3、图像增强 4.4、版面还原 5、合合信息识别技术赋能古彝文数字化 1、前言 古彝文指的是在云南、贵州、四川等地的彝族人之…

uniapp 可输入可选择的........框

安装 uniapp: uni-combox地址 vue页面 <uni-combox :border"false" input"selectname" focus"handleFocus" blur"handleBlur" :candidates"candidates" placeholder"请选择姓名" v-model"name"&g…

yolov5及yolov7实战之剪枝

之前有讲过一次yolov5的剪枝&#xff1a;yolov5实战之模型剪枝_yolov5模型剪枝-CSDN博客 当时基于的是比较老的yolov5版本&#xff0c;剪枝对整个训练代码的改动也比较多。最近发现一个比较好用的剪枝库&#xff0c;可以在不怎么改动原有训练代码的情况下&#xff0c;实现剪枝的…

使用自定义注解发布webservice服务

使用自定义注解发布webservice服务 概要代码自定义注解WebService接口服务发布配置使用 结果 概要 在springboot使用webservice&#xff0c;发布webservice服务的时候&#xff0c;我们经常需要手动在添加一些发布的代码&#xff0c;比如&#xff1a; Bean public Endpoint or…

破信息壁垒,亿发一站式ERP系统建设,打造五金制造信息管理平台

五金制造拥有明显的行业特征&#xff0c;如体量小、品种繁多、颜色多样、加工工艺不断演进等&#xff0c;呈现出一种独特的管理挑战。大多数五金企业仍然依赖人工管理和经验决策&#xff0c;如今需要寻求更合理和科学的决策方法&#xff0c;以实现生产、销售、仓储、采购和财务…

百度SEO优化技巧(选择、网站结构、内容优化、外链建设、数据分析)

百度关键词SEO优化介绍 SEO是搜索引擎优化的缩写&#xff0c;是指通过优化网站结构、内容和外部链接等方式&#xff0c;提高网站在搜索引擎中的排名&#xff0c;从而获取更多的访问量和流量。百度是中国最大的搜索引擎之一&#xff0c;对于企业来说&#xff0c;优化百度关键词…

uniapp 事件委托失败 获取不到dataset

问题&#xff1a; v-for 多个span ,绑定点击事件 代码:view里包着一个span, <view class"status-list" tap"search"><span class"status-item" v-for"(key,index) in statusList" :key"index" :data-key"k…

USB转换方案介绍

随着科技的不断发展&#xff0c;我们的生活中出现了越来越多的电子设备。然而&#xff0c;这些设备通常具有不同的连接端口和协议&#xff0c;这可能会使它们之间的连接变得困难。这时候&#xff0c;使用USB转换就成为了一种非常方便和实用的解决方法。 无论是在家庭、办公室还…

系统集成|第十章(笔记)

目录 第十章 质量管理10.1 项目质量管理概论10.2 主要过程10.2.1 规划质量管理10.2.2 实施质量保证10.2.3 质量控制 10.3 常见问题 上篇&#xff1a;第九章、成本管理 下篇&#xff1a;第十一章、人力资源管理 第十章 质量管理 10.1 项目质量管理概论 质量管理&#xff1a;指确…