資源簡介
STM32學習記錄——3. 0.96寸OLED顯示屏(7針SPI協議)
某寶上買的OLED,IIC/SPI都可以,買來看的時候發現背面焊的是SPI。板子上又沒有硬件SPI,只好用軟件模擬SPI。很久之前學的了,現在把它寫在CSDN上,各位大佬如有什么想法,歡迎評論!
某寶上買的OLED,IIC/SPI都可以,買來看的時候發現背面焊的是SPI。板子上又沒有硬件SPI,只好用軟件模擬SPI。很久之前學的了,現在把它寫在CSDN上,各位大佬如有什么想法,歡迎評論!

代碼片段和文件信息
/**
??******************************************************************************
??*?@file????system_stm32f4xx.c
??*?@author??MCD?Application?Team
??*?@version?V1.4.0
??*?@date????04-August-2014
??*?@brief???CMSIS?Cortex-M4?Device?Peripheral?Access?layer?System?Source?File.
??*??????????This?file?contains?the?system?clock?configuration?for?STM32F4xx?devices.
??*?????????????
??*?1.??This?file?provides?two?functions?and?one?global?variable?to?be?called?from?
??*?????user?application:
??*??????-?SystemInit():?Setups?the?system?clock?(System?clock?source?PLL?Multiplier
??*??????????????????????and?Divider?factors?AHB/APBx?prescalers?and?Flash?settings)
??*??????????????????????depending?on?the?configuration?made?in?the?clock?xls?tool.?
??*??????????????????????This?function?is?called?at?startup?just?after?reset?and?
??*??????????????????????before?branch?to?main?program.?This?call?is?made?inside
??*??????????????????????the?“startup_stm32f4xx.s“?file.
??*
??*??????-?SystemCoreClock?variable:?Contains?the?core?clock?(HCLK)?it?can?be?used
??*??????????????????????????????????by?the?user?application?to?setup?the?SysTick?
??*??????????????????????????????????timer?or?configure?other?parameters.
??*?????????????????????????????????????
??*??????-?SystemCoreClockUpdate():?Updates?the?variable?SystemCoreClock?and?must
??*?????????????????????????????????be?called?whenever?the?core?clock?is?changed
??*?????????????????????????????????during?program?execution.
??*
??*?2.?After?each?device?reset?the?HSI?(16?MHz)?is?used?as?system?clock?source.
??*????Then?SystemInit()?function?is?called?in?“startup_stm32f4xx.s“?file?to
??*????configure?the?system?clock?before?to?branch?to?main?program.
??*
??*?3.?If?the?system?clock?source?selected?by?user?fails?to?startup?the?SystemInit()
??*????function?will?do?nothing?and?HSI?still?used?as?system?clock?source.?User?can?
??*????add?some?code?to?deal?with?this?issue?inside?the?SetSysClock()?function.
??*
??*?4.?The?default?value?of?HSE?crystal?is?set?to?25MHz?refer?to?“HSE_VALUE“?define
??*????in?“stm32f4xx.h“?file.?When?HSE?is?used?as?system?clock?source?directly?or
??*????through?PLL?and?you?are?using?different?crystal?you?have?to?adapt?the?HSE
??*????value?to?your?own?configuration.
??*
??*?5.?This?file?configures?the?system?clock?as?follows:
??*=============================================================================
??*=============================================================================
??*????????????????????Supported?STM32F40xxx/41xxx?devices
??*-----------------------------------------------------------------------------
??*????????System?Clock?source????????????????????|?PLL?(HSE)
??*-----------------------------------------------------------------------------
??*????????SYSCLK(Hz)?????????????????????????????|?168000000
??*-----------------------------------------------------------------------------
??*????????HCLK(Hz)???????????????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-11-02?19:01??3.OLED\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\ST\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Include\
?????文件??????704095??2014-08-01?15:30??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h
?????文件????????2233??2014-08-01?15:30??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h
?????文件???????36887??2014-08-04?13:07??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Release_Notes.html
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\
?????文件???????25817??2014-08-01?17:12??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f401xx.s
?????文件???????29605??2014-08-01?17:12??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f40_41xxx.s
?????文件???????29694??2014-08-01?17:12??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f40xx.s
?????文件???????26517??2014-08-01?17:10??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f411xe.s
?????文件???????30979??2014-08-01?17:12??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f427_437xx.s
?????文件???????31054??2014-08-01?17:12??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f427x.s
?????文件???????31134??2014-08-01?17:12??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f429_439xx.s
?????文件???????47782??2014-08-01?17:06??3.OLED\Library\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c
?????目錄???????????0??2019-09-05?15:23??3.OLED\Library\CMSIS\Include\
?????文件????????4676??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\arm_common_tables.h
?????文件????????3666??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\arm_const_structs.h
?????文件??????242444??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\arm_math.h
?????文件???????33042??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\core_cm0.h
?????文件???????40429??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\core_cm0plus.h
?????文件???????99832??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\core_cm3.h
?????文件??????109142??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\core_cm4.h
?????文件???????22735??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\core_cm4_simd.h
?????文件???????17146??2014-07-17?14:52??3.OLED\Library\CMSIS\Include\core_cmFunc.h
............此處省略239個文件信息
- 上一篇:PDF轉換為word
- 下一篇:DS最新秒殺器tb
評論
共有 條評論