Changes since the last manual:

Some new PCD functions not yet in the help file:::::::::::::::::::::::::::::::::::::::

CRC:

   setup_crc( 15,10,1 );          // 0,16 are allowed but ignored.  
                                  // May have up to 17 params.
   crc_init();                    // Starts CRC accumulator out at 0
   crc_init(0xFEEE);              // Starts CRC accumulator out at 0xFEEE
   result = crc_calc( ptr, len ); // processes len words
   result = crc_calc8( ptr, len );// processes len bytes
   result = crc_calc( data );     // processes 1 word
   result = crc_calc8( data );    // processes 1 byte
  
PMP:

   setup_pmp( options, address_mask );
   setup_psp( options, address_mask );
   setup_psp( options );
   pmp_address( address );
   data8 = psp_read();  // reads next buffer location (byte)
   data8 = psp_read(address); // read buffer location "address"
   data8 = pmp_read();  // reads next buffer location (byte)
   psp_write(data8);
   psp_write(address,data8); // write buffer location "address" 
   pmp_write(data8);
   psp_output_full()
   psp_input_full()
   psp_overflow()
   pmp_output_full()
   pmp_input_full()
   pmp_overflow()

RTC:

   setup_rtc(options,calibration)        // Calibration is optional
   setup_rtc_alarm(options,mask,repeat)  // mask and repeat are optional
   rtc_read(time_t datetime)
   rtc_write(time_t datetime) 
   rtc_alarm_read(time_t datetime)
   rtc_alarm_write(time_t datetime)

QEI:

   setup_qei(options, filter, maxcount)  // second and third params are optional
   qei_set_count( value )
   value = qei_get_count()
   status = qei_status()

MOTOR PWM:

   setup_motor_pwm(pwm,options,timebase);  // prescale and postscale calculated
   setup_motor_pwm(pwm,options,prescale,postscale,timebase);
   set_motor_unit(pwm,unit,options,active_deadtime,inactive_deadtime)
   set_motor_pwm_duty(pwm,unit,time)
   set_motor_pwm_event(pwm,time)
   data16 = get_motor_pwm_count(pwm)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

A new option has been added to #rom to pack 7 bit characters into the PCM 14 bit word.
For example:
        #ROM CHAR 0x1000={"THIS STRING TAKES 22 INSTRUCTION LOCATIONS"}

Some keywords have been added to make selecting the hardware pins for a UART or I2C easier.
For the UART the #USE RS232 will accept UART1 or UART2 to select the hardware UART.
For I2C the #USE I2C will accept I2C1 or I2C2 to select the hardware SPI.

The #WORD directive was added and it works like #BYTE except
two bytes are allocated for created variables.

A new built in function ADC_DONE() has been added.  This function
returns FALSE if the A/D converter is currently doing a conversion.

Users that have old code with expresions of the form:
            *(&data + i)
need to change them to:
            *((int8 *)(&data) + i) 
A compiler change was made to be ANSI compliant. 


Use OPTIONS > EDITOR OPTIONS > DISPLAY > CLASSIC MENUS
to replace the ribbons with traditional menus in the IDE.

#ROM has a new option to put a checksum value in ROM.  A value will be put into
this location such that the sum of all ROM locations equals 0x1248.
    #rom getenv("Program_memory")-1 = CHECKSUM

The PORT_x_PULLUPS function allows for a second parametter for devices that have
a pulldown option.  The default value is 0.  Example:
         port_b_pullups( 0xF0, 0x0F );  // Bits 4-7 are pullup and Bits 0-3 are pulldown

#USE I2C has a new option MASK=value where value is a mask that can be applied to
the hardware I2C address match.  This is only available on some chips (like 18FxxK20).

A new function SET_SLOW_SLEW_x(value) is available for chips with a slew select option.
For example:
           set_slow_slew_b(TRUE);


The CCS compilers traditionaly used the C keyword CONST to locate data in program memory.
ANSI uses this keyword to specify a read only data item.  The version 4 compiler has a
new method of storing data in program memory for chips that allow program memory to be read.
These three storage modes may be set directly using one of the following qualifiers:
        ROMI  Traditional CCS method to store in ROM optimized for access from indexed arrays
	ROM   New method to save data in ROM optimized for when the user needs pointers to the data
        _READONLY  Marks the data item as read only, defaults to RAM (like ANSI wants)

By default the CONST keyword is the same as ROMI.  The CONST behavior may be changed with
any of the following:
          #device  CONST=READ_ONLY
          #device  CONST=ROM
          #device  CONST=ROMI

Examples:
         char rom commands[] = {"put|get|status|shutdown"};
         int32 add32( long _readonly * a; long _readonly * b );
         char const hex[16] = "0123456789ABCDEF";
         char rom * list[] = {"red","green","blue"};  






-------------------------------------------------------------------------------------------
#device compilation mode differences:

Default is CCS4:
   Pointer size is set to *=16 if the part has RAM over 0FF.
     
Mode ANSI:
   Default data type is SIGNED all other modes default is UNSIGNED
   Compilation is case sensitive, all other modes are case insensitive
   Pointer size is set to *=16 if the part has RAM over 0FF.

Mode CCS2 and CCS3:
   var16 = NegConst8 is compiled as: var16 = NegConst8 & 0xff (no sign extension)
   Pointer size is set to *=8 for PCM and PCH and *=5 for PCB.
   The overload keyword is required.
   The ROM keyword is _ROM for these versions.
   The WDT/NOWDT/NOLVP fuses are not automatically set by the compiler for these versions.

Mode CCS2:
     onebit = eightbits is compiled as onebit = (eightbits != 0)    
     all other modes compile as: onebit = (eightbits & 1)    

     The default #device ADC= is set to the resolution of the part, all other
     modes default to 8.

