検索
AND検索
OR検索
トップ
|
リロード
|
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
スリープ(PICの消費電力を最小に) をテンプレートにして作成
★トップ(目次)ページへ
★情報交換掲示板
08/08/14設置
今日の10件
PICとMikroC
(75)
I2C通信LCD表示法(16F1827 XC8)
(2)
発光ダイオード(LED)の点灯、点滅
(2)
MPLAB Xのデバッガーの使用法
(1)
MikroC TIPS
(1)
MenuBar
(1)
PIC-PICの無線通信(ラジコンへの応用)
(1)
PIC-PICの通信(USART)
(1)
LEDの明るさを変える(PWM)(18F2320)
(1)
16F628A PORTAスイッチ入力
(1)
最新の15件
2023-09-19
RecentDeleted
2023-09-12
I2C通信LCD表示法(16F1827 XC8)
2023-08-23
XC8:コンフィグレーションワード記述書式について
2023-07-16
MikroCの特徴
スリープ(PICの消費電力を最小に)
2023-07-07
ライントレースカー(基本機能のみ搭載)
2023-07-06
PIC-PICの通信(USART)
2023-07-04
16F1827のconfig設定
PICとMikroC
2023-06-06
A/D値でLED点滅間隔変更(12F683)
2023-05-29
LEDの明るさを変える(PWM)(16F886)
2023-05-20
1024分解能ハードPWM制御自作関数
2023-05-18
LEDの明るさを変える(PWM)(12F683)
2023-04-26
モータの前転・後転
2023-03-18
MPLAB Xのデバッガーの使用法
#amazon(4798109223)
Total:0/Today:0
開始行:
閲覧総計:&counter(); (本日:&counter(today); 昨日...
PICをボタン電池で駆動させる場合、PICが動作していない時の...
有用である。
今回、PICをスリープ状態にする手法とスリープ状態から復帰さ...
したので記録に残しておく。 2013/10/06
【ポイント】
・PICをスリープ状態にする
while(1) {
SLEEP(); //PICをスリープ状態にする
NOP(); //sleepから復帰後、必ず1命令実行されるダミー命令
}
・PICをスリープ状態から復帰させる
RB0/INT割り込みで復帰させる。
|&attachref(TS3V0003.JPG,zoom,150x150,button){新しい写真...
~
*XC8のプログラム [#vc816c21]
/*
* File: sleep_main.c
* Author: 管理人
*
* Created on 2013/10/06, 12:06
*/
#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
#pragma config BOREN = OFF, CPD = OFF, FOSC = INTOSCIO, ...
/*PICをスリープにする手法と復帰させる手法の確認
* RB0/INT割込みによりPICをスリープ状態から復帰させる手法
* 16F628A XC8 v1.20
* RA1:LED, RB0:スイッチ
*/
int main(int argc, char** argv) {
PORTA = 0b00000000; //PORTAの中身をきれいにする
PORTB = 0b00000000; //PORTBの中身をきれいにする
TRISA = 0b00110000; //PORTAのRA5,RA4は1:入力に、他は...
TRISB = 0b00011001; //PORTBのRB4,RB3,RB0は1:入力に、...
CMCON = 0b00000111; //PORTAのコンパレータ機能は使用...
OPTION_REGbits.nRBPU = 0; //0:PORTBの内部ウィークプ...
OPTION_REGbits.INTEDG = 0; //0:RB0/INT立下りエッジで...
INTCONbits.INTF = 0; //RB0/INT割込みフラグクリア
INTCONbits.INTE = 1; //RB0/INT割り込み許可
INTCONbits.GIE = 1; //全体割込み許可
while(1) {
//RB0/INT割込みによりPICをスリープ状態から復帰さ...
SLEEP(); //PICをスリープ状態にする
NOP(); //sleepから復帰後、必ず1命令実行されるダ...
}
return (EXIT_SUCCESS);
}
static void interrupt isr(void) {
INTCONbits.INTE = 0; //RB0/INT割り込み禁止
INTCONbits.GIE = 0; //全体割込み禁止
if(INTCONbits.INTF == 1) { //割込み種がRB0/INT割込み...
if(PORTAbits.RA1 == 1) { //RA1LEDが点灯していた...
PORTAbits.RA1 = 0; //RA1をLowに
}
else { //RA1LEDが消灯していた場合
PORTAbits.RA1 = 1; //RA1をHigtに
}
}
INTCONbits.INTF = 0; //RB0/INT割込みフラグクリア
INTCONbits.INTE = 1; //RB0/INT割り込み許可
INTCONbits.GIE = 1; //全体割込み許可
}
~
★この情報は役に立ちましたか?
#vote(はい[59],普通[34],いいえ[36])
- 2015-10-6 xiaozhengm http://www.louisvuitton-lvoutl...
- Centre http://www.michaelkorsoutlets-online.us.com/ htt...
- http://www.cybermondaydeals.in.net http://www.michaelk...
- http://www.nike-shoes.in.net/ http://www.bostoncelticsj...
- 媚薬:http://www.xxkanpo.com/ d10媚薬:http://xn--d10-hl9...
- 巨人倍増:http://www.chinakanpo.com/product/jrbz.html ...
- 催淫カプセル:http://www.okkanpo.com/Product/245.html o...
- "Today http://www.retro-jordans.com/ can be http://www....
- http://www.yeezyboost350.us.com/ Yeezy Boost 350 V2 Zeb...
- http://www.spinnerfidgettoy.us/ Fidget Spinner Toy htt...
- http://www.cheapnikenfljerseyswholesale.us http://www.u...
- http://www.giuseppezanottioutlet.us.com http://www.cana...
- Battery energy storage systems – All you need To ...
- http://www.yeezyshoes.us.com/ Yeezy Shoes http://www.ye...
- https://www.adidasuk.uk.com/ Adidas UK https://www.jord...
- Off White x Air Force 1 https://www.nike-off-white.com/...
- https://lava79.com/ https://lava79.com/tag/lavagame/ ht...
- http://se03.cside.jp/~webooo/zippo/naviz.cgi?jump=82&ur...
- https://www.bing.com/news/apiclick.aspx?ref=FexRss&aid...
- We also provide cell phone camera repair services inclu...
- The compact flash standard was initially created to sto...
- We also provide cell phone camera repair services inclu...
- https://www.adidasuk.uk.com/ Adidas UK https://www.jord...
- https://www.yeezysofficialsite.com/ Yeezy https://www.a...
- https://dentalstockphotos.com/ -- [[dentalstockphotos]]...
- https://buymagicshrooms.com.au/ https://buymagicshrooms...
- https://buymagicshrooms.com.au/ https://buymagicshrooms...
- https://www.yeezysofficialsite.com/ Yeezy https://www.a...
- https://420buds2go.com https://420buds2go.com/product/b...
- https://420buds2go.com https://420buds2go.com/product/b...
- https://420buds2go.com https://420buds2go.com/product/b...
- https://siana-ksa.com/ -- [[siana]] &new{2022-12-31 (土...
- https://almsaeya.com/ -- [[almsaeya]] &new{2022-12-31 (...
- https://www.alomrancoo.com/ -- [[alomrancoo]] &new{2022...
- https://alshayae.com/ -- [[alshayae]] &new{2022-12-31 (...
- https://atqwa.com/ -- [[atqwa]] &new{2022-12-31 (土) 01...
- https://atqwy.com/ -- [[atqwy]] &new{2022-12-31 (土) 01...
- https://trippyshrooms.net https://psilocybinworld.net h...
- https://shroomstoreuk.com/ https://shroomstoreuk.com/p...
- https://shroomstoreuk.com/ https://shroomstoreuk.com/pr...
- https://shopshroomsaustralia.com/product-category/where...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://denvershroomstore.co...
- https://boinc.berkeley.edu/test/show_user.php?userid=10...
- https://shroomstoreuk.com/ https://denvershroomstore.co...
#comment_nospam
終了行:
閲覧総計:&counter(); (本日:&counter(today); 昨日...
PICをボタン電池で駆動させる場合、PICが動作していない時の...
有用である。
今回、PICをスリープ状態にする手法とスリープ状態から復帰さ...
したので記録に残しておく。 2013/10/06
【ポイント】
・PICをスリープ状態にする
while(1) {
SLEEP(); //PICをスリープ状態にする
NOP(); //sleepから復帰後、必ず1命令実行されるダミー命令
}
・PICをスリープ状態から復帰させる
RB0/INT割り込みで復帰させる。
|&attachref(TS3V0003.JPG,zoom,150x150,button){新しい写真...
~
*XC8のプログラム [#vc816c21]
/*
* File: sleep_main.c
* Author: 管理人
*
* Created on 2013/10/06, 12:06
*/
#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
#pragma config BOREN = OFF, CPD = OFF, FOSC = INTOSCIO, ...
/*PICをスリープにする手法と復帰させる手法の確認
* RB0/INT割込みによりPICをスリープ状態から復帰させる手法
* 16F628A XC8 v1.20
* RA1:LED, RB0:スイッチ
*/
int main(int argc, char** argv) {
PORTA = 0b00000000; //PORTAの中身をきれいにする
PORTB = 0b00000000; //PORTBの中身をきれいにする
TRISA = 0b00110000; //PORTAのRA5,RA4は1:入力に、他は...
TRISB = 0b00011001; //PORTBのRB4,RB3,RB0は1:入力に、...
CMCON = 0b00000111; //PORTAのコンパレータ機能は使用...
OPTION_REGbits.nRBPU = 0; //0:PORTBの内部ウィークプ...
OPTION_REGbits.INTEDG = 0; //0:RB0/INT立下りエッジで...
INTCONbits.INTF = 0; //RB0/INT割込みフラグクリア
INTCONbits.INTE = 1; //RB0/INT割り込み許可
INTCONbits.GIE = 1; //全体割込み許可
while(1) {
//RB0/INT割込みによりPICをスリープ状態から復帰さ...
SLEEP(); //PICをスリープ状態にする
NOP(); //sleepから復帰後、必ず1命令実行されるダ...
}
return (EXIT_SUCCESS);
}
static void interrupt isr(void) {
INTCONbits.INTE = 0; //RB0/INT割り込み禁止
INTCONbits.GIE = 0; //全体割込み禁止
if(INTCONbits.INTF == 1) { //割込み種がRB0/INT割込み...
if(PORTAbits.RA1 == 1) { //RA1LEDが点灯していた...
PORTAbits.RA1 = 0; //RA1をLowに
}
else { //RA1LEDが消灯していた場合
PORTAbits.RA1 = 1; //RA1をHigtに
}
}
INTCONbits.INTF = 0; //RB0/INT割込みフラグクリア
INTCONbits.INTE = 1; //RB0/INT割り込み許可
INTCONbits.GIE = 1; //全体割込み許可
}
~
★この情報は役に立ちましたか?
#vote(はい[59],普通[34],いいえ[36])
- 2015-10-6 xiaozhengm http://www.louisvuitton-lvoutl...
- Centre http://www.michaelkorsoutlets-online.us.com/ htt...
- http://www.cybermondaydeals.in.net http://www.michaelk...
- http://www.nike-shoes.in.net/ http://www.bostoncelticsj...
- 媚薬:http://www.xxkanpo.com/ d10媚薬:http://xn--d10-hl9...
- 巨人倍増:http://www.chinakanpo.com/product/jrbz.html ...
- 催淫カプセル:http://www.okkanpo.com/Product/245.html o...
- "Today http://www.retro-jordans.com/ can be http://www....
- http://www.yeezyboost350.us.com/ Yeezy Boost 350 V2 Zeb...
- http://www.spinnerfidgettoy.us/ Fidget Spinner Toy htt...
- http://www.cheapnikenfljerseyswholesale.us http://www.u...
- http://www.giuseppezanottioutlet.us.com http://www.cana...
- Battery energy storage systems – All you need To ...
- http://www.yeezyshoes.us.com/ Yeezy Shoes http://www.ye...
- https://www.adidasuk.uk.com/ Adidas UK https://www.jord...
- Off White x Air Force 1 https://www.nike-off-white.com/...
- https://lava79.com/ https://lava79.com/tag/lavagame/ ht...
- http://se03.cside.jp/~webooo/zippo/naviz.cgi?jump=82&ur...
- https://www.bing.com/news/apiclick.aspx?ref=FexRss&aid...
- We also provide cell phone camera repair services inclu...
- The compact flash standard was initially created to sto...
- We also provide cell phone camera repair services inclu...
- https://www.adidasuk.uk.com/ Adidas UK https://www.jord...
- https://www.yeezysofficialsite.com/ Yeezy https://www.a...
- https://dentalstockphotos.com/ -- [[dentalstockphotos]]...
- https://buymagicshrooms.com.au/ https://buymagicshrooms...
- https://buymagicshrooms.com.au/ https://buymagicshrooms...
- https://www.yeezysofficialsite.com/ Yeezy https://www.a...
- https://420buds2go.com https://420buds2go.com/product/b...
- https://420buds2go.com https://420buds2go.com/product/b...
- https://420buds2go.com https://420buds2go.com/product/b...
- https://siana-ksa.com/ -- [[siana]] &new{2022-12-31 (土...
- https://almsaeya.com/ -- [[almsaeya]] &new{2022-12-31 (...
- https://www.alomrancoo.com/ -- [[alomrancoo]] &new{2022...
- https://alshayae.com/ -- [[alshayae]] &new{2022-12-31 (...
- https://atqwa.com/ -- [[atqwa]] &new{2022-12-31 (土) 01...
- https://atqwy.com/ -- [[atqwy]] &new{2022-12-31 (土) 01...
- https://trippyshrooms.net https://psilocybinworld.net h...
- https://shroomstoreuk.com/ https://shroomstoreuk.com/p...
- https://shroomstoreuk.com/ https://shroomstoreuk.com/pr...
- https://shopshroomsaustralia.com/product-category/where...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://shopshroomsaustralia...
- https://shroomstoreuk.com/ https://denvershroomstore.co...
- https://boinc.berkeley.edu/test/show_user.php?userid=10...
- https://shroomstoreuk.com/ https://denvershroomstore.co...
#comment_nospam
ページ名: