Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/15/06 23:49
Read: times


 
#124387 - AND gate, INT0
Well, since this board has been so helpful to me in improving my inexperienced code- writing, I thought maybe I could find a bit of hardware help as well. Keep in mind that I'm a newb at both circuitry and C, embedded systems, and pretty much anything else that might be discussed on this board. Here's the deal:
In another post ( http://www.8052.com/forum/read.phtml?id=123471 ) I posted some code which was the serial output portion of a keypad scanner I'm working on. The keypad scan works pretty well, aside from some hardware difficulties. I'm relying on a port pin to generate INT0, which wakes up the chip from idle mode and scans the keypad. All my Columns are low, Rows are high. My interrupt pin is also High. Pressing a button connects a column to a row and brings the row low, etc. The software works fine.
I'm using a couple of TI CD4082BE AND gates to bring the interrupt pin low when any button is pressed, aka one of the rows goes low. The AND gate works. Whenever a button is pressed, the output of the gates does in fact go low. But, alas, the interrupt is not generated. It acts like it doesn't want to pull the interrupt pin "low enough" to work.
Regarding the input pin:
I thought that being Push-Pull or Open-Drain didn't matter when a pin is used as an input. That doesn't APPEAR to be the case here. The pin I'm using for INT0 is configured as Push-Pull in the crossbar. This works great If I go around the gate and use jumper wires to simulate a button being pressed by connecting a column to a row and the INT0 pin simultaneously. Never fails. Here's where it gets weird. If I configure the pin as Open-Drain, it WILL work with the AND gates in place, generate the interrupt and scan the keypad, but a BUNCH of weirdo stuff happens. Wrong key decoding, interrupts generated without a button being pressed, etc. I've been fumbling with this on my own for a while now, and I bet I'm either missing something that I don't know about/understand within the IO setup, or I'm going about this the wrong way from a hardware standpoint.
At any rate, that was kind of a long post for a silly problem. I look forward to any help you all may have to offer.
Thanks,
Mark

List of 60 messages in thread
TopicAuthorDate
AND gate, INT0            01/01/70 00:00      
   Some thoughts            01/01/70 00:00      
      Should have stated..            01/01/70 00:00      
         Pullups            01/01/70 00:00      
            I'm a DUMMY            01/01/70 00:00      
   Port modes            01/01/70 00:00      
      Thanks, Kai            01/01/70 00:00      
      I was wrong again            01/01/70 00:00      
         are you too fast?            01/01/70 00:00      
            OK            01/01/70 00:00      
            does this look too fast?            01/01/70 00:00      
               depends on            01/01/70 00:00      
                  idea            01/01/70 00:00      
                     no            01/01/70 00:00      
                        but            01/01/70 00:00      
                           are you looking for \'pressed key high\'?            01/01/70 00:00      
                              Detecting            01/01/70 00:00      
                                 yes            01/01/70 00:00      
                                    Ah, slightly different            01/01/70 00:00      
                                       I tried to read what you posted            01/01/70 00:00      
                                          to clarify            01/01/70 00:00      
                                             overly complicated KISS            01/01/70 00:00      
                                                when..            01/01/70 00:00      
                                             that will be all rows OR all columns plus one of t            01/01/70 00:00      
                                                I'll try again            01/01/70 00:00      
                                                   got it, but            01/01/70 00:00      
                                                   Heavily unsuited!            01/01/70 00:00      
                                                      Well            01/01/70 00:00      
                                                      OR            01/01/70 00:00      
                                                         Still unsuited...            01/01/70 00:00      
                                                            I Think....            01/01/70 00:00      
                                                               and now you will make a better one and ....            01/01/70 00:00      
                                                                  If it's bad, toss it!            01/01/70 00:00      
                                                               No shame at all!            01/01/70 00:00      
                                                            well, any decent code will do the two steps            01/01/70 00:00      
               too fast?            01/01/70 00:00      
   why to the hell ?            01/01/70 00:00      
      Before sending somebody to hell, read carefully!            01/01/70 00:00      
         leave idle by timer            01/01/70 00:00      
            debounce            01/01/70 00:00      
   Other method            01/01/70 00:00      
      Oh            01/01/70 00:00      
   a language lesson and some general co0mments            01/01/70 00:00      
      Don't be silly...            01/01/70 00:00      
         as I said            01/01/70 00:00      
            Erik, please!            01/01/70 00:00      
               I said nothing about an AND gate            01/01/70 00:00      
                  Have fun...            01/01/70 00:00      
                  well,            01/01/70 00:00      
                     No, it does not            01/01/70 00:00      
                     You are right, Mark            01/01/70 00:00      
                        if so, wht are there two symbols ?            01/01/70 00:00      
                           So what?            01/01/70 00:00      
                              because some of us want to show the intention            01/01/70 00:00      
                                 Intentions            01/01/70 00:00      
                                    chip and function            01/01/70 00:00      
                                       Sorry, but this becomes more and more ridiculous            01/01/70 00:00      
                                          that a correct description makes the function            01/01/70 00:00      
      wait a minute...            01/01/70 00:00      
   I just recall            01/01/70 00:00      

Back to Subject List