View previous topic :: View next topic |
Author |
Message |
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
Disabling Interrupts required ?? |
Posted: Fri Jul 18, 2003 7:05 am |
|
|
Hello All,
I am using the PIC 16F877 mcu, and the CCS PCM compiler.
I would like to know if it is necessary to call the disable_interrupts() function, before servicing an interrupt ?.
Also is it necessary to shut down all interrupt (by using the disable_interrupts() function) before writing to /reading the internal EEPROM using the write_eeprom() / read_eeprom() functions ??.
thanks
arun
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516137 |
|
|
Sirio Guest
|
Re: Disabling Interrupts required ?? |
Posted: Fri Jul 18, 2003 9:31 am |
|
|
:=Hello All,
Hi
:=I am using the PIC 16F877 mcu, and the CCS PCM compiler.
:=
:=I would like to know if it is necessary to call the disable_interrupts() function, before servicing an interrupt ?.
No.
:=Also is it necessary to shut down all interrupt (by using the disable_interrupts() function) before writing to /reading the internal EEPROM using the write_eeprom() / read_eeprom() functions ??.
:=
Don't think so.
:=thanks
np
:=arun
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516148 |
|
|
Felix Althaus
Joined: 09 Sep 2003 Posts: 67 Location: Winterthur, Switzerland
|
Re: Disabling Interrupts required ?? |
Posted: Fri Jul 18, 2003 12:17 pm |
|
|
Hi
From the PIC16F84A datasheet (but this is similar on the 16F87x):
"When an interrupt is responded to, the GIE bit is cleared to disable any further interrupt, [...]"
So, the PIC disables all interrupts for you. After the ISR, the chip turns the interrupts on again (exactly: the chip re-sets the GIE bit)
mfg
Felix
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516157 |
|
|
arunb
Joined: 08 Sep 2003 Posts: 492 Location: India
|
Re: Disabling Interrupts required ?? |
Posted: Fri Jul 18, 2003 9:44 pm |
|
|
:=:=Hello All,
:=
:=Hi
:=
:=:=I am using the PIC 16F877 mcu, and the CCS PCM compiler.
:=:=
:=:=I would like to know if it is necessary to call the disable_interrupts() function, before servicing an interrupt ?.
:=
:=No.
:=
:=:=Also is it necessary to shut down all interrupt (by using the disable_interrupts() function) before writing to /reading the internal EEPROM using the write_eeprom() / read_eeprom() functions ??.
:=:=
:=
:=Don't think so.
:=
:=:=thanks
:=
:=np
:=
:=:=arun
Hi,
thanks for the reply.
I find that the mcu sometimes writes garbage to the EEPROM. I felt that disabling interrupts was required, because in the datasheets it is recommended to turn off all interrupts, does the isr routine for any isr does this automatically ???
thanks
arun
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516169 |
|
|
|