全部产品 开发工具 新闻/活动 技术支持 关于虹科 联系我们

PIC® MCU C 编译器
  CCS C Aware IDE 功能
  编译器细节
  支持器件
  语法和函数
  程序举例
  C Aware 实时调试器
  编译器比较
  编译器在线研讨会
  软件许可证
  增强8位 MidRange 核
开发套件
编程器/调试器
  MACH X 器件支持
  ICD-U64, Load-n-Go, 和
  PRIME 8 器件支持
  ICD版本和芯片兼容性
  连接ICD到硬件
  ICD对比
  器件编程器故障排除
OEM模块
技术支持
下载
产品目录

 

 

Home » CCS C Compilers » CCS C Compiler Details

CCS C Compiler Details

Intelligent and highly optimized CCS C compilers contain Standard C operators and Built-in Function libraries that are specific to PIC registers, providing developers with a powerful tool for accessing device hardware features from the C language level. Standard C preprocessors, operators and statements can be combined with hardware specific directives and CCS provided built-in functions and example libraries to quickly develop applications incorporating leading edge technologies such as capacitive touch, wireless and wired communication, motion and motor control and energy management.

Optimization and InitializationDevice Specific Optimization and Initialization

Device specific include files contain all the information the compiler needs to optimize code generation for the specific PIC® MCU.

  • Op-code length
  • Memory size
  • Pin functionality
  • Memory banking
  • Peripheral resources
  • Hardware stack size

This detailed information enables the compiler to make intelligent decisions regarding code optimization at the sub family and device level, generating denser code than would be possible if the compiler treated all devices within a Microchip PIC® family the same. Learn how an optimizing C compiler can save you money.

The device specific include files also initialize device registers and peripherals, relieving developers from the tedium of studying data sheets to learn register map details, flag settings, etc.

The compiler can handle in-line or separate functions, as well as parameter passing in re-usable registers. Transparent to the user, the compiler handles calls across pages automatically and analyzes program structure and call tree processes to optimize RAM and ROM Usage. Additional features include:

  • Efficient function implementation allows call trees deeper than the hardware stack.
  • Automatic linking handles multiple code pages.
  • Assembly code may be inserted anywhere in the source and may reference C variables.
  • Function Overloading allows for several functions with the same name, but differences in number and type of parameters.
  • Default Parameters can be used in a function if arguments are not used in a call.
  • The compiler generates all startup and clean up code for interrupt functions as well as identifying the correct interrupt function to be called.
  • Reference parameters may be used to improve code readability and in-line function efficiency.
  • Variable Number Of Parameters in a function.
  • Relocatable Objects / Multiple Compilation Unit (IDE Only)
  • Automatic #fuses Configuration
  • Function recursion for PIC24 and dsPIC® DSC devices

Built-In Functions Provide Direct Access to PIC® MCU Hardware

Built-In Functions

The CCS compiler contains over 307 built-in functions that simplify access to hardware while producing efficient and highly optimized code. Functions are included for device hardware features such as:

  • Timers & PWM modules
  • A/D converters
  • On-chip data EEPROM
  • LCD controllers
  • External memory busses
  • And much more…
  • Specify microcontroller clock speed with a PRAGMA, allowing built-in functions to generate precision delays in microseconds or milliseconds with DELAY_US() and DELAY_MS()
  • Setup and read values from on-chip A/D converterswith SETUP_ADC() and READ_ADC()
  • Enhanced oscillator control for selection from multiple clock sources, PLL and power saving options
  • Set PWM duty cycle with SET_PWM_DUTY
  • Drive the internal PIC® LCD controller with LCD_LOAD(), LCD_SYMBOL()
  • Maintain tri-state registers with INPUT() and OUTPUT_HIGH
  • Use compiler directives to specify if tri-state registers are refreshed on every I/O or if the I/O is as fast as possible
  • Map registers to C variables with #BIT, #BYTE and #WORD
  • Interface codec chips to dsPIC® DSCs with Data Converter Interface (DCI) peripheral support for I2S and AC '97 16-bit and 20-bit protocols

Arithmetic Libraries Speed up Code Development

Why recreate the wheel coding your own arithmetic functions in assembly or C? Standard C math libraries are supplied with the CCS compiler.

  • 1, 8, 16 and 32-bit integer types and 32-bit floating point are supported for all devices
  • 48 and 64-bit integer types and 64-bit floating point for PIC24 and dsPIC DSC devices

The compiler also has the ability to represent decimal numbers using a new data type, the fixed point decimal。

  • Fixed point decimal gives you decimal representation, but at integer speed. This gives you a phenomenal speed boost over using float.

DSP in-line assembly is supported for your most performance critical code.

Industry Standard ProtocolsQuickly Implement Industry Standard Protocols

Built-in functions, include files, interrupts, and code examples help you to quickly "get on the bus". Serial buses such as I2C™ and SPI™, CAN, ECAN and USB interfaces and RS232 communications protocols are fully supported by the CCS compiler and development kits.

  • Powerful built-in libraries for interface and communication such as #USE SPI(), #USE I2C() and #USE RS232() make it easy to define multiple I2C and RS232 ports
  • Hardware transceiver used when possible, but for all other occasions the compiler generates a software serial transceiver.
  • Serial I/O functions allow standard functions such as GETC() and PRINTF() to be used for RS-232 like I/O.
  • #USE RS232() offers options to specify a maximum wait time for getc.

Code Size ReductionsOptimized String Handling Delivers Up to 18% Code Size Reductions

String compression for 7-bit ASCII strings has been implemented for Microchip's 14-bit opcode PIC12 and PIC16 families. Studies conducted by CCS show that string functions that used to take 2,300 bytes of ROM to implement now consume as little as 1,884, a savings of 18%

Strings can be used in switch statements, making it much easier developers to perform string comparisons。 Comparisons that can take many individual string handling function calls to implement with other compilers can be handled directly in the switch statement, resulting in tighter and more maintainable source code and a smaller ROM footprint。

Efficient Bit Oriented Code

  • Standard one bit type (Short Int) permits the compiler to generate very efficient bit oriented code.
  • Bit Arrays

Efficient Data Structures Mapped into Program Memory

  • Flexible constant data structure handling allows the compiler to handle lookup tables that are virtually unlimited in size. This is of particular interest to developers using large lookup tables for trigonometric functions or storing FPGA configuration memory images in on-chip MCU memory.
  • Constants (including strings and arrays) are saved in program memory
  • DSP performance can be enhanced by manually assigning variables to data spaces for faster access with preprocessor directives

Extensive Source Code Driver Library

CCS provides an extensive source code library of drivers to aid in driver development for your target hardware.

  • Source code drivers included for LCD modules, keypads, 24xx and 94xx serial EEPROM, X10, DS1302 and NJU6355 real time clocks, Dallas touch memory devices, DS2223 and PCF8570, LTC1298 and PCF8591 A/D converters, temperature sensors, digital pots, I/O expander and much more.
  • 133 ready-to-run programs included

Microchip Enhanced Mid-Range core architecture support

The CCS code optimizing C compiler supports up to 56K instructions and 4K RAM for these new 14-bit opcode devices. The Enhanced Mid-Range core's 16-level hardware stack is supported by the compiler's 16-level call stack, reducing the number of inlined system functions that must be coded. Built-in system functions are provided for all of the enhanced peripherals including A/D converters and comparators, SPI and I2C serial buses, PWM, mTouch™. non-volatile memory, op-amp and LCD drive.

External Memory Support

The compiler contains features to simplify using external memory chips.

The compiler runs under Windows 95, 98, ME, NT4, 2000, XP, Vista, Windows 7 or Linux。 It outputs hex and debug files that are selectable and compatible with popular emulators and programmers including the MPLAB® IDE for source level debugging。

   020-3874 4528 ; 3874 4538 | sales@cumulus3d.com | 广州虹科电子科技福彩欢乐生肖开奖结果 | 版权所有 | 华南理工大学 国家科技园2-504
欢乐生肖开奖直播 重庆欢乐生肖规律 欢乐生肖开奖号码 欢乐生肖彩票 欢乐生肖开奖视频 福彩欢乐生肖走势图 重庆欢乐生肖开奖结果 快开彩票欢乐生肖 重庆欢乐生肖玩法 欢乐生肖计划