Searching \ for '[PIC]: Interrupt bits' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ints.htm?key=interrupt
Search entire site for: 'Interrupt bits'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Interrupt bits'
2002\09\05@033452 by Dave Gomez

flavicon
face
part 1 10033 bytes content-type:multipart/alternative; boundary="B_3114030829_26543489" (decoded quoted-printable)


--B_3114030829_26543489
Content-type: text/plain; charset 2002\09\05@043849 by Wouter van Ooijen
face picon face
Bits defined by mask (for use with ORing or ADDing):

RBIF  equ h'01'
INTF  equ h'02'
TOIF  equ h'04'
RBIE  equ h'08'
INTE  equ h'10'
TOIE  equ h'20'
PEIE  equ h'40'
GIE   equ h'80'

Bits defined by bit position (for use with BTS/BTFSS etc):

GIE                          EQU     H'0007'
EEIE                         EQU     H'0006'
T0IE                         EQU     H'0005'
INTE                         EQU     H'0004'
RBIE                         EQU     H'0003'
T0IF                         EQU     H'0002'
INTF                         EQU     H'0001'
RBIF                         EQU     H'0000'

Both have their purpose, but don't use one when the other is needed!
BTW to get the mask from the position: ( 1 << position )

succes
Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\09\05@043931 by Claudio Tagliola

picon face
Hi Dave,


It's a matter of convention and personal favouratism. The first notation is
the bit mask, the second one are the bit positions.
If you translate the first one into bit notation, you get:

RBIF    equ 0b00000001
INTF    equ 0b00000010
TOIF    equ 0b00000100
etc.

These values can be added or anded together to form a complete bit mask
which you can use to set the complete intcon register in one go. E.g. the
GIE+TOIE+INTE gives 0b10010100 if added together.

The other notation however, gives the location of the bits. These can be
used for bit modification commands (btfss, btfsc, bsf, bcf) and are good for
testing, setting and clearing single bits.

As you want to set more then one bit in the intcon, the first approach is
easier. If you are testing for a certain interrupt flag or clearing one
interrupt flag, you can better use the bit modification commands.

I think it's easiest if you have both notations available, and have some
convention of keeping them apart.


Best regards,
Claudio

P.s. Please don't post in HTML, there are some rare ppl on the list who
can't read that.

-----Oorspronkelijk bericht-----
Van: pic microcontroller discussion list
[spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU]Namens Dave Gomez
Verzonden: donderdag 5 september 2002 9:34
Aan: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
Onderwerp: [PIC]: Interrupt bits

<SNIP>

Even though it looks the same, it s not, because of the personal header that
was used, and it had it s own definitions of the INTCON bits which are:

RBIF  equ h'01'
INTF  equ h'02'
TOIF  equ h'04'
RBIE  equ h'08'
INTE  equ h'10'
TOIE  equ h'20'
PEIE  equ h'40'
GIE   equ h'80'

While the excerpt from the standard include file is this:
;----- INTCON Bits --------------------------
GIE                          EQU     H'0007'
EEIE                         EQU     H'0006'
T0IE                         EQU     H'0005'
INTE                         EQU     H'0004'
RBIE                         EQU     H'0003'
T0IF                         EQU     H'0002'
INTF                         EQU     H'0001'
RBIF                         EQU     H'0000'


Oh, and I have tried every conceivable moshing of the different bits to see
if I can replicate the 30B0 hex output, but from what I see, I ain t never
gonna get there, as the number is just way too big when you add up all of
the bits.  Can anyone give me some insight as to what the heck is going on
here?
Any help greatly appreciated.

Thanks,
Dave Gomez

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\09\05@071220 by andy n1yew

picon face
[PIC]: Interrupt bitsmaybe you meant to try or'ing (|) instead of adding.

although i thnk it would be the same result.. worth a shot..

andrew
 {Original Message removed}

2002\09\05@075805 by Olin Lathrop

face picon face
> Ok, I¹m a newbie,  and I¹m stumped.

You'll get more help by sending PLAIN TEXT email with no special encoding.
Your message was apparently HTML encoded.  Worse, it apparently set its own
font size which came out so small on my screen that it would have required
too much effort to read your post.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\09\05@080016 by Michael Rigby-Jones

flavicon
face
{Quote hidden}

The easiest way to sort this would be something like:

movlw   (1<<GIE) | (1<<T0IE) | (1<<INTE)

I feel it's a better idea to OR bits together than ADD them, but either
would work as long as you use the brackets.

Hope that helps

Regards

Mike Rigby-Jones

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\09\05@104435 by Dave Gomez

flavicon
face
Ok,
   thanks for all of the replies, and sorry it wasn't plain text!!
   I understand the whole issue better!!  Thanks for the replies.

Dg


On 9/5/02 12:43 AM, "Wouter van Ooijen" <EraseMEwouterspam_OUTspamTakeThisOuTVOTI.NL> wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...