IOC error

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

IOC error

Post by Jan Lichtenbelt »

I have problems with Interrupt On Change IOC with the 16F1847 microchip. So I started to test this IOC basic. That means an external oscillator gave pulse of about 1.5 msec each 20 msec on one of the B-ports (I tested B0 and B5 with the same behaviour). On each IOC the output level of pin A will change. In figure 1 you see at top B0 (Ch0) and lowest pin A2 (Ch1). It works as expected.
Clipboard01.jpg
Clipboard01.jpg (13.01 KiB) Viewed 3396 times
But after some time, I find figure 2. That means there must be some goust IOC interrupt?????
Clipboard02.jpg
Clipboard02.jpg (10.83 KiB) Viewed 3396 times
Who can help?

With kind regards

Jan Lichtenbelt
Test_IOC.fcfx
(6.21 KiB) Downloaded 224 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: IOC error

Post by Benj »

Hi Jan,

That's strange. I wonder in your interrupt can you add a decision to check if the value in A2 is equal to B5. If the values are different then you can set another output pin. Then set your scope to trigger on this new pin and hopefully that will allow you to see the signals when the glitch happens.

My guess is that two edges are coming in very close together so that one of the edges is missed by the interrupt because we are still processing the last interrupt.

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: IOC error

Post by Jan Lichtenbelt »

Hi Ben,

That is a good suggestion. Port A3 (ch2 in the figure) is high if the IOC port (ch0) differs from the ouptut port A2 (ch1). Now it is less often and I had to wait seconds to get a change of port A3. It seems at random in time.
Clipboard04.jpg
Clipboard04.jpg (17.3 KiB) Viewed 3378 times
Jan Lichtenbelt
Test_IOC_V2.fcfx
(7.05 KiB) Downloaded 260 times

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: IOC error

Post by Jan Lichtenbelt »

Here an other one. There is somethings curious. The oscilator is not stable (see ch0). But that is another problem?

But the first IOC has been missed by the microchip. That is curious! The pulse hight is 4.7 Volt.
Clipboard07.jpg
Clipboard07.jpg (19.48 KiB) Viewed 3378 times
To delete a possible error of the oscillator, I used a single switch on the IOC port. Then I do not see any error occurs. Perhaps we to forget this porblem.

Kind regards

Jan Lichtenbelt

Post Reply