28X2 SETINT across multiple ports.

JoeFromOzarks

Senior Member
Hello folks,

I'm using a 28X2 and wish to use the following pins (examples, across multiple ports) as interrupts in an OR configuration: (SETINT: 28X2: only inputs C.0 to C.7, B.0 to B.7 and A.0 to A.3 may be used).
A.0
B.0
B.1
C.0

That is, either A.0 OR B.0 OR B.1 OR C.0 goes high should trigger the interrupt:

How do I configure the SETINT command to eyeball the above pins? What am I missing?

Thank you!

:) joe
 

hippy

Technical Support
Staff member
The SETINT command only works for pins on a specific port; there is no way for it to simultaneous use pins which are on different ports.

You can diode-mix inputs together ( fully or partially ) and take those to a single input pin(s) and then interrupt on that.

This would be a minimal extra component solution assuming you had a B port pin free -
Code:
A.0 >--.----------------| A.0
B.0 >--|----------------| B.0
B.1 >--|----------------| B.1
C.0 >--|-.--------------| C.0
       | |              | 
       | `--|>|--.---.--| B.x
       |         |  .|.
       `----|>|--'  |_|
                    _|_
 

Pongo

Senior Member
I believe the "D3" diode to ground is intended to be a pulldown resistor, suggest 10K or less..
 

hippy

Technical Support
Staff member
Yes, the updated with pull-down is as intended. 10K should be fine.

I was thinking. It may be possible to re-use B.0 or B.1 if you don't want to use another pin, at the cost of an extra diode ...
Code:
A.0 >----.----------------| A.0
B.0 >----|----------------| B.0
B.1 >--. |             .--| B.1
C.0 >--|-|-.-----------|--| C.0
       | | |           |
       | | `--|>|--.---{
       | |         |  .|.
       | `----|>|--{  | |
       |           |  |_|
       `------|>|--'  _|_
If checking which caused the interrupt you can check pinA.0, pinB.0, pinC.0, then, if not one of those, it must have been B.1

But that wouldn't allow you to tell if B.1 were activated if you were allowing / expecting multiple simultaneous inputs.

So the best solution would depend on your application. Using an extra input pin is the safest course if you're not sure.
 

JoeFromOzarks

Senior Member
Thank you Hippy,

The PCB (28X2) has an open port which will be perfect for your recommendations.

This project was handed to me by a fine fellow from Kansas who started the project, designed and had the PCB manufactured but didn’t put all that much consideration into what he really needed and more importantly, how to move his thoughts and desires towards a functioning project. It’s been a chore but I’ve enjoyed it and you folks of RevEd and the Forum members (Pongo) have, once again, made this into a fun/exciting endeavor! I’d better get moving, there are diodes to play with!! :)

Thank you again!

:) joe
 
Top