|
|
View previous topic :: View next topic |
Author |
Message |
lanyong
Joined: 14 Jan 2004 Posts: 9 Location: Xiamen,Fujian Province, China
|
another bug??? (test.c) |
Posted: Thu Jan 15, 2004 7:15 pm |
|
|
#if defined(__PCB__)
#include <16c54.h>
#fuses HS,WDT,NOPROTECT
#use fast_io (A)
#use fast_io (B)
#elif defined(__PCM__)
#include <16F84.h>
#fuses HS,WDT,NOPROTECT
#use fast_io (A)
#use fast_io (B)
#endif
void main()
{
SET_TRIS_B( 0x04 );
SET_TRIS_A( 0x01 );
setup_wdt(WDT_2304MS);
while(1)
{
restart_wdt();
sleep();
output_high(pin_a1); //12bit can't get here,but 14bit can!
output_high(pin_b0);
}
}
//i think there r a bug in 12bit wdt or sleep!
//pls help me, thinks:) |
|
|
lanyong
Joined: 14 Jan 2004 Posts: 9 Location: Xiamen,Fujian Province, China
|
sorry , it is my mistake. |
Posted: Thu Jan 15, 2004 9:12 pm |
|
|
12 bit sleep wake up is diff. from 14bit, so sorry!
#if defined(__PCB__)
#include <16c54.h>
#fuses HS,WDT,NOPROTECT
#use fast_io (A)
#use fast_io (B)
#use delay(clock=4000000)
void main()
{
SET_TRIS_B( 0x04 );
SET_TRIS_A( 0x01 );
setup_wdt(WDT_2304MS);
restart_wdt();
output_low(pin_a1);
output_low(pin_b0);
delay_ms(1000);
output_high(pin_a1);
output_high(pin_b0);
sleep();
}
//¹þ¹þ£¬²»»áËÀ£¡it will run for ever:) |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|