You are on page 1of 2

CCS :: View topic - SET BIT IN PIC REGISTER http://ccsinfo.com/forum/viewtopic.php?t=27534&highlight=inte...

FAQ Forum Help Official CCS Support Search Register

Profile Log in to check your private messages Log in

SET BIT IN PIC REGISTER

CCS Forum Index -> General CCS C Discussion

View previous topic :: View next topic

Author Message

JaSoN SET BIT IN PIC REGISTER


Posted: Fri Jul 07, 2006 8:53 am

Joined: 05 Jul 2006 HI, how can I set bit0 'ON' in PIC register PIE1?
Posts: 15

epideath Posted: Fri Jul 07, 2006 9:07 am

bit_set(PIE1,0);
Joined: 07 Jun 2006
Posts: 47
where PIE1 is the register where PIE1 is located on your PIC.

Ttelmah Posted: Fri Jul 07, 2006 9:19 am


Guest

Further answers:

#byte PIE1=(put address here to suit the chip concerned)


#bit PIE1BIT0=PIE1.0

Then PIE1BIT0=1 will set it, and PIE1BIT0=0 will clear it.

Or, since PIE1.0, is normally the 'timer1 interrupt enable' bit, use the inbuilt instruction:

enable_interrupts(INT_TIMER1);

The latter has the advantage of remaining portable, if you change to another chip (16 to 18 for
example). In general, I'd recommend this.

Best Wishes

JaSoN Posted: Fri Jul 07, 2006 9:45 am

THANKS VERY MUCH!!


Joined: 05 Jul 2006
Posts: 15

1 от 2 01.3.2007 г. 10:32
CCS :: View topic - SET BIT IN PIC REGISTER http://ccsinfo.com/forum/viewtopic.php?t=27534&highlight=inte...

Display posts from previous: All Posts Oldest First Go

All times are GMT - 6 Hours


CCS Forum Index -> General CCS C Discussion

Page 1 of 1

Jump to: General CCS C Discussion Go

You can post new topics in this forum


You can 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

2 от 2 01.3.2007 г. 10:32

You might also like