17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Built-in Functions<br />

should have been defined for the indicated interrupt.<br />

The GLOBAL level will not enable any of the specific interrupts, but will allow<br />

any of the specified interrupts previously enabled to become active. Some<br />

chips that have an interrupt on change for individual pins all the pin to be<br />

specified, such as INT_RA1. For interrupts that use edge detection to<br />

trigger, it can be setup in the enable_interrupts( ) function without making a<br />

separate call to the set_int_edge( ) function.<br />

Enabling interrupts does not clear the interrupt flag if there was a pending<br />

interrupt prior to the call. Use the clear_interrupt( ) function to clear pending<br />

interrupts before the call to enable_interrupts( ) to discard the prior interrupts.<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

Devices with interrupts.<br />

Should have a #INT_XXXX to define the ISR, and constants are defined in<br />

the devices *.h file.<br />

enable_interrupts(GLOBAL);<br />

enable_interrupts(INT_TIMER0);<br />

enable_interrupts( INT_EXT_H2L );<br />

ex_sisr.c, ex_stwt.c<br />

disable interrupts(), clear_interrupt (), ext_int_edge( ), #INT_xxxx, Interrupts<br />

Overview, interrupt_active()<br />

erase_eeprom( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

erase_eeprom (address);<br />

address is 8 bits on <strong>PCB</strong> parts.<br />

undefined<br />

This will erase a row of the EEPROM or Flash Data Memory.<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

<strong>PCB</strong> devices with EEPROM like the 12F519<br />

Nothing<br />

erase_eeprom(0); // erase the first row of the EEPROM (8 bytes)<br />

None<br />

write program eeprom(), write program memory(), Program Eeprom<br />

175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!