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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/19/05 06:53
Read: times


 
#89995 - To Kai
Responding to: ???'s previous message
Kai Klaas said:
Geert said:
I will do the check by only reading the PCF8574, that's a good idea (although I prevent the input pin from being written with a '0', see the answer I gave to Erik's remark above).

To be totally clear, whether the strange performance is a hardware or software issue, test the port pin's potential with scope, without having any communication between micro and PCF8574, means neither writing nor reading the PCF8574. The idea behind is, that PCF8574's port pins are all configured as inputs immediately after power-on. And if the port pin's potential works properly without communication, then the mistake will have to do with your code very probably...

Kai


Kai,

I did another test just now. When the device is starte up, I do only one write action to the device, to put pin0 to input and all the others to output.
Otherwise, I don't write anymore to the device, I only read out the status of the pins.

When pressing the key (see original scheme), the level on the input pin goes low, when releasing the switch, the level goes high again.

Moreover, when I check the interrupt line, then I see two nice pulses on this pin: one when I press the button, one when I release the button (you know that I still read the IO expander, otherwise the interrupt line would not go high again).
That's really the behaviour what I want, but then in combination with other pins that are configured as outputs (so that I have the 'freedom' of configuring in- and outputs on the same device).

So, the device is still working fine, despite all the things that have been said about device (was 'shaggy' and 'damaged' and so on). I think it's a proof the device is still in a 'super' condition... ;-)

But I'm still puzzled why the device doesn't behave like that when also sending someting to the device.
As Erik suggested in his very first reaction, it indeed seems like I'm sending a '0' to that input pin, when sending data to the other pins. But I simply don't see where this happens in my code, if it happens! That's my (big) frustration for the moment...
Don't know if you already had a look to the code I posted? Maybe you'll see what I'm possibly doing wrong...

Anyway, I'm already one step further.

The next test I'm going to do, is sending a whole byte to the device driver (using pcf8574_set_Byte(): see the code I posted), iso. sending only one bit to modify the level of a pin configured as an output.
By doing this, I'm excluding the exotic _crol_ and '~' and other actions that I have to do when sending only the bit that has to be changed in the byte to the driver (using pcf8574_set_Bit(): see the code I posted)

Best rgds,

--Geert

List of 77 messages in thread
TopicAuthorDate
Problems with PCF8574 input            01/01/70 00:00      
   best guess            01/01/70 00:00      
      To Erik            01/01/70 00:00      
         So....            01/01/70 00:00      
            To Jez Smith            01/01/70 00:00      
         show the code            01/01/70 00:00      
            To Oleg            01/01/70 00:00      
               How to post code            01/01/70 00:00      
                  To Andy            01/01/70 00:00      
   hmmmmmm            01/01/70 00:00      
      To Jez            01/01/70 00:00      
   RTFDS - using 8574 IO as inputs            01/01/70 00:00      
      To J. Guy            01/01/70 00:00      
         When is pin written ?            01/01/70 00:00      
            My datasheet tells something different..            01/01/70 00:00      
               To Kai            01/01/70 00:00      
                  cutting through the fog            01/01/70 00:00      
            To J. Guy            01/01/70 00:00      
   Where is the difference between...            01/01/70 00:00      
      To Kai            01/01/70 00:00      
         Re:Problems with PCF8574 input            01/01/70 00:00      
         Test it without having any communication            01/01/70 00:00      
            To Kai            01/01/70 00:00      
   Maybe good guess!            01/01/70 00:00      
      To Medhi            01/01/70 00:00      
      Switch terminology            01/01/70 00:00      
         Thanks!            01/01/70 00:00      
            Coonfoosed yeeet            01/01/70 00:00      
               Contact arrangement - nothing else            01/01/70 00:00      
   PCF8574            01/01/70 00:00      
      To Ben            01/01/70 00:00      
   I have used the bugger often            01/01/70 00:00      
      To Erik            01/01/70 00:00      
         helloooooooooo !!            01/01/70 00:00      
            To Erik            01/01/70 00:00      
         Wager...            01/01/70 00:00      
            To Grant            01/01/70 00:00      
      The code...            01/01/70 00:00      
         Thats told 'em :-)            01/01/70 00:00      
            Frightend... ;-)            01/01/70 00:00      
         Formatting            01/01/70 00:00      
            Format flavours.            01/01/70 00:00      
   Insanity            01/01/70 00:00      
      Malaysian Grand Prix...            01/01/70 00:00      
   Some update!!!            01/01/70 00:00      
      Let me comment....            01/01/70 00:00      
         "fancy" code            01/01/70 00:00      
            I'll Suggest...            01/01/70 00:00      
               Pointers and structures            01/01/70 00:00      
         C assumes int            01/01/70 00:00      
            Followed the advice of Michael Karas...            01/01/70 00:00      
               Why not assembly using?            01/01/70 00:00      
                  Assembler code            01/01/70 00:00      
            Well...            01/01/70 00:00      
               int            01/01/70 00:00      
                  Check Maxint ?            01/01/70 00:00      
                     Maxint            01/01/70 00:00      
                  Murdered quote            01/01/70 00:00      
   I2C code            01/01/70 00:00      
      Keil webpage            01/01/70 00:00      
         i2c simulator            01/01/70 00:00      
            Me to blame?            01/01/70 00:00      
               not blaming you!            01/01/70 00:00      
                  Michael B. made a very usefull tool!            01/01/70 00:00      
         hello            01/01/70 00:00      
            Not aware?            01/01/70 00:00      
               thank u            01/01/70 00:00      
                  Name confusion...            01/01/70 00:00      
               hi            01/01/70 00:00      
   Damned, damned, damned...            01/01/70 00:00      
      Ha, ha, ha, ha, ha ....            01/01/70 00:00      
      Calico            01/01/70 00:00      
         Pls. do so!            01/01/70 00:00      
      Keyboard Calico            01/01/70 00:00      
         Christmas            01/01/70 00:00      
            Maybe it was ....            01/01/70 00:00      
            Christmas Presents            01/01/70 00:00      

Back to Subject List