• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: watchdog 喚醒 sleep 的計數問題
#3
版主
版主


查看用戶資訊
參照:

weaselman 寫道:
由於小弟目前的 PIC18F6620 沒有給 Timer1 外接震盪器
PortB的中斷方式又不可行
目前比較可行的 Sleep 方式只剩下 watchdog


PIC18 在 Sleep 下要被週邊喚醒的方式有底下幾種:
1. PORTB 的 Wake-up on Pin change
2. INT 外部中斷
3. ADC 轉換完成(必須使用內部 RC ADC 振盪)
4. UART 接收
5. SPI Slave Mode 接收
6. I2C Slave Address match
7. Voltage Comparator
8. LVD (Low-Vo;tage Detecter)

Data Sheet 9-6 裏的描述:
All external interrupts (INT0, INT1, INT2 and
INT3) can wake-up the processor from SLEEP, if bit
INTxIE was set prior to going into SLEEP. If the global
interrupt enable bit GIE is set, the processor will branch
to the interrupt vector following wake-up.

10-2 裏的說明:
The input pins (ofRB7:RB4) are compared with the old value latched onthe last read of PORTB. The “mismatch” outputs of
RB7:RB4 are OR’ed together to generate the RB Port
Change Interrupt with flag bit, RBIF (INTCON<0>).
This interrupt can wake the device from SLEEP. The
user, in the Interrupt Service Routine, can clear the
interrupt in the following manner....

SPI Slave 裏的描速: (17-3-6 章)
While in SLEEP mode, the slave can transmit/receive
data. When a byte is received, the device will wake-up
from SLEEP.

I2C Slave (17.4.14)
While in SLEEP mode, the I2C module can receive
addresses or data, and when an address match or
complete byte transfer occurs, wake the processor
from SLEEP (if the MSSP interrupt is enabled).

發表於: 2008/10/21 8:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: watchdog 喚醒 sleep 的計數問題
#2
資深會員
資深會員


查看用戶資訊
設一個 counter, 每第 10 次(或你指定的次數) 進入 watchdog 才作事,並重置此 counter;還不到 10 次就只加一次(或用倒數,減一次) ,再繼續睡。

發表於: 2008/10/21 7:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


watchdog 喚醒 sleep 的計數問題
#1
新會員
新會員


查看用戶資訊
由於小弟目前的 PIC18F6620 沒有給 Timer1 外接震盪器
PortB的中斷方式又不可行
目前比較可行的 Sleep 方式只剩下 watchdog

但是目前所知的 watchdog 設定只有 1: 128 的 後除
想請問一下若要設定較長時間的喚醒計數
以 WDT 為基礎的條件下 有什麼好的方法嗎?
感謝指導~

發表於: 2008/10/20 16:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------