Professional Documents
Culture Documents
Author Message
Joined: 05 Jul 2006 HI, how can I set bit0 'ON' in PIC register PIE1?
Posts: 15
bit_set(PIE1,0);
Joined: 07 Jun 2006
Posts: 47
where PIE1 is the register where PIE1 is located on your PIC.
Further answers:
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
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...
Page 1 of 1
2 от 2 01.3.2007 г. 10:32