完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,伙计,我使用PIC18F97 J94。我只想在执行睡眠()功能后用It0唤醒深度睡眠模式。我的问题是我也能用iT1唤醒它。数据表上说只有INT0可以唤醒深度睡眠模式,我如何关闭INT1.DSWAKELbits.XX,那里没有引脚(EXT)。
以上来自于百度翻译 以下为原文 Hi guys, im using PIC18F97J94. I only wanna wake up the deep sleep mode with INT0 after execute SLEEP() function. My problem is I can wake it with INT1 too. The datasheet say only INT0 can wake up the DEEP SLEEP MODE, how can I turn off the INT1. DSWAKELbits.XX there ist no pin (EXT). |
|
相关推荐
1个回答
|
|
你好!我也试图从睡眠中唤醒PIC18F97 J94。它从空闲和睡眠模式唤醒只是罚款,但没有唤醒从深睡眠模式在EXT RTC或DSSWT。只有MCLR复位唤醒它。你能告诉我DS模式的配置吗?就是说,你是如何让它在INT0 n INT1上醒来的。这里是我写的代码:-//这是主要部分sprintf(data0,“startt”);.String(data0,2);.String(data0,3);.String(data0,3);.String(data0,4);.(20);sprintf(data1,“等待重启”);.String(data1,2);transmitString(data1,3);.String(data1,4);DS();/*,其中DS定义为IDLEN=0;IDLEN=0;SWDTEN=1;DSWDT=1;DSWDT=1;DSEN=1;DSEN=1;Sleep();//现在我希望PIC唤醒并打印这个againpragma conf如下//CONFIG6L#pragma配置WDTWIN=PS25_0//Watch Dog Timer Window(Watch Dog Timer Window Width是25%)agma config WDTEN=ON//Watchdog Timer Enable(由SWDTEN位设置控制的WDT)pragma config WINDIS=WDTSTD//Window Watchdog Timer.ble(标准WDT选择;Windowd WDT禁用)pragma config WPSA=128//WDT Prescaler(WDT预分频比为1:128)//CONFIG7Lpragma RETEN=ON//保持电压调节器控制启用(睡眠期间由SRETEN控制的保持)pragma config VBTBOR=ON//VBAT BOR启用(启用VBAT BOR)pragma config DSBOREN=OFF//深睡眠BOR启用(深睡眠时BOR禁用(不影响非深睡眠模式下的操作)#pragma config DSBITEN=ON//DSEN位启用位(深度睡眠由寄存器位DSEN控制)//CONFIG7H//CONFIG8L#pragma config DSWDTPS=DSWDTPS=DSWDTD//深度睡眠监视器定时器后置选择(1:262114(8.456Secs)//CONFIG8H#pragma配置DSWDTEN=ON//深度睡眠监视器定时器Enable(DSWDT Enabled)#pragma config DSWDTOSC=LPRC//DSWDT参考时钟选择(DSWDT使用LPRC作为参考时钟),但是上面的代码没有唤醒它。如果我设置DSEN=0,那么它会重置正确的FRM休眠模式。但这也带来了同样的问题。接收到了It0,但PIC没有唤醒。
以上来自于百度翻译 以下为原文 Hi! I am also trying to wake up PIC18F97J94 from deep sleep. It wakes up from IDLE and SLEEP mode just fine, but doesn't wake up from DEEP SLEEP mode on EXT RTC or DSWDT. only MCLR reset wakes it up. can u please tell me the configurations for DS mode? i.e. how u got it to wake up on INT0 n INT1. here is the code I have written:- //this is the main part sprintf(data0 , "startedt"); transmitString(data0 , 2); transmitString(data0 , 3); transmitString(data0 , 4); delay(20); sprintf(data1 , "waiting for restartt"); transmitString(data1 , 2); transmitString(data1 , 3); transmitString(data1 , 4); DS(); /* where DS is defined as IDLEN = 0; IDLEN = 0; SWDTEN = 1; DSWDT = 1; DSWDT = 1; DSEN = 1; DSEN = 1; Sleep(); // now I want PIC to wake up and print this again pragma conf is as follows // CONFIG6L #pragma config WDTWIN = PS25_0 // Watch Dog Timer Window (Watch Dog Timer Window Width is 25 percent) #pragma config WDTCLK = FRC // Watch Dog Timer Clock Source (Use FRC when WINDIS = 0, system clock is not INTOSC/LPRC and device is not in Sleep; otherwise, use INTOSC/LPRC) #pragma config WDTPS = 8192 // Watchdog Timer Postscale (1:8192) // CONFIG6H #pragma config WDTEN = ON // Watchdog Timer Enable (WDT controlled by SWDTEN bit setting) #pragma config WINDIS = WDTSTD // Windowed Watchdog Timer Disable (Standard WDT selected; windowed WDT disabled) #pragma config WPSA = 128 // WDT Prescaler (WDT prescaler ratio of 1:128) // CONFIG7L #pragma config RETEN = ON // Retention Voltage Regulator Control Enable (Retention controlled by SRETEN during Sleep) #pragma config VBTBOR = ON // VBAT BOR Enable (VBAT BOR is enabled) #pragma config DSBOREN = OFF // Deep Sleep BOR Enable (BOR disabled in Deep Sleep (does not affect operation in non-Deep Sleep modes)) #pragma config DSBITEN = ON // DSEN Bit Enable bit (Deep Sleep is controlled by the register bit DSEN) // CONFIG7H // CONFIG8L #pragma config DSWDTPS = DSWDTPSD// Deep Sleep Watchdog Timer Postscale Select (1:262114 (8.456 Secs)) // CONFIG8H #pragma config DSWDTEN = ON // Deep Sleep Watchdog Timer Enable (DSWDT Enabled) #pragma config DSWDTOSC = LPRC // DSWDT Reference Clock Select (DSWDT uses LPRC as reference clock) But above code doesnt wake it up. if I set DSEN = 0; then it resets properly frm SLEEP mode. I tried with ext RTC too. but that gives same problem. INT0 is received but PIC doesnt wake up. |
|
|
|
只有小组成员才能发言,加入小组>>
5178 浏览 9 评论
2003 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3177 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
533浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 11:03 , Processed in 1.387974 second(s), Total 77, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号