each of the 4 comparators provide a sole interrupt, have a look into the datasheet of your COMP-module. You have to use an API to enable the interrupt and then you do not need any pin.
Are you familar with the (a bit complex) way to tell your PSoC to execute your interrupt-code?
This is really good news, gonna check this immediately, thanks for the information.
The PSoC familly is very rich in terms of ressouces, so a lot to read before being proficient, this requires time...
I'm familiar with interrupt sequences on other microcontroller brands, have already analysed how the PSoC1 Interrupt Controller works and how to manage the handler(s) so I don't think I'd be stuck on insoluble problems on this side.
But if needed, will ask for.
So as I see you are not yet experienced in writing interrupt routines for PSoC1, it is (as I said) a bit complicated.
Interrupt routines should be kept small to have a small latency, but for now I would prefer every simple but working solution.
#pragma interrupt_handler MyIntRoutine
// All registers used in this routine are saved on the stack by the compiler
// Do NOT call delay-functions, don't wait for anything, no LCD-output
// Simplest is to set a flag and test for it in the main-loop
// When calling a function() within this interrupt-routine the compiler will generate additional code
// to save ALL REGISTERS on the stack at entry of the interrupt routine (~ 22 bytes)
Edit the file "Boot.tpl" (you'll have to search for it in the pjoject folder). This file is a template (thus the .tpl) from which the "Boot.asm" is generated. The jump-table and its entries are clearly marked. insert at the appropiate plae a
LJMP _MyIntRoutine ; The unserscore (_) is needed!!!
Well, I understand now why it was built with an IO.
In fact the current design is using the legacy CMPPRG module which has no interrup capability.
So I need to shift to the updated COMPZ and trigger its interrupt.
Thx again for your answer, it helped.
My last post went before I read your advices.
I already know all this, I studied the customer code and many examples which are given thru the PSoC related web sites.
But this is a good review of how it works, again thanks for this valuable information.
Might be, you misunderstood: You will have connect your comparator to the Comp-Bus. Then you may use the interrupt of the comp-bus
I'm lucky the output is already attached to the comp bus as I'm also using it to switch the sign of the rectifier module.