Beruflich Dokumente
Kultur Dokumente
Page 1 of 3
BUILT-IN-FUNCTIONS
The CCS compiler provides a lot of built-in functions to access and use the pic microcontroller's peripherals. This makes it very easy for the users to configure and use the peripherals without going into in depth details of the registers associated with the functionality. The functions categorized by the peripherals associated with them are listed on the next page. Click on the function name to get a complete description and parameter and return value descriptions. assert( ) getch( ) putc( ) fgetc( ) getchar( ) putchar( ) fgets( ) gets( ) puts( ) fprintf( ) kbhit( ) setup_uart( ) RS232 I/O fputc( ) perror( ) set_uart_speed( ) fputs( ) printf( ) getc( )
setup_spi( ) setup_spi2( ) spi_xfer( ) spi_data_is_in( ) spi_data_is_in2( ) spi_read( ) spi_read2( ) spi_write( ) spi_write2( )
get_tris_x( ) input( ) input_state( ) set_tris_x( ) input_x( ) output_X( ) output_bit( ) output_float( ) output_high( ) output_drive( ) output_low( ) output_toggle( ) port_x_pullups( )
DISCRETE I/O
PARALLEL PORT
I2C I/O
clear_interrupt( ) disable_interrupts( ) enable_interrupts( ) ext_int_edge( ) getenv( ) brownout_enable( ) goto_address( ) interrupt_active( ) jump_to_isr( ) label_address( ) read_bank( ) reset_cpu( ) restart_cause( ) setup_oscillator( ) sleep( ) write_bank( )
PROCESSOR CONTROLS
BIT/BYTE MANIPULATION
bit_clear( ) bit_set( ) bit_test( ) make8( ) make16( ) make32( ) _mul( ) rotate_left( ) rotate_right( ) shift_left( ) shift_right( ) swap( )
mk:@MSITStore:C:\Program%20Files\PICC\ccsc.chm::/BuiltInFunctions_Directory.htm
3/27/2012
Page 2 of 3
abs( ) acos( ) asin( ) atan( ) atan2( ) atoe( ) ceil( ) VOLTAGE REF A/D CONVERSION cos( ) cosh( ) div( ) exp( ) fabs( ) floor( ) fmod( ) frexp( ) labs( ) ldexp( ) ldiv( ) log( ) log10( ) modf( ) pow( ) sin( ) sinh( ) sqrt( ) tan( ) tanh( )
STANDARD C MATH
setup_low_volt_detect( ) setup_vref( )
atof( ) atoi( ) atol32( ) atol( ) isalnum( ) isalpha(char) isamong( ) iscntrl(x) isdigit(char) isgraph(x) islower(char) isprint(x) ispunct(x) isspace(char) isupper(char) isxdigit(char) itoa( ) sprintf( ) strcat( ) strchr( ) strcmp( ) strcoll( ) strcpy( ) strcspn( ) strerror( ) stricmp( ) strlen( ) strlwr( ) strncat( ) strncmp( ) strncpy( ) strpbrk( ) strrchr( ) strspn( ) strstr( ) strtod( ) strtok( ) strtol( ) strtoul( ) strxfrm( ) tolower( ) toupper( )
get_timer_x( ) setup_timer_1( ) setup_timer_4( ) restart_wdt( ) set_timer_x( ) setup_timer_2( ) setup_timer_5( ) setup_wdt( ) setup_timer_0( ) setup_timer_3( ) setup_counters( )
TIMERS
calloc( ) free( ) longjmp( ) malloc( ) memchr( ) memcmp( ) memcpy( ) memmove( ) memset( ) offsetof( ) offsetofbit( ) realloc( ) setjmp( )
STANDARD C MEMORY
set_power_pwm_override( ) set_power_pwmx_duty( ) set_pwm1_duty( ) set_pwm2_duty( ) set_pwm3_duty( ) set_pwm4_duty( ) setup_ccp2( ) setup_ccp3( ) setup_ccp4( ) setup_ccp5( ) setup_ccp6( ) setup_power_pwm( )
CAPTURE/COMPARE/PWM
mk:@MSITStore:C:\Program%20Files\PICC\ccsc.chm::/BuiltInFunctions_Directory.htm
3/27/2012
Page 3 of 3
set_pwm5_duty( ) setup_ccp1( )
setup_power_pwm_pins( )
erase_eeprom( ) erase_program_eeprom( ) read_calibration( ) read_configuration_memory( ) read_eeprom( ) read_external_memory( ) read_program_eeprom( ) read_program_memory( ) setup_external_memory( ) write_configuration_memory( ) write_eeprom( ) write_external_memory( ) write_program_eeprom( ) write_program_memory( )
NON-VOLATILE MEMORY
bsearch( ) nargs( ) qsort( ) rand( ) srand( ) va_arg( ) va_end( ) va_start( )
delay_cycles( ) delay_ms( ) delay_us( )
setup_comparator( )
rtos_await( ) rtos_disable( ) rtos_enable( ) rtos_msg_poll( ) rtos_msg_read( ) rtos_msg_send( ) rtos_overrun( ) rtos_run( ) rtos_signal( ) rtos_stats( ) rtos_terminate( ) rtos_wait( ) rtos_yield( )
RTOS
LCD MISC.
setup_opamp1( ) setup_opamp2( ) sleep_ulpwu( )
mk:@MSITStore:C:\Program%20Files\PICC\ccsc.chm::/BuiltInFunctions_Directory.htm
3/27/2012