 |
PIC-C High-Range Compiler (PCH)
| |
|
$164.95
In Stock |
The PIC-C High-Range Compiler (PCH) is a feature rich, cost effective command-line
C Compiler for the Microchip PIC18 (16-bit) microcontroller family. Language
extensions specific to Microchip PICmicros set this compiler apart from the
crowd. There'll be no more direct register writing unless you choose to do so!
PCH even compensates for the latest chip errata. The compiler is modular and can be used in stand-alone mode or can be integrated into the developer's favorite
editor and debugger. (For this compiler bundled with an IDE developed by the
same author, please refer to PCWH.) A self-installation tool is included for integration into Microchip's free MPLAB IDE. In fact, complex projects can be developed from a variety of environments ranging from Windows
Notepad and a Desktop Shortcut, to high-end development suites. Compilation errors may be directed to STDOUT to accommodate Integrated Development Environments that require it.
The user can select from more than 30 command-line options to control which output files are generated, output file format, output file extensions, optimization level, #include directory search path,
global #defines, and more. The numerous options may also be specified from an easy to manage text file. Compiled source code yields a call tree, symbol table, and a statistics file which contains the
overall ROM and RAM used, the number of lines and statements in each file, the bytes of ROM and RAM used by each function, and the bytes used and remaining in each code page. Percentages are also available.
PCH comes complete with extensive help, controllable optimization level, and
project statistics. As an added bonus, it also includes dozens of ready to run
example programs and source code drivers for many common PICmicro peripherals.
Our PIC Prototyping Board is a cost
effective companion to this compiler. In fact, the example programs bundled with the compiler were specifically written to run on
this hardware. Each example program contains wiring and jumper settings referencing the prototype strip on the
PIC Prototyping Board.
Compiler Family Overview:
This family of PIC-C Compilers gives a firmware developer the capability to quickly produce very efficient code from the easily maintainable, high level, C Language. The compilers
are based on the standard Kernighan-Ritchie C Language but also include powerful language extensions and are fully optimized for use with Microchip PIC Microcontrollers.
Language extensions alleviate the requirement of directly writing to the
PICmicro hardware registers. When they are used, chip errata are automatically
taken into consideration by the compiler.
Language extensions (full list) include, but are not limited to, built-in functions to access the PICmicro hardware such as, read_adc() to read a value from the A/D converter, #use RS232 to generate a hardware or
software UART, and write_eeprom() for data storage to PIC-resident nonvolatile memory. Additionally, functions such as input() and output_high() will read and write the I/O ports while automatically and
dynamically maintaining the port direction registers.
Conversely, variables, including structures, may be directly mapped to control registers and I/O ports for source code readability and easy management of those hardware resources. When the contents of these "variables"
are changed, the data is actually written directly to the hardware. In this manner hardware peripherals with unique data structures are efficiently managed by name.
Functions may be implemented inline or separate allowing optimization for either code size or speed of execution. In order to relieve the developer of stack depth issues, function parameters are passed
in reusable registers. Inline functions with reference parameters are implemented efficiently with no memory overhead.
Interrupts (on supporting devices) are easily established and serviced. The user essentially enables a list of interrupts by name and provides an interrupt function for each. The compiler will call the
appropriate interrupt function when that interrupt is detected. Code to save and restore the machine state and clear the interrupt request is automatically generated as well.
During the linking process the program structure, including the call tree, is analyzed. Functions contained in #included libraries but never called are automatically excluded from the final code output.
Functions that call one another frequently are grouped together in the same code page. Calls across pages are handled automatically by the compiler making code page selection transparent to the user.
RAM banks are also switched automatically. RAM is allocated optimally by using the call tree to determine how memory locations can be reused. Constant strings and tables are saved in the device's program
memory in order to conserve RAM.
The output Hex and debug file formats are selectable and compatible with popular programmers and emulators, including MPLAB IDE, for source-level debugging.
The fact that these compilers are flexible and configurable to the user's level of experience makes them a great choice for both the professional and hobbyist.
Features:
|
Extensive Help |
|
Cost effective command-line interface |
|
More than 30 command-line settings |
|
Compiler optionally accepts settings from a text file, IDE, or
Desktop Shortcut |
|
Compatible with all ASCII text editors |
|
Project files compatible with Microchip's MPLAB IDE |
|
Self-installation into Microchip's MPLAB IDE |
|
Optional dedicated and optimized IDE available |
|
Predefined header file for each supported device expedites migration |
|
Syntax compatible with other members of the compiler family allows easy migration |
|
Standard C and language extensions optimized to produce very efficient code |
|
Efficient function implementation allows call trees deeper than hardware stack |
|
Inline function support saves hardware stack |
|
Reference parameter support improves code readability and inline function efficiency |
|
Selectable automatic/manual architecture determination of #inline vs. #separate |
|
1, 8, 16, and 32-bit integer types and 32-bit Floating Point |
|
Standard 1-bit type permits true Boolean oriented code generation |
|
8 and 16-bit pointer support |
|
Selectable automatic/manual port direction handling |
|
Interrupt functions supported on all devices other than Base-Line (12-bit) devices |
|
Selectable automatic/manual interrupt handling |
|
Automatic generation of interrupt startup and cleanup code |
|
Automatic interrupt trigger to interrupt function mapping |
|
Constants saved in program memory conserving RAM |
|
Linker automatically handles multiple code pages |
|
Linker automatically handles multiple RAM banks |
|
Supports embedded Assembly code |
|
Assembly code may reference C variables |
|
C variable placement at absolute addresses with #bit and #byte
allows register writes |
|
Built-in Libraries for RS232 serial I/O, I2C, discrete I/O, and precision delays (all devices) |
|
Built-in Functions for A/D, Timers, EEPROM, SSP, PSP, USB, I2C and more (supporting devices) |
|
Formatted printf displays in Hex or Decimal on user selected output stream |
|
Standard compiler outputs are C/Assembly listing, RAM memory map, Call Tree, errors, and statistics |
|
Selectable Hex file format insures compatibility with device programmers |
|
Integrates with MPLAB IDE and other simulators/emulators for source-level debugging |
|
Includes dozens of ready to run example programs |
|
Source code drivers included for LCD modules, keypads, 24xx/93xx Serial EEPROM's, X10, DS1302/NJU6355 Real Time Clocks, Dallas Touch Memory Devices, DS2223/PCF8570 Serial SRAM, LTC1298/PCF8591
A/D converters, temperature sensors, digital pots, I/O expanders and much more |
|
Includes complete 190+ page Reference Manual in addition to electronic version |
|
Includes 30 days of FREE updates via the Internet |
Standard C Syntax:
if, else, while, do, switch, case, for, return, goto, break, continue
! ~ ++ -- + - , & |
* / % << >> ^ && || ?:
< <= > >= == !=
= += -= *= /= %= >>= <<= &=
^= |=
typedef, static, auto, const, enum, struct, union
Arrays with up to 5 subscripts
Structures and Unions may be nested
Custom bit fields (1-8 bits) within structures
ENUMurated types
CONSTant variables, arrays and strings
Full function parameter support (any number)
Some support for C++ reference parameters
Built-in Functions:
(top)
 |
| Standard C Char |
 |
atoi()
atol()
atof()
atoi32()
tolower()
toupper()
isalnum()
isalpha()
isamoung()
isdigit()
islower()
isspace()
isupper()
isxdigit()
strlen()
strcpy()
strncpy()
strcmp()
stricmp()
strncmp()
strcat()
strstr()
strchr()
strrchr()
strtok()
strspn()
strcspn()
strpbrk()
strlwr()
sprintf()
| Delays |
 |
delay_cycles()
delay_us()
delay_ms()
| Capture/Compare/PWM |
 |
setup_ccpX()
set_pwmX_duty()
| Processor Controls |
 |
sleep()
reset_cpu()
restart_cause()
disable_interrupts()
enable_interrupts()
ext_int_edge()
read_bank()
write_bank()
label_address()
goto_address()
| Error Trapping |
 |
perror()
assert() |
| Standard C Memory |
 |
memset()
memcpy()
offsetof()
offsetofbit()
| RS232 I/O |
 |
getc()
putc()
gets()
puts()
fgetc()
fputc()
fgets()
fputs()
kbhit()
printf()
fprintf()
set_uart_speed()
| I2C I/O |
 |
i2c_start()
i2c_stop()
i2c_read()
i2c_write()
i2c_poll()
| Discrete I/O |
 |
output_low()
output_high()
output_float()
output_bit()
input()
output_X()
input_X()
port_b_pullups()
set_tris_X()
| SPI I/O |
 |
setup_spi()
spi_read()
spi_write()
spi_data_is_in()
| Parallel Slave I/O |
 |
setup_psp()
psp_input_full()
psp_output_full()
psp_overflow()
| Timers |
 |
setup_timer_X()
set_timer_X()
get_timer_X()
setup_counters()
setup_wdt()
restart_wdt() |
| Standard C Math |
 |
sqrt()
sin()
cos()
tan()
sinh()
cosh()
tanh()
asin()
acos()
atan()
atan2()
abs()
labs()
fabs()
exp()
frexp()
ldexp()
pow()
log()
log10()
fmod()
modf()
ceil()
floor()
| A/D Conversion |
 |
setup_adc_ports()
setup_adc()
set_adc_channel()
read_adc()
| Analog Compare |
 |
setup_comparator()
| Voltage Ref |
 |
setup_vref()
| Internal EEPROM |
 |
read_eeprom()
write_eeprom()
read_program_eeprom()
write_program_eeprom()
read_calibration()
| Bit/Byte Manipulation |
 |
shift_right()
shift_left()
rotate_right()
rotate_left()
bit_clear()
bit_set()
bit_test()
swap()
make8()
make16()
make32() |
Pre-Processor:
| Standard C |
 |
#define
#undef
#include
#if
#else
#elif
#endif
#ifdef
#ifndef
#type
#list
#nolist
#error
#pragma
| Function Qualifiers |
 |
#inline
#seperate
#priority
#int_XXXXX
#int_global
#int_default
| Device Specification |
 |
#device
#fuses
#id |
| Built-In Libraries |
 |
#use delay
#use rs232
#use i2c
#use standard_io
#use fixed_io
#use fast_io
| Memory Control |
 |
#bit
#byte
#org
#locate
#reserve
#rom
#zero_ram
| Compiler Control |
 |
#case
#opt
#asm
#endasm
| Predefined Identifiers |
 |
__device__
__date__
__time__
__file__
__line__
__pcb__
__pcm__
__pch__ |
|
Related Items:
keywords: CCSC, CCS C, PICC, PIC C, ANSI C, Custom Computer Services, CCS, MPLAB
ince
1992, theByteFactory has provided high quality software and firmware solutions at
the technically advanced level that today’s products require and consumers demand.
We have expertise in the fields of Factory Automation and Monitoring using peer-to-peer
networked nodes, embedded firmware development with a variety of microcontrollers
and languages from Assembly to C, Windows applications ranging from local stand-alone
to Distributed COM, and the development of multi-product Automatic Test Equipment.
|