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

interrupt configuration

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



Joined: 25 Apr 2011
Posts: 297

View user's profile Send private message

interrupt configuration
PostPosted: Thu Sep 15, 2011 2:53 pm     Reply with quote

Can someone please share the configuration of the diodes (instead of OR Gate) on portB to make the interrupt configuration? On RB0 there is a 10K pul-up? Really thanks for your help.

aaronik19
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Thu Sep 15, 2011 3:03 pm     Reply with quote

There are no diodes involved in the interrupt configuration of the PIC....

I suspect you might be wanting to 'wire or' several lines together, to give multiple interrupt sources to one pin?. If so:
1) Why bother. Depending on the PIC, you may well have several other interrupt pins, or pins that can be used to generate an interrupt available.
2) Wiring will depend on the polarity of the signals you want to use. Remember, unlike most older chips, the PIC allows you to program the interrupt polarity, so this approach could be used for both positive logic, and negative logic signals.
3) This is really a question for a basic electronics board. This is a _code_ forum.

Best Wishes
aaronik19



Joined: 25 Apr 2011
Posts: 297

View user's profile Send private message

PostPosted: Thu Sep 15, 2011 3:07 pm     Reply with quote

Thanks for your reply. To get a good code performance one needs to build the hardware accordingly. I think I made nothing wrong when I asked this question! I have 5 inputs on portb and I want to generate an interrupt every time one of these pins is pressed. One of the solution is Or-Gate but I have a limitation problem on the board and I need to use diodes instead but i forgot the configuration. Thanks otherwise for your help.
temtronic



Joined: 01 Jul 2010
Posts: 9240
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Sep 15, 2011 6:23 pm     Reply with quote

If you're 'in control' put the signals on RB0, RB4,RB5,RB6 and RB7. They all have easy interrupt capability. RB0 has it's own ISR, while RB4,5,6,7 have one for them all. CCS provides an example in the FAQ section of the onscreen help to show how it can work, and it does, I use it for most of my projects !
aaronik19



Joined: 25 Apr 2011
Posts: 297

View user's profile Send private message

PostPosted: Thu Sep 15, 2011 11:20 pm     Reply with quote

The code is ready and I used it as you said, but the problem that I have is the hardware configuration.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

Diode ORing
PostPosted: Sat Sep 17, 2011 2:57 pm     Reply with quote

I'm assuming you have a 10k pull up on B0.

You connect a separate diode from B0 to each of your inputs.

The diode is connected with its anode to B0 and cathode to its input.

Within reason you can use as many inputs as you wish.

All your inputs will need to spend most of their time either floating or pulled up to Vdd.

B0 will be pulled low when when any input is connected to Vss.

B0 will go high when all the inputs are released.

It's then up to you how you generate the interrupt.

Mike
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