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

re: while

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







re: while
PostPosted: Thu Mar 22, 2007 8:06 am     Reply with quote

Hi there!
I want to receive a 1ms pulse received from x10 power line interface receiver. This pulse occurs within 200us of a 60hz digital zero crossing input to a PIC pin RB0. Input data pin is RB1.

If I use

while(input(PIN_B0)) //zero crossing
{ <--what delay is needed here?
h1=input(PIN_B1);
<--what delay is needed here?
h2=input(PIN_B1);
<--what delay is needed here?
h3=input(PIN_B1);
.
.
.
}
My question is: will input to B1 be successively filled up h1, h2 and h3, etc.. of the bits received for every zero crossing? Or does the "while" allows filling-up of B1 values while pin B0 is high. What i need is, filling up of h's values be done only after each zero crossing...

Your kind help is appreciated...Thanks.
kevcon



Joined: 21 Feb 2007
Posts: 142
Location: Michigan, USA

View user's profile Send private message

PostPosted: Thu Mar 22, 2007 8:24 am     Reply with quote

there are tons of X10/pic examples on the web.

http://ww1.microchip.com/downloads/en/AppNotes/00236a.pdf
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