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

Int_rb using RB3,RB2..

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



Joined: 09 Jul 2004
Posts: 40
Location: Europe

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

Int_rb using RB3,RB2..
PostPosted: Sat Oct 16, 2004 8:23 pm     Reply with quote

How do you think is that must work? or not?

www.icd2.front.ru/switch.jpg
Guest








Re: Int_rb using RB3,RB2..
PostPosted: Sat Oct 16, 2004 9:18 pm     Reply with quote

Userrr wrote:
How do you think is that must work? or not?

www.icd2.front.ru/switch.jpg


All I get is a russian web page with another link followed by page not found.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Sun Oct 17, 2004 12:53 am     Reply with quote

Well, any time switch 1 is closed both RB3 and RB4 will be tied to ground no matter what switch 2 is doing. Don't see the point in having switch 1 being a 2 pole switch. Of course you will need to turn on port B pullups.
Userrr



Joined: 09 Jul 2004
Posts: 40
Location: Europe

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

d
PostPosted: Sun Oct 17, 2004 4:52 pm     Reply with quote

But how realize debounce between this stitch and how realize RB3.
I must
get interrupt for RB4,and for RB3:
How for SW1 get it?

#int_rb
void detect_rb_change() {
int current;
set_tris_b(0xFF); // all input
current=input_b(); //save old value

#if LOWTOHIGH

if ((!bit_test(last,4))&&(bit_test(current,4)))
{ } //SW2 push down

}
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