CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

another bug??? (test.c)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
lanyong



Joined: 14 Jan 2004
Posts: 9
Location: Xiamen,Fujian Province, China

View user's profile Send private message Send e-mail ICQ Number

another bug??? (test.c)
PostPosted: Thu Jan 15, 2004 7:15 pm     Reply with quote

#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

View user's profile Send private message Send e-mail ICQ Number

sorry , it is my mistake.
PostPosted: Thu Jan 15, 2004 9:12 pm     Reply with quote

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:)
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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