#include <stm32f10x.h>
uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x...
【程序】窗口看門狗WWDG的使用#include <stm32f10x.h>
uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x... |
【方法】系統時鐘從PLL切換到HSI(以及切換回來)【PLL到HSI】
// 假設HSI已經打開 RCC->CFGR &= ~RCC_CFGR_SW; // 系統時鐘切換到HSI RCC->CR &= ~(... |
【程序】STM32F103中的RTC時鐘精確到毫秒顯示時間#include <stm32f10x.h>
uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x... |
【實驗】用電容器延緩I/O口的電平變化速度將一個電阻和一個電容串聯起來接地。最左邊為電阻,電阻的最左端接單片機的PC1口,並設為輸出。電阻和電容中間引出一根線,接到PC0口,設為輸入。
最初PC1輸出低電平,電容上沒有電荷,PC0為低電... |
【實驗】使用定時器的外部時鐘模式對多諧振盪器的性能進行評估【實驗時用到的程序】
#include <stm32f10x.h> const uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99,... |
【程序】獨立看門狗IWDG的使用#include <stm32f10x.h>
uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x... |
【程序】使用外部32.768kHz晶振作為RTC的時鐘源(庫函數版)#include <stm32f10x.h>
uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x... |
【程序】使用內部低速晶振作為RTC的時鐘源(庫函數版)#include <stm32f10x.h>
uint8_t seg8[] = {0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x... |
今天晚上寫的串口控制的RTC時鐘程序#include <stdio.h>
#include <string.h> #include <stm32f10x.h> #define BIT... |
【截圖】成功的uCOS-II移植 [圖片]![]() |
在移植uCOS-II時,必須修改啟動文件裏面的SysTick_Handler和PendSV_Handler不能單獨定義這兩個函數的跳轉,如
void SysTick_Handler(void) { OS_CPU_SysTickHandler();... |
【應用】使用STM32定時器的Encoder模式驅動數字旋轉編碼開關/* 本程序使用的是銳志電子六合一擴展板上的數字旋轉編碼開關 */
/* 注意:一定要把板子下面的JPBMA和JPBMB跳線插上 */ #include <stm32f10x.h... |
【程序】1602液晶使用FIFO緩衝區方式顯示串口接收到的數據,同時6位數碼管顯示串口數據的累加和#include <stdio.h>
#include <stm32f10x.h> #define RS_0 (GPIOA->BRR = GPIO_BRR_B... |
【程序】STM32通過AD轉換讀取PA6端口上輸入的模擬量並在1602液晶上顯示轉換結果#include <stdio.h>
#include <stm32f10x.h> #define RS_0 (GPIOA->BRR = GPIO_BRR_B... |
【程序】STM32讀取DHT11溫濕度傳感器的數據並在1602液晶上顯示#include <stdio.h>
#include <stm32f10x.h> #define RS_0 (GPIOA->BRR = GPIO_BRR_B... |
本吧共有主題數105個,帖子數450篇,蝶粉數1位。 |
內容轉換: |