CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Need interrupt diagram for PIC16F684

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
srikrishna



Joined: 06 Sep 2017
Posts: 82

View user's profile Send private message

Need interrupt diagram for PIC16F684
PostPosted: Sun Feb 16, 2020 1:44 am     Reply with quote

Hello guys i need INTERRUPT LOGIC diagram for PIC16F684. I can not find it in the datasheet.
Ttelmah



Joined: 11 Mar 2010
Posts: 19505

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 3:20 am     Reply with quote

Each enable bit is fed into an AND gate with it's interrupt flag as the
other input. The output of each of these gates is fed into a multi input
OR gate. The output of this is then fed into an AND with the GIE to give the
PIC logic interrupt bit (actually there are a couple of inversions NOR and
NAND, but this is the 'logic' effect).

At the start of Q1 of each instruction, it tests the logic interrupt bit. If this
is set it does not start the instruction fetch.
Instead it clears the GIE, and triggers a new Q1 instruction fetch
cycle for a call instruction to the address contained in the peripheral
interrupt vector.
So the instruction pipeline gets a single cycle bubble when an
interrupt triggers.

When you perform the RETFIE at the end of the interrupt, it returns to
the instruction where the interrupt triggered, _and then sets GIE
back on_. This means that if another interrupt has triggered it'll
occur in phase 1 of the following instruction.

Because GIE is 'relied' on in the PIC to prevent interrupts triggering
inside one another, this is why you should never set GIE inside an
interrupt handler. Instead using the RETFIE instruction to do this.

This site has the logic diagram for the 16F877. Your chip has fewer
interrupts, but the basic logic is the same.

<http://www.microcontrollerboard.com/pic_interrupt.html>
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 4:56 am     Reply with quote

srikrishna wrote:

Hello guys i need INTERRUPT LOGIC diagram for PIC16F684.
I can not find it in the datasheet.

I don't see why you can't find it. Type into Google:
Quote:
pic16f684

Then go to the webpage for the PIC:
https://www.microchip.com/pic16f684
Then go to the datasheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/41202F-print.pdf
Then go to this section:
Quote:
12.0 SPECIAL FEATURES OF THE CPU

In datasheets that don't have an Interrupts section, the interrupts will
be in the "Special features of the CPU" section. You just have to know this.
Then go to this section:
Quote:
FIGURE 12-7: INTERRUPT LOGIC

and it's right there.
temtronic



Joined: 01 Jul 2010
Posts: 9225
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 6:19 am     Reply with quote

re:
Quote:
You just have to know this...

In the good old days, you got a huge book of PICS, then you'd flip through all 200+ pages for your PIC, scanning to see the features and see what's new. Sadly, today, you just download the individual PIC's PDF, maybe look at a couple pages seeing how the 'datasheet' has grown to 400-500 pages !

In some aspects, I prefer the good old days, like the 15 minute 'forced' coffee breaks, while the UV eraser was 'cleaning up' your less than perfect code....
Ttelmah



Joined: 11 Mar 2010
Posts: 19505

View user's profile Send private message

PostPosted: Sun Feb 16, 2020 8:35 am     Reply with quote

That's hilarious.... Very Happy

He must like me, have the older 2004 data sheet. Guess what isn't there
in this one!....

Classic.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group