wasn't really happy with previous attempt
these are better one with dt ints one without
wasn't really happy with previous attempt
these are better one with dt ints one without
Warning I'm not a teacher
Hi, Richard,
I will carefully read your .txt files.
But I really only master Basic... not really ASM
Last edited by zorgloub; - 24th April 2023 at 10:32.
not sure if I have to point out the obvious butI will carefully read your .txt files.
what sort of file would "ZORB.pbp.txt" if you took the ".txt" off the end ?
[the pbp forum will not allow a pbp file to be uploaded , you need to mask its type with a .txt extension]
such a limited outlookBut I really only master Basic... not really ASM
good luck employing interrupts in any other way with such limited chips as 12f675
Warning I'm not a teacher
" not sure if I have to point out the obvious" but you often have some degrading, demeaning cutting comment to people seeking help. Basically a reflection of yourself......
please delete this
i read that as either a lack of understanding on how files are uploaded onto the forum orI will carefully read your .txt files.
a intimation that i have uploaded something weird, unusual or incorrect. i don't know which
but either way since it was specifically pointed out an explanation was warranted
makes it clearer why the txt extension is there and how to deal with it, just in case an explanation wasnot sure if I have to point out the obvious but...
necessary
reallybut you often have some degrading, demeaning cutting comment to people seeking help. Basically a reflection of yourself......
Warning I'm not a teacher
To activate a single I/O pin as IOC (Interrupt on Change) you use the "IOC" Register; Register 3.4 in the Data Sheet:
If you want to enable IOC interrupts on multiple GPIO pins you can use the IOC Register in binary mode. Assume you want an IOC Interrupt on GPIO pins 0 & 1:Code:IOC.0 = 1 'Enables IOC on GPIO 0
Then you must enable IOC interrupts using the INTCON Register:Code:IOC = 000011 'Enables IOC on GPIO 0 & 1
Next, you need to create an Interrupt Handler (See PBP Manual) so when you get the Interrupt, you can do something with it. In your Interrupt Handler, when you get an IOC interrupt you have to clear the Interrupt Flag:Code:INTCON.3 = 1 'Enables IOC Interrupts
If you need more than one GPIO IOC Interrupt (2 or more Port Pins), you will have to Poll which GPIO triggered the IOC Interrupt:Code:INTCON.0 = 0 'Clears IOC Interrupt Flag
The above code assumes that a low-to-high transition triggers your IOC interrupt. You may need to change that depending on your goals.Code:IF GPIO.0 = 1 THEN <Interrupt Handler Code for GPIO.0> ELSE IF GPIO.1 = 1 THEN <Interrupt Handler Code for GPIO.1> ENDIF
<edit> I tried to write "IOC = 000011 'Enables IOC on GPIO 0 & 1" but the forum keeps changing it to "IOC = 000011 'Enables IOC on GPIO 0 & 1"
Last edited by mpgmike; - 26th April 2023 at 00:51.
not forgetting :-Next, you need to create an Interrupt Handler (See PBP Manual) so when you get the Interrupt, you can do something with it. In your Interrupt Handler, when you get an IOC interrupt you have to clear the Interrupt Flag:
A mismatch condition will continue to set flag bit GPIF.
Reading GPIO will end the mismatch condition and
allow flag bit GPIF to be cleared.
Warning I'm not a teacher
Bookmarks