熱門(mén): 51單片機(jī) | 24小時(shí)必答區(qū) | 單片機(jī)教程 | 單片機(jī)DIY制作 | STM32 | Cortex M3 | 模數(shù)電子 | 電子DIY制作 | 音響/功放 | 拆機(jī)樂(lè)園 | Arduino | 嵌入式OS | 程序設(shè)計(jì)
|
發(fā)布時(shí)間: 2019-5-22 08:54
正文摘要:實(shí)用STC12C5A60S2型號(hào)的單片機(jī),實(shí)現(xiàn)三檔風(fēng)速,利用單片機(jī)內(nèi)部定時(shí)器智能定時(shí),可切換自然風(fēng)和正常風(fēng),使用市場(chǎng)上常見(jiàn)的小遙控器。 電路原理圖如下: |
juncedz 發(fā)表于 2020-8-28 16:53 謝謝解決問(wèn)題 |
| 不錯(cuò)的創(chuàng)意,牛啊 |
| 謝謝分享,51黑有你更精彩! |
| 謝謝分享,51黑有你更精彩! |
|
這個(gè)用什么板子可以燒錄出來(lái)? 是要用自己做的板子還是可以網(wǎng)上買啊? |
| 樓主真的是個(gè)有心人,結(jié)構(gòu)清晰,標(biāo)注詳細(xì) |
51hei團(tuán)團(tuán) 發(fā)表于 2021-4-1 17:45 14 15樓發(fā)的是同一個(gè)頭文件吧 已經(jīng)加進(jìn)去了啊 還是報(bào)錯(cuò) 還是同樣的不能打開(kāi)stc_pwm.h C:\Users\Administrator\Desktop |
言笑晏晏 發(fā)表于 2021-4-1 17:31 把14,15樓發(fā)的頭文件加進(jìn)入就編譯ok了 |
51hei.png (29.95 KB, 下載次數(shù): 135)
stc12c5a60s2紅外PWM可調(diào)占空比.7z
34.58 KB, 下載次數(shù): 15, 下載積分: 黑幣 -5
| can't open file 'stc_pwm.H'怎么解決? |
小穎! 發(fā)表于 2020-8-26 10:51 用這個(gè)可以的 |
4.14 KB, 下載次數(shù): 16, 下載積分: 黑幣 -5
sunboy888888 發(fā)表于 2020-8-26 13:56 用這個(gè)可以的 |
4.14 KB, 下載次數(shù): 21, 下載積分: 黑幣 -5
| 能否請(qǐng)教下 PWM 調(diào)速, PWM 的頻率是多少? |
| 我把stc12c5A60s2.H的頭文件改成了 reg51.H 編譯時(shí)從200個(gè)錯(cuò)誤,變成了main.c - 36 Error(s), 1 Warning(s). 這個(gè)頭文件如何處里?如下main.c(2): warning C318: can't open file 'stc_pwm.H' |
|
在keil中,把#include<STC12C5A60S2.H>頭文件改成 #include<reg51.H>后,兩百多個(gè)提示錯(cuò)誤,變成了36個(gè),但main.c(2): warning C318: can't open file 'stc_pwm.H' main.c(116): error C202: 'CCON': undefined identifier main.c(117): error C202: 'CL': undefined identifier main.c(118): error C202: 'CH': undefined identifier main.c(119): error C202: 'CMOD': undefined identifier main.c(120): error C202: 'CCAPM1': undefined identifier main.c(121): error C202: 'CCAP1H': undefined identifier main.c(122): error C202: 'CCAP1L': undefined identifier main.c(123): error C202: 'CR': undefined identifier main.c(239): error C202: 'CCAP1H': undefined identifier main.c(240): error C202: 'CCAP1L': undefined identifier main.c(255): error C202: 'CCAP1H': undefined identifier main.c(256): error C202: 'CCAP1L': undefined identifier main.c(309): error C202: 'CCAP1H': undefined identifier main.c(310): error C202: 'CCAP1L': undefined identifier main.c(325): error C202: 'CCAP1H': undefined identifier main.c(326): error C202: 'CCAP1L': undefined identifier main.c(344): error C202: 'CCAP1H': undefined identifier main.c(345): error C202: 'CCAP1L': undefined identifier main.c(348): error C202: 'CCAP1H': undefined identifier main.c(349): error C202: 'CCAP1L': undefined identifier main.c(352): error C202: 'CCAP1H': undefined identifier main.c(353): error C202: 'CCAP1L': undefined identifier main.c(356): error C202: 'CCAP1H': undefined identifier main.c(357): error C202: 'CCAP1L': undefined identifier main.c(360): error C202: 'CCAP1H': undefined identifier main.c(361): error C202: 'CCAP1L': undefined identifier main.c(364): error C202: 'CCAP1H': undefined identifier main.c(365): error C202: 'CCAP1L': undefined identifier main.c(464): error C202: 'CCAP1H': undefined identifier main.c(465): error C202: 'CCAP1L': undefined identifier main.c(472): error C202: 'CCAP1H': undefined identifier main.c(473): error C202: 'CCAP1L': undefined identifier main.c(480): error C202: 'CCAP1H': undefined identifier main.c(481): error C202: 'CCAP1L': undefined identifier main.c(488): error C202: 'CCAP1H': undefined identifier main.c(489): error C202: 'CCAP1L': undefined identifier main.c - 36 Error(s), 1 Warning(s).這些如何解決?請(qǐng)高人指點(diǎn)下。。。 ![]() |
sunboy888888 發(fā)表于 2020-8-26 08:27 要添加這個(gè)芯片的頭文件 |
|
compiling main.c... main.c(1): warning C318: can't open file 'STC12C5A60S2.H' main.c(2): warning C318: can't open file 'stc_pwm.H' main.c(12): error C202: 'P1': undefined identifier main.c(13): error C202: 'P3': undefined identifier main.c(14): error C202: 'P3': undefined identifier main.c(21): error C202: 'P3': undefined identifier main.c(22): error C202: 'P2': undefined identifier main.c(23): error C202: 'P1': undefined identifier main.c(24): error C202: 'P1': undefined identifier main.c(25): error C202: 'P1': undefined identifier 打開(kāi)源碼進(jìn)行編譯, 這么多變量沒(méi)有定義,如何解決。。。。。。 |
| 炎熱的夏天這個(gè)設(shè)計(jì)很實(shí)用、 |
| 很有實(shí)用意義的一個(gè)設(shè)計(jì) |
| 很實(shí)用的一個(gè)設(shè)計(jì) |
| 超級(jí)好用 |
|
你好,這個(gè)有定時(shí)功能嗎? |
| 謝謝分享! |
| 謝謝分享!! |
Powered by 單片機(jī)教程網(wǎng)