![]() |
發布時間: 2019-5-22 08:54
正文摘要:實用STC12C5A60S2型號的單片機,實現三檔風速,利用單片機內部定時器智能定時,可切換自然風和正常風,使用市場上常見的小遙控器。 電路原理圖如下: |
juncedz 發表于 2020-8-28 16:53 謝謝解決問題 |
不錯的創意,牛啊 |
謝謝分享,51黑有你更精彩! |
謝謝分享,51黑有你更精彩! |
這個用什么板子可以燒錄出來? 是要用自己做的板子還是可以網上買啊? |
樓主真的是個有心人,結構清晰,標注詳細 |
51hei團團 發表于 2021-4-1 17:45 14 15樓發的是同一個頭文件吧 已經加進去了啊 還是報錯 還是同樣的不能打開stc_pwm.h C:\Users\Administrator\Desktop |
言笑晏晏 發表于 2021-4-1 17:31 把14,15樓發的頭文件加進入就編譯ok了 |
51hei.png (29.95 KB, 下載次數: 135)
34.58 KB, 下載次數: 15, 下載積分: 黑幣 -5
can't open file 'stc_pwm.H'怎么解決。 |
小穎! 發表于 2020-8-26 10:51 用這個可以的 |
4.14 KB, 下載次數: 16, 下載積分: 黑幣 -5
sunboy888888 發表于 2020-8-26 13:56 用這個可以的 |
4.14 KB, 下載次數: 21, 下載積分: 黑幣 -5
能否請教下 PWM 調速, PWM 的頻率是多少? |
我把stc12c5A60s2.H的頭文件改成了 reg51.H 編譯時從200個錯誤,變成了main.c - 36 Error(s), 1 Warning(s). 這個頭文件如何處里?如下main.c(2): warning C318: can't open file 'stc_pwm.H' |
在keil中,把#include<STC12C5A60S2.H>頭文件改成 #include<reg51.H>后,兩百多個提示錯誤,變成了36個,但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).這些如何解決?請高人指點下。。。 ![]() |
sunboy888888 發表于 2020-8-26 08:27 要添加這個芯片的頭文件 |
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 打開源碼進行編譯, 這么多變量沒有定義,如何解決。。。。。。 |
炎熱的夏天這個設計很實用、 |
很有實用意義的一個設計 |
很實用的一個設計 |
超級好用 |
你好,這個有定時功能嗎? |
謝謝分享! |
謝謝分享。 |