検索
AND検索
OR検索
トップ
|
リロード
|
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
LEDの明るさを変える(PWM)(12F683) をテンプレートにして作成
★トップ(目次)ページへ
★情報交換掲示板
08/08/14設置
今日の10件
PICとMikroC
(504)
A/D値でLEDの明るさ変更(PWM LCD表示 16F1827 XC8)
(4)
スイッチ入力(16F886)
(3)
PIC-PICの通信(USART)
(3)
I2C通信LCD表示法(16F1827 XC8)
(3)
純正:PICkit3 3,900円
(3)
ライントレースカー(基本機能のみ搭載)
(2)
XC8:変数の型のタイプと値の範囲
(2)
LCD表示法(基礎)
(2)
新型PIC18F系
(2)
最新の15件
2024-04-02
インターバルタイマ(TMR0割込み利用)(16F886)
XC8:変数の型のタイプと値の範囲
XC8:プログラミング書式の確認
XC8:コンフィグレーションワード記述書式について
スリープ(PICの消費電力を最小に)
PWM機能
2024-01-29
MikroCの特徴
RecentDeleted
2023-12-22
RCDライタ 350円
LEDの明るさを変える(PWM)(24FJ64)
ライントレースカー(基本機能のみ搭載)
発光ダイオード(LED)の点滅(16F1827 XC8)
2023-09-12
I2C通信LCD表示法(16F1827 XC8)
2023-07-06
PIC-PICの通信(USART)
2023-07-04
16F1827のconfig設定
#amazon(4798109223)
Total:0/Today:0
開始行:
閲覧総計:&counter(); (本日:&counter(today); 昨日...
*発光ダイオード(LED)の明るさを変える(PWM) [#zb760731]
PIC内蔵の「PWM(Pulse Width Modulation)機能」を利用した簡...
12F683の「PWM制御」機能の利用法、稼働を確認しました。 ...
注)12F683の場合、PWM信号はGP2から発信される。
関連MikroC関数
void Pwm_Init(unsigned long freq);
void Pwm_Change_Duty(unsigned short duty_ratio);
void Pwm_Start(void);
void Pwm_Stop(void);
&attachref(P1010276.JPG,zoom,150x150,button){新しい写真添...
/**
* 12F683の稼働テスト
* PWM機能で発光ダイオードの明るさを徐々に変える
*
* PIC12F683
* GP2: LED (CCP(PWM)出力)
* GP1: LED (照度比較用)
* Clock: 8.0MHz 内蔵発信器使用
* Device Flags:
* _CP_OFF _MCLRE_OFF _PWRTE_ON _WDT_OFF _INTRC_OSC_NO...
*
* MikroC v6.2.1
*/
void main() {
//使用変数の定義
unsigned short int i;
//マイコンの初期化
//内臓クロック8MHzに設定
OSCCON.IRCF2=1;
OSCCON.IRCF1=1;
OSCCON.IRCF0=1;
GPIO = 0b00000000; //GPIOの中身をきれいにする
TRISIO = 0b00000000; //GPIP全て0:出力設定
PWM_Init(5000); //PWMの初期化 (5KHz周期指定)
//マイコンの初期化終わり
GPIO.F1 = 1; //照度比較用LED ON
PWM_Start(); //PWM機能スタート
do {
//LEDの明るさを徐々に変える
for (i = 0; i < 256; i++) {
PWM_Change_Duty(i); //PWMのDuty変更
Delay_ms(100); //100msec待つ
}
} while(1);
}
★この情報は役に立ちましたか?
#vote(はい[112],普通[62],いいえ[71])
- http://www.cybermondaydeals.in.net http://www.michaelk...
- http://www.nike-shoes.in.net/ http://www.bostoncelticsj...
- http://www.marcjacobs.us.com/ http://www.designerhandba...
- 催淫カプセル:http://www.okkanpo.com/Product/245.html o...
- 巨人倍増:http://www.chinakanpo.com/product/jrbz.html ...
- 20190109 junda http://www.coach-factory-outlet-online.u...
- 20190109 junda http://www.coach-factory-outlet-online.u...
- 20190109 junda http://www.coach-factory-outlet-online.u...
- chenyingying2017106 http://www.oakley-sunglasses.net.co...
- chenyingying2017106 http://www.oakley-sunglasses.net.co...
- http://www.cheapnikenfljerseyswholesale.us http://www.u...
- http://www.cheapnikenfljerseyswholesale.us http://www.u...
- http://www.giuseppezanottioutlet.us.com http://www.cana...
- http://www.giuseppezanottioutlet.us.com http://www.cana...
- https://www.5brat-m7asb.com/2018/12/Expenses_15.html ...
- https://www.reallrishta.com/ -- [[https://www.reallrish...
- 2022年ホンダシビック:エボリューションスタイル 新しい...
- https://qmt-alafdal.com/%d8%b2%d8%ac%d8%a7%d8%ac-%d8%b3...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/%d9%85%d8%a4%d8%b3%d8%b3%d8%a9-...
- https://qmt-alafdal.com/%d8%a3%d9%81%d8%b6%d9%84-%d8%b4...
- https://qmt-alafdal.com/%d8%ae%d8%af%d9%85%d8%a9-%d9%83...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d9%83...
- https://qmt-alafdal.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%B9...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/%d8%a7%d9%81%d8%b6%d9%84-%d8%b4...
- https://qmt-alafdal.com/%d8%a7%d9%81%d8%b6%d9%84-%d8%b4...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d9%83...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d9%83...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/ -- [[افض...
- https://www.aqary21.com/ -- [[شقق ...
- https://www.aqary21.com/%d8%b4%d9%82%d9%82-%d9%84%d9%84...
- https://www.aqary21.com/%d8%b4%d8%a7%d9%84%d9%8a%d9%87%...
- https://www.aqary21.com/%d8%a7%d8%b1%d8%b6-%d9%84%d9%84...
- https://www.aqary21.com/%d8%b4%d9%82%d8%a9-%d8%a8%d8%a7...
- https://www.aqary21.com/ -- [[شقق ...
- https://directory.mirror.co.uk/search/united-kingdom/kl...
- https://validator.w3.org/unicorn/check?ucn_task=conform...
- https://www.googleadservices.com/url?q=https%3A%2F%2Fki...
- https://adsense-ko.googleblog.com/2015/05/blog-post.htm...
- http://scholar.google.fr/citations?user=A2K0gcAAAAJ&hl=...
- https://images.google.com/url?q=https://kibla.de/%2F ht...
- معلومستا...
- [url=https://www.maalomsta.com/2022/12/hyundai-venue.ht...
#comment_nospam
終了行:
閲覧総計:&counter(); (本日:&counter(today); 昨日...
*発光ダイオード(LED)の明るさを変える(PWM) [#zb760731]
PIC内蔵の「PWM(Pulse Width Modulation)機能」を利用した簡...
12F683の「PWM制御」機能の利用法、稼働を確認しました。 ...
注)12F683の場合、PWM信号はGP2から発信される。
関連MikroC関数
void Pwm_Init(unsigned long freq);
void Pwm_Change_Duty(unsigned short duty_ratio);
void Pwm_Start(void);
void Pwm_Stop(void);
&attachref(P1010276.JPG,zoom,150x150,button){新しい写真添...
/**
* 12F683の稼働テスト
* PWM機能で発光ダイオードの明るさを徐々に変える
*
* PIC12F683
* GP2: LED (CCP(PWM)出力)
* GP1: LED (照度比較用)
* Clock: 8.0MHz 内蔵発信器使用
* Device Flags:
* _CP_OFF _MCLRE_OFF _PWRTE_ON _WDT_OFF _INTRC_OSC_NO...
*
* MikroC v6.2.1
*/
void main() {
//使用変数の定義
unsigned short int i;
//マイコンの初期化
//内臓クロック8MHzに設定
OSCCON.IRCF2=1;
OSCCON.IRCF1=1;
OSCCON.IRCF0=1;
GPIO = 0b00000000; //GPIOの中身をきれいにする
TRISIO = 0b00000000; //GPIP全て0:出力設定
PWM_Init(5000); //PWMの初期化 (5KHz周期指定)
//マイコンの初期化終わり
GPIO.F1 = 1; //照度比較用LED ON
PWM_Start(); //PWM機能スタート
do {
//LEDの明るさを徐々に変える
for (i = 0; i < 256; i++) {
PWM_Change_Duty(i); //PWMのDuty変更
Delay_ms(100); //100msec待つ
}
} while(1);
}
★この情報は役に立ちましたか?
#vote(はい[112],普通[62],いいえ[71])
- http://www.cybermondaydeals.in.net http://www.michaelk...
- http://www.nike-shoes.in.net/ http://www.bostoncelticsj...
- http://www.marcjacobs.us.com/ http://www.designerhandba...
- 催淫カプセル:http://www.okkanpo.com/Product/245.html o...
- 巨人倍増:http://www.chinakanpo.com/product/jrbz.html ...
- 20190109 junda http://www.coach-factory-outlet-online.u...
- 20190109 junda http://www.coach-factory-outlet-online.u...
- 20190109 junda http://www.coach-factory-outlet-online.u...
- chenyingying2017106 http://www.oakley-sunglasses.net.co...
- chenyingying2017106 http://www.oakley-sunglasses.net.co...
- http://www.cheapnikenfljerseyswholesale.us http://www.u...
- http://www.cheapnikenfljerseyswholesale.us http://www.u...
- http://www.giuseppezanottioutlet.us.com http://www.cana...
- http://www.giuseppezanottioutlet.us.com http://www.cana...
- https://www.5brat-m7asb.com/2018/12/Expenses_15.html ...
- https://www.reallrishta.com/ -- [[https://www.reallrish...
- 2022年ホンダシビック:エボリューションスタイル 新しい...
- https://qmt-alafdal.com/%d8%b2%d8%ac%d8%a7%d8%ac-%d8%b3...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/%d9%85%d8%a4%d8%b3%d8%b3%d8%a9-...
- https://qmt-alafdal.com/%d8%a3%d9%81%d8%b6%d9%84-%d8%b4...
- https://qmt-alafdal.com/%d8%ae%d8%af%d9%85%d8%a9-%d9%83...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d9%83...
- https://qmt-alafdal.com/%D8%B4%D8%B1%D9%83%D8%A9-%D8%B9...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%aa...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/%d8%a7%d9%81%d8%b6%d9%84-%d8%b4...
- https://qmt-alafdal.com/%d8%a7%d9%81%d8%b6%d9%84-%d8%b4...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d9%83...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d9%83...
- https://qmt-alafdal.com/%d8%b4%d8%b1%d9%83%d8%a9-%d8%b9...
- https://qmt-alafdal.com/ -- [[افض...
- https://www.aqary21.com/ -- [[شقق ...
- https://www.aqary21.com/%d8%b4%d9%82%d9%82-%d9%84%d9%84...
- https://www.aqary21.com/%d8%b4%d8%a7%d9%84%d9%8a%d9%87%...
- https://www.aqary21.com/%d8%a7%d8%b1%d8%b6-%d9%84%d9%84...
- https://www.aqary21.com/%d8%b4%d9%82%d8%a9-%d8%a8%d8%a7...
- https://www.aqary21.com/ -- [[شقق ...
- https://directory.mirror.co.uk/search/united-kingdom/kl...
- https://validator.w3.org/unicorn/check?ucn_task=conform...
- https://www.googleadservices.com/url?q=https%3A%2F%2Fki...
- https://adsense-ko.googleblog.com/2015/05/blog-post.htm...
- http://scholar.google.fr/citations?user=A2K0gcAAAAJ&hl=...
- https://images.google.com/url?q=https://kibla.de/%2F ht...
- معلومستا...
- [url=https://www.maalomsta.com/2022/12/hyundai-venue.ht...
#comment_nospam
ページ名: