17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WARNING: If the speed is changed at run time the compiler may not<br />

generate the correct delays for some built in functions. The last #USE<br />

DELAY encountered in the file is always assumed to be the correct speed.<br />

You can have multiple #USE DELAY lines to control the compilers<br />

knowledge about the speed.<br />

Availability:<br />

Requires:<br />

Only parts with a OSCCON register.<br />

Constants are defined in the .h file.<br />

Examples:<br />

setup_oscillator( OSC_2MHZ );<br />

Example Files:<br />

Also See:<br />

None<br />

#FUSES, Internal oscillator Overview<br />

setup_pmp(option,address_mask)<br />

Syntax:<br />

Parameters:<br />

setup_pmp(options,address_mask);<br />

options- The mode of the Parallel Master Port that allows to set the<br />

Master Port mode, read-write strobe options and other functionality of the<br />

PMPort module. See the device's .h file for all options. Some typical<br />

options include:<br />

· PAR_PSP_AUTO_INC<br />

· PAR_CONTINUE_IN_IDLE<br />

· PAR_INTR_ON_RW //Interrupt on read write<br />

· PAR_INC_ADDR //Increment address by 1<br />

every<br />

//read/write cycle<br />

· PAR_MASTER_MODE_1 //Master Mode 1<br />

· PAR_WAITE4 //4 Tcy Wait for data hold<br />

after<br />

// strobe<br />

address_mask- this allows the user to setup the address enable register<br />

with a 16-bit value. This value determines which address lines are active<br />

from the available 16 address lines PMA0:PMA15.<br />

Returns:<br />

Function:<br />

Undefined.<br />

Configures various options in the PMP module. The options are present in<br />

the device's .h file and they are used to setup the module. The PMP<br />

module is highly configurable and this function allows users to setup<br />

configurations like the Slave module, Interrupt options, address<br />

294

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

Saved successfully!

Ooh no, something went wrong!