I have used the PCF8574 driver that was provided here:
viewtopic.php?f=41&t=916Writing to the PCF8574 is no problem at all. But if I read a button the application crashes most of the time.
what I do is quite simple and straight forward:
- connecting 4 LED's to P0 - P3
- connecting a button between Pin 9 (P4) and ground
That should do the job, one would think. But it crashes quite often. Adding a Wait1Msec(1500); or so doesn't help either.
It seems that if I modify the code to this is seems to work better:
I have used the PCF8574 driver that was provided here:
viewtopic.php?f=41&t=916Writing to the PCF8574 is no problem at all. But if I read a button the application crashes most of the time.
what I do is quite simple and straight forward:
- connecting 4 LED's to P0 - P3
- connecting a button between Pin 9 (P4) and ground
It seems to be that the latter code works better, but still crashes if I keep the button pushed. What is the cause of this behaviour?!