- Page 1 and 2: CCS C Compiler Manual PCB / PCM / P
- Page 3 and 4: Table of Contents Overview ........
- Page 5 and 6: Table of Contents PreProcessor ....
- Page 7 and 8: Table of Contents enable_interrupts
- Page 9 and 10: Table of Contents read_bank( ) ....
- Page 11 and 12: Table of Contents spi_init() ......
- Page 13 and 14: OVERVIEW C Compiler PCB, PCM and PC
- Page 15 and 16: Overview Directories The compiler w
- Page 17 and 18: Overview debug file. +FS Select SXC
- Page 19 and 20: Overview Menu All of the IDE's func
- Page 21 and 22: Overview Debugging Windows Debugger
- Page 23 and 24: PROGRAM SYNTAX Overall Structure A
- Page 25 and 26: Program Syntax Sequence Same as ??=
- Page 27 and 28: STATEMENTS Statements STATEMENT if
- Page 29 and 30: Statements The expression is evalua
- Page 31 and 32: Statements goto goto The goto state
- Page 33: Statements ; Statement: ; Example:
- Page 36 and 37: Identifiers ABCDE ID[X] ID[X][X] ID
- Page 38 and 39: expr&expr Left to Right expr^expr L
- Page 40 and 41: Structures & Unions typedef Named R
- Page 42 and 43: Enumerated Types enum enumeration t
- Page 44 and 45: SEE ALSO: Declarations, Type Specif
- Page 46 and 47: Using Program Memory for Data CCS C
- Page 50 and 51: Overloaded Functions Overloaded fun
- Page 52 and 53: Here is a function that calculates
- Page 54 and 55: .. .. BYTE data; i2c_start(); i2c_w
- Page 56 and 57: setup_comparator(A4_A5_NC_NC); if(C
- Page 58 and 59: #int_canrx0 #int_canrx1 This interr
- Page 60 and 61: profile versus in-circuit debugging
- Page 62 and 63: Sets up the d/a mode e.g. Right ena
- Page 64 and 65: On-Off Keying (OOK) Relevant Functi
- Page 66 and 67: Relevant Include Files: None, all f
- Page 68 and 69: INT_OSC_FAIL or INT_OSCF Interrupt
- Page 70 and 71: None Relevant Interrupts : INT_LOWV
- Page 72 and 73: Power PWM These options lets the us
- Page 74 and 75: value=read_program_eeprom(0x1000);
- Page 76 and 77: #INT_QEI Interrupt on rollover or u
- Page 78 and 79: Relevant getenv() parameters: UART
- Page 80 and 81: Relevant Include Files: none all fu
- Page 82 and 83: value=get_timer0 Relevant Preproces
- Page 84 and 85: None, all functions built-in Releva
- Page 86 and 87: Example Code: setup_timer_A(TA_OFF)
- Page 88 and 89: usb_kbhit(endpoint) usb_get_packet
- Page 90 and 91: ex_usb_serial.c The CDC virtual RS2
- Page 92 and 93: perform_activity(); } Some of the P
- Page 94 and 95: cin >> value; cout > strspace >> ti
- Page 96 and 97: Control #BIT #FILL_ROM #TYPE #USE D
- Page 98 and 99:
Also See: None ADD Wa,Wb,Wd Wd = Wa
- Page 100 and 101:
BTST.Z Wa,Wd Z = Wa.Wb BTSTS f,B Z
- Page 102 and 103:
IOR Wa,Wb,Wd Wd = Wa.|.Wb IOR.B Wa,
- Page 104 and 105:
SETM Wd Wd = 0xFFFF SETM f,F W0 = 0
- Page 106 and 107:
CLRWDT IORLW k RETLW k XORLW TRIS k
- Page 108 and 109:
address is a ROM location memory ad
- Page 110 and 111:
Elements: Purpose: None This pre-pr
- Page 112 and 113:
#device Syntax: Elements: #DEVICE c
- Page 114 and 115:
Compilation mode selection- #device
- Page 116 and 117:
#export (options) Syntax: #EXPORT (
- Page 118 and 119:
#fill_rom Syntax: Elements: Purpose
- Page 120 and 121:
#ID "filename" #ID CHECKSUM Element
- Page 122 and 123:
EXCEPT=symbol+symbol+.....+symbol T
- Page 124 and 125:
#int_xxxx Syntax: #INT_AD Analog to
- Page 126 and 127:
parts. See the devices .h file for
- Page 128 and 129:
Example ex_glint.c Files: Also See:
- Page 130 and 131:
Also See: #byte, #bit, #reserve, #w
- Page 132 and 133:
Examples: #opt 5 Example Files: Als
- Page 134 and 135:
T1G T3G U2RX U2CK SDI2 SCK2IN SS2IN
- Page 136 and 137:
Elements: Purpose: Examples: Exampl
- Page 138 and 139:
on Re-enables the code profiling th
- Page 140 and 141:
#separate Syntax: Elements: Purpose
- Page 142 and 143:
Each RTOS task is specified as a fu
- Page 144 and 145:
current compilation unit. The #TYPE
- Page 146 and 147:
Purpose: Examples: Example Files: A
- Page 148 and 149:
Examples: Example Files: Also See:
- Page 150 and 151:
#use profile() Syntax: #use profile
- Page 152 and 153:
Elements: Options are separated by
- Page 154 and 155:
Serial Buffer Options: RECEIVE_BUFF
- Page 156 and 157:
task that is scheduled to execute a
- Page 158 and 159:
The pins must be specified with DI,
- Page 160 and 161:
} } } output_toggle(PIN_B0); previo
- Page 162 and 163:
x is a C variable or a constant Pur
- Page 164 and 165:
BIT/BYTE MANIPULATION STANDARD C MA
- Page 166 and 167:
ead_eeprom( ) write_configuration_m
- Page 168 and 169:
Also See: labs() sin( ) cos( ) tan(
- Page 170 and 171:
} Example Files: Also See: None set
- Page 172 and 173:
pin_select() Syntax: Parameters: pi
- Page 174 and 175:
Returns: undefined Function: Simply
- Page 176 and 177:
Examples: Example Files: Also See:
- Page 178 and 179:
Also See: floor() clc1_setup_gate()
- Page 180 and 181:
clear_interrupt( ) Syntax: Paramete
- Page 182 and 183:
cwg_restart( ) Syntax: cwg_restart(
- Page 184 and 185:
Availability: Requires: Examples: A
- Page 186 and 187:
div( ) ldiv( ) Syntax: Parameters:
- Page 188 and 189:
Overview erase_program_eeprom( ) Sy
- Page 190 and 191:
fabs( ) Syntax: Parameters: Returns
- Page 192 and 193:
Example Files: Also See: None getc(
- Page 194 and 195:
The format takes the generic form %
- Page 196 and 197:
If fputs() is used then the specifi
- Page 198 and 199:
string according to the format spec
- Page 200 and 201:
if(scanf("%u%s%ld",&number,name,&ti
- Page 202 and 203:
Example Files: Also See: None setup
- Page 204 and 205:
Examples: Example Files: Also See:
- Page 206 and 207:
settings2- settings for the SD1CON2
- Page 208 and 209:
AUART CCPx TIMERx FLASH_WRITE_SIZE
- Page 210 and 211:
Example Files: Also See: #bit carry
- Page 212 and 213:
Also See: I2C_POLL( ), i2c_speed( )
- Page 214 and 215:
Function: Availability: Requires: E
- Page 216 and 217:
this I2C_START as a restart. If no
- Page 218 and 219:
Returns: Function: Availability: Re
- Page 220 and 221:
value = input_e() value = input_f()
- Page 222 and 223:
if(isalpha(id[0])) { valid_id=TRUE;
- Page 224 and 225:
} timeout=0; while(!kbhit()&&(++tim
- Page 226 and 227:
lcd_load( ) Syntax: Parameters: Ret
- Page 228 and 229:
Returns: Function: A float Computes
- Page 230 and 231:
except it is done with a single byt
- Page 232 and 233:
Examples: Example Files: Also See:
- Page 234 and 235:
copied into a temporary array of n
- Page 236 and 237:
different type than it returns, thi
- Page 238 and 239:
output_x( ) Syntax: Parameters: Ret
- Page 240 and 241:
Examples: Example Files: Also See:
- Page 242 and 243:
Requires: Examples: Example Files:
- Page 244 and 245:
Also See: input(), input_x(), outpu
- Page 246 and 247:
%2u 18 * %5 18 254 %d 18 -2 %x 12 f
- Page 248 and 249:
else data = psp_data; Example Files
- Page 250 and 251:
pwm_off() Syntax: Parameters: Retur
- Page 252 and 253:
pwm_set_frequency Syntax: Parameter
- Page 254 and 255:
int compar(void *arg1,void *arg2) {
- Page 256 and 257:
ead_adc( ) Syntax: Parameters: Retu
- Page 258 and 259:
Requires: Examples: Example Files:
- Page 260 and 261:
READ_EXTERNAL_MEMORY (address, data
- Page 262 and 263:
setup_high_speed_adc_pair(0, GLOBAL
- Page 264 and 265:
Example Files: Also See: None mallo
- Page 266 and 267:
Function: Restarts the watchdog tim
- Page 268 and 269:
tc_alarm_read( ) Syntax: Parameters
- Page 270 and 271:
Structure used in read and write fu
- Page 272 and 273:
tos_msg_poll( ) The RTOS is only in
- Page 274 and 275:
tos_stats( ) The RTOS is only inclu
- Page 276 and 277:
Returns: Function: Availability: Re
- Page 278 and 279:
u Lu d Ld o Lo x or X Lx or LX i Li
- Page 280 and 281:
Returns: Function: Availability: Ex
- Page 282 and 283:
Returns: Function: Availability: Re
- Page 284 and 285:
overridden to active //state set_po
- Page 286 and 287:
flip over to 0 and continue countin
- Page 288 and 289:
ADC) performs the conversion on. Av
- Page 290 and 291:
set_timer3(value) set_timer4(value)
- Page 292 and 293:
} case 0 : set_uart_speed(2400); br
- Page 294 and 295:
setup_ccp1( ) setup_ccp2( ) setup_c
- Page 296 and 297:
setup_clc2(mode); setup_clc3(mode);
- Page 298 and 299:
Availability: Requires: Examples: E
- Page 300 and 301:
Example Files: Also See: None cwg_s
- Page 302 and 303:
setup_high_speed_adc_pair( ) Syntax
- Page 304 and 305:
detect is also available in the dev
- Page 306 and 307:
WARNING: If the speed is changed at
- Page 308 and 309:
period is an integer between 0 and
- Page 310 and 311:
Requires: Constants are defined in
- Page 312 and 313:
Examples: Example Files: Also See:
- Page 314 and 315:
SPI_SAMPLE_AT_END, SPI_XMIT_L_TO_H
- Page 316 and 317:
setup_timer_1( ) Syntax: Parameters
- Page 318 and 319:
Also See: get_timer3(), set_timer3(
- Page 320 and 321:
Returns: Function: Availability: Re
- Page 322 and 323:
address to a structure (such as &da
- Page 324 and 325:
Function: Availability: Requires: E
- Page 326 and 327:
Examples: while #use spi(MATER, SPI
- Page 328 and 329:
generate a clock. If there is no da
- Page 330 and 331:
Function: Availability: Requires: T
- Page 332 and 333:
Requires: #INCLUDE Examples: dista
- Page 334 and 335:
searches for a token will return nu
- Page 336 and 337:
swap( ) Syntax: Parameters: Returns
- Page 338 and 339:
touchpad_hit( ) Syntax: value = TOU
- Page 340 and 341:
Also See: None tx_buffer_bytes() Sy
- Page 342 and 343:
va_end( ) Syntax: Parameters: Retur
- Page 344 and 345:
write_configuration_memory( ) Synta
- Page 346 and 347:
zdc_status( ) Syntax: Parameters: R
- Page 348 and 349:
DBL_MIN_10_EXP: DBL_MAX_EXP: DBL_MA
- Page 350 and 351:
stdio.h stdio.h stderr The standard
- Page 352 and 353:
Generally this is due to too many c
- Page 354 and 355:
Characters are appearing after a pr
- Page 356 and 357:
A #DEFINE identifier is being used
- Page 358 and 359:
Structures and UNIONS cannot be par
- Page 361 and 362:
COMPILER WARNING MESSAGES Compiler
- Page 363:
Compiler Warning Messages Variable
- Page 366 and 367:
In this case the first i8 is conver
- Page 368 and 369:
} byte changes; changes = last_b ^
- Page 370 and 371:
#define PUSH_BUTTON PIN_A4 int1 tim
- Page 372 and 373:
For example: bytevar = (x>y)*4; is
- Page 374 and 375:
+ 0.3 0.4 0.6 51.3 - 0.3 0.4 0.6 52
- Page 376 and 377:
What is an easy way for two or more
- Page 378 and 379:
123.45E20 C8 27 4E 53 123.45 E-20 4
- Page 380 and 381:
Why is the RS-232 not working right
- Page 383 and 384:
EXAMPLE PROGRAMS EXAMPLE PROGRAMS A
- Page 385 and 386:
Example Programs Uses addressmod to
- Page 387 and 388:
Example Programs How to use the enh
- Page 389 and 390:
Example Programs Implements a USB b
- Page 391 and 392:
Example Programs A/D Converter func
- Page 393 and 394:
Example Programs Hardware layer for
- Page 395 and 396:
Example Programs //////////////////
- Page 397 and 398:
Example Programs // each function t
- Page 399 and 400:
Example Programs // current tasks q
- Page 401 and 402:
Example Programs } count=0; rtos_ru
- Page 403:
Example Programs else if ( !strcmp
- Page 406 and 407:
4. LIMITATION OF LIABILITY AND DISC
- Page 408 and 409:
#INT_TIMER4 .......................
- Page 410 and 411:
goto_address ......................
- Page 412 and 413:
ead/write .........................
- Page 414:
USE _RTOS .........................