Interrupt issues.
Posted: Thu Feb 22, 2018 11:08 pm
Hi there,
I'm having an stange issue with interrupts in flowcode6.
The program I'm writing is for a relay switched volume control with input,
output and trim selector switches. I'd like for the input and output switches to trigger an interrupt,which calls a macro to read the switch values and turn on the correct lamps/relays.
All of the relay/lamp and switch inputs and outputs are attached via the i2c bus, using pcf8574 expander chips.
the INTs pin of the pcf8574 input cards are pulled up to +5v and connected to PORTB inputs 0-3.
The individual parts of this design have been tested and are working, however when I set up a test to flash the input and output lamps when the interrupt is triggered, it repeats the macro 14 times before returning to the main loop.
On the simulation it seems to work just fine.
I'm sure this is my error rather than a bug, but it's got me stumped, If anyone fancies taking a look I'd appreciate it.
file attached
cheers,
Robin.
Program version 6, professional licence
EB006v9 - 16f1937.
5v, external power supply.
I'm having an stange issue with interrupts in flowcode6.
The program I'm writing is for a relay switched volume control with input,
output and trim selector switches. I'd like for the input and output switches to trigger an interrupt,which calls a macro to read the switch values and turn on the correct lamps/relays.
All of the relay/lamp and switch inputs and outputs are attached via the i2c bus, using pcf8574 expander chips.
the INTs pin of the pcf8574 input cards are pulled up to +5v and connected to PORTB inputs 0-3.
The individual parts of this design have been tested and are working, however when I set up a test to flash the input and output lamps when the interrupt is triggered, it repeats the macro 14 times before returning to the main loop.
On the simulation it seems to work just fine.
I'm sure this is my error rather than a bug, but it's got me stumped, If anyone fancies taking a look I'd appreciate it.
file attached
cheers,
Robin.
Program version 6, professional licence
EB006v9 - 16f1937.
5v, external power supply.