RobTillaart / PCF8575

Arduino library for PCF8575 - 16 channel I2C IO expander
MIT License
74 stars 10 forks source link

read16() is in Interrupt-Routine not possible #39

Closed Torsten61 closed 8 months ago

Torsten61 commented 8 months ago

I wanted to cache/latch the current inputs in an array, because of the slow computer program in the Interrupt call.
Later, the data should be processed in the slow program one after the other (FIFO).

BUT: Unfortunately, read16() does not run in the IR-routine....

Suggested solutions?

RobTillaart commented 8 months ago

Thanks for the question. What board are you using?

Torsten61 commented 8 months ago

Arduino Mega2560 with RS485 and 30 IOs--Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail gesendet.Am 10.02.24, 21:39 schrieb Rob Tillaart @.***>:

Thanks for the question. What board are you using? —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

RobTillaart commented 8 months ago

Same advice as in your previous question - https://github.com/RobTillaart/PCF8574/issues/50 You need a chip with an input latch to solve this.

Given you have a Mega, don't you have still some free pins? If you monitor all input with on board pins you could use a pin change interrupt library. Output lines might be moved to PCF8575. Don't know your requirements so I can only guess if a redesign would help.

RobTillaart commented 8 months ago

This library has no solution for it as far as I know.

Torsten61 commented 8 months ago

So I have to use another HW or optimize the prog-code and use IQR-FLags - Thanks for help!