Home  Products Prices Directory Order Contact New Books Files Links Other
DonTronics Home Page CCS PICmicro Compilers.
Bottom of Page
 
We can supply these "Cost Effective", very popular CCS Compilers at about the same price (in most non-US cases cheaper) shipped Internationally as CCS does, however we fully insure them in the price, and there are On Line Secure Credit Card ordering facilities. All International Orders are sent First class Airmail. 30 days of free updates available from your date of purchase from DonTronics .
We offer a Free DT101 SimmStick PCB with every mEL PICBasic, and CCS C Compiler sold.

CCS Customer On Line BBS Have a look at this for on line assistance of this product.
Devices for PCB and PCM Compilers Devices Updated Dec-98
Price and Ordering Information
Check the Dontronics "Manual and Disk" prices page for full pricing calculations.
Prototype Software Board and LCD/Keypad Combination
Microchip PICs and CCS-PCM Code Examples for the Easy Pic'n Book.


Subject:         Re: Q: Which C-compiler to use for PICs?
        Date:    15 Jan 1999 15:12:02 GMT
       From:     fickpci@aol.com (Fickpci)
 
 Newsgroups:     comp.arch.embedded

CCS makes very credible compilers for the PIC's.  They integrate nicely with MPLAB, and other emulator programs.  I've been very satisfied.

Their PCB Compiler covers the 52-58 and PIC12Cxx, their PCM Compiler covers 61-92x and 14000, and their Professional Package (Windows IDE with both PCB and PCM) is $350.

Jon Fick



Subject:       Re: Q: Which C-compiler to use for PICs?
        Date:  Fri, 15 Jan 1999 17:49:29 +0000
       From:   Lee Livezey <lee@avatel.com>
 Newsgroups:   comp.arch.embedded
 
We use the CCS compiler here for our products. One of its strengths is the ease of adding assembly where required. We tried the HiTech compiler about a year ago and didn't like it as well. True ANSI C is a virtue in many applications, but limiting for the PIC environment. At the time we tried it, it didn't support assembly with the ease of CCS's compiler.

Subject:       Re: Q: Which C-compiler to use for PICs?
        Date:  Fri, 15 Jan 1999 21:31:14 GMT
       From:   asmlang@my-dejanews.com
  Newsgroups:  comp.arch.embedded
 
I have tried both HiTech C compiler (beta) and CCS one.  Beta HiTech sucked. There were problems with allocating string constants, some computational stuff was far from ideal.  The integration with MPLAB was absent.  The price was quite high, although they had the discount for beta-testers.  Since then they have added integration with MPLAB, and, I hope, fixed other issues.  The price is still high.

We bought CCS for midrange PICs (PCM), it was $100, integrated with MPLAB OK, the code quality is great, the method they support memory allocation for auto variables is good, inline assembly is supported.  It does not do link, but for the PIC-sized project (we used 8KB ROM PIC) we did not care.



Review of 4 PIC 'C' Compilers: By Bob Shaver. (Introduction)
  1. Custom Computer Services: PCM
  2. Byte Craft: MPC
  3. B. Knudsen Data: CC5x
  4. MicroChip: MPLAB-C
Code Comparisions:
CCS C COMPILER FOR PIC 16Cxx: supplied by DonTronics.
Upgrade Policy for Overseas Customers
Users Questions Log and self help.

From: "Iain  or Kelly Galloway" 
To: pics@parallaxinc.com
Date: Sat, 27 Jul 1996 02:37:01 +0000

> From:          Mike Harpe 
> Subject:       [PICS] Getting started with PIC
>
> Is there an inexpensive C compiler?  Perhaps GNU C or something?  $800 is
> pretty steep and my budget does not have room for that kind of investment
> right now.  Sorry, Parallax...
>
Custom Computer Services makes a good, inexpensive C compiler for the
PIC. I believe it is about $99. I use it and have no major complaints.
They are about to release a version 2.0; better doco ,printf that
has output device as a parameter etc...

Iain Galloway





From: John Barrowman  Subject: Re: [PICS] Getting started with PIC At 02:37 AM 7/27/96 +0000, you wrote: >Custom Computer Services makes a good, inexpensive C compiler for the >PIC. I believe it is about $99. I use it and have no major complaints. >They are about to release a version 2.0; better doco ,printf that >has output device as a parameter etc... >Compiler produces a ".cod" file that works with Parallax Clearview >'XX. Problem is you step through the assembly, and not the C source >(or not even 'C' commented assembly.) >Parallax: When can we have this as a feature? >How does Parallax intend to support 'C' in general on the Clearview? >Iain Galloway Hi there! As far as I know, as long as you have PCM v1.9994 or later and the current version of PDE, it already works. Just install the CCS compiler into the same directory that PDE resides. Then you can open/run/debug your C source code in the PDE. You need to select the CCS compiler in the File.Project Info window. Good Luck! John Barrowman Parallax Tech Support - To subscribe -or- unsubscribe send e-mail to majordomo@parallaxinc.com and - put SUBSCRIBE pics -or- UNSUBSCRIBE pics in the body of the message
From: Lee Livezey  Newsgroups: comp.arch.embedded,alt.comp.hardware.homebuilt Subject: Re: PIC C compilers Date: Mon, 22 Jul 1996 11:48:00 +0000 > Ian Ashdown wrote: > anders1@nando.net  (Anders) wrote: > > Hey all :) > > A fairly simple question: What has been your experience > with the various C compilers for the PICs? > >   PCB - C compiler for 16C5x chips ($99) >   PCM - C compiler for 16C61 to 16C84 chips ($99) > >   CCS >   PO Box 2452 >   Brookfield, WI 53008 >   Tel. (414) 781-2794 > > I haven't used either of these products Ian Ashdown, --------------------------------------------- I'm using the CCS PCM compiler. For the money it's great. Allows in line assembly, and has several nice extensions included like programmable delays, asynch communication, etc.  I think you'll like. =:) Hoper this helps, Lee ======================================================================= Date:         Mon, 9 Sep 1996 05:47:35 -0500 From: Rick Miller  Subject:      "C" on PICs To: Multiple recipients of list PICLIST  On Sun, 1 Sep 1996, rich wrote: [...] > I am in a similar situation, we are about 3 weeks into a project using > MPLABC and the 16c74.  There appears to be very little code around in C > for this system as yet. > > I am more than willing to participate in code sharing. > I have some unrefined but working IIC routines in C if anyone is > interested. Honestly, I hope you didn't actually *buy* MPLABC to program the PIC16C74.  You'll do better with CCS's "PCM" (http://www.execpc.com/~ccs/). I'm not affiliated, just really, really pleased.  The communications routines (async and IIC) are BUILT IN to the compiler, and it only cost $100 for the thing.  Mark has already updated his product(s) to be MPLAB compatible, and I think he has a development environment of his own now too. I'm using it with great satisfaction to program the 3-PIC, $2000, dual floating power-supply/waveform-generator I'm working on for Digalog Systems (automated test equipment).  Compared to CCS's compiler, MPLABC is like programming assembly in C. Best wishes, Rick Miller ===================================================================== Date:         Wed, 11 Sep 1996 02:18:37 -0400 Reply-To: pic microcontroller discussion list  Sender: pic microcontroller discussion list  From: Shawn Ellis  Subject:      Re: I2C EEPROM  X24C01PI-3 on PIC16C65 At 12:18 AM 9/11/96 +0200, you wrote: >  Hi!! > I'm wondering if there is anybody out there who have used the I2C >X24C01PI-3 memory on PIC16C65. I could use some help for this matter. I >trying to use the >:65 as a master and because of that I'm initialize the I2C as '''''Master. >Slave idel'''''. >1)  How do I initialize the I2C port correctly ? >     I already have open collector for SCL and SDA???? >     Can the 'hard' slave part mess up my transaction in >     one or another way??? >2)  Are there any libary routes for I2C master support??? >3)  Are there any samples whit I2C  EEPROM:s??? > No, don't try to use the hardware I2C in the PIC's for master mode!   I've made many attempts at this with the '74 to no avial... finnally figured out that master mode IS NOT SUPPORTED on the PIC's UART! You must abandon the hardware methode and bit-bang out to normal I/O lines. There's an ap-note for this in the handbook. If I where you, though, I'd buy the MPC "C" compiler from CCS.  They have a "C" file already written for you to do this.  It's only $99, and it sure makes alot of codeing easier!  Especially for the larger PIC's!  I have been using this compiler to interface to a 24LC01 for some time now with no difficulties. Shawn ======================================================================= Date: Thu, 12 Sep 1996 09:07:03 -0700 From: Walter Banks  Organization: Byte Craft Limited To: donmck@labyrinth.net.au Subject: MPC compiler Don, The last time I checked the compiler review on your web site it was based  on the very first release of the Byte Craft compiler. Many things have  changed since then. Our lastest release MPC V1.20 is being distributed to  our customers reflects a year and a half experience with our high level  language implementation on the the entire Microchip PIC family.  Microchip bought a source licence in October 95 and MPLABC is derived out  of that source. Byte Craft has continued to develop and support MPC.  These two compilers will likely follow different paths. MPC will continue  to provide embedded system features and clean portability to other the 8  bit embedded system platforms that we support. Walter Banks, Byte Craft Limited http://www.bytecraft.com =================================================================== Hi Walter, I see your messages from time to time. :) I sort of thought this may be the case. Of course the review was out of my hands, but as you have advised me of the facts, in the interests of fair play, I'll add your letter to the page and allow readers to make their own judgment! Nice to hear from you. Cheers Don... ====================================================================== From: data industrial corporation  Newsgroups: comp.arch.embedded Subject: Re: C compiler information Date: Fri, 13 Sep 1996 09:11:33 -0400 Walter Banks wrote: >  > > > > Microchip just acquired the ByteCraft compiler.  They wrote a Windows > > front end for it, fixed some percentage of the bugs, and released it.  I > > bought it when it was first released (August 1?), but I was reluctant to > > use it since my current app is very time sensitive and I could not > > afford to risk the new compiler. >  > Microchip have a source licence for the Byte Craft Compiler from October > 1995. MPC and MPLABC C are two separate products. Byte Craft recently > released an update that reflects all of our changes for the year and a > half since initial release. > > > > I believe this one is still your best bet. >  > Walter Banks > http://www.bytecraft.com Yup,  I met Walter Banks briefly at the embedded systems conference east last April in Boston, Nice guy,  But,  The CCS tools are doing the trick for me, and a lot cheaper, Been using it for about 6 months, latest version 2.203 I've run across subtle bugs from time to time, but Mark @CCS is always responsive, with fixes.  Some of these bugs had to do with long<->byte conversions, but all fixed with latest version. The added word suport (data type long) helped out my code a lot. I'm using a part with two ram banks, with the nefarious RP0 bit, the compiler does a good job of keeping track of which ram bank you are in. Of course, accessing between ram banks increases source code with all the twiggling of RP0. you can't get something for nuthin' BTW, I've integrated Microchip AN575 app note, as inline assembly with PCM. This is the IEEE 754 "compliant" 32 bit floating package (original author Frank Testa). It wasn't easy as the assembler source is tightly coupled. Anyone out there attempted/completed the same thing??? I've got it working, but it's pretty fat code..... john waygan computer engineer

Review Introduction:

COMPILER.TXT                                       &nbs;        8 July 1996
=======================================================================
Bob Shaver
Practical Micro Design
7432 Alban Station Blvd., A-105
Springfield, VA  22150  USA
Voice: (703) 912-4991
FAX:   (703) 912-5849
e-mail: 71212.22@compuserve.com
MicroChip BBS: Bob Shaver (I check this sporadically)

This file contains the results of my review of four "C" compilers for the
PIC family of chips.  A table at the end of this file summarizes the RAM and
ROM usage for each compiler for my sample program segment.  This is a
NON-EXHAUSTIVE review (I only spent 2-3 hours with each compiler).

All compilers provided:
  - Built-in functions for NOP, CLRWDT, RLF, RRF, SLEEP and SWAP
  - Support for bit and 8-bit variables.
  - Multiplication and division (except where noted)
None of the compilers allow a function to return a bit (they must return an
8-bit or 16-bit variable).


The compilers are:

Company:                        Compiler
---------------------------     ------------------------------------
Custom Computer Services        PCM (for 16C6x, '7x and '84)
PO Box 2452                     full production version 1.9996 and 1.9998
Brookfield, WI  53008 USA
Voice: (414) 781-2794
FAX:   (414) 781-3241

Byte Craft                      MPC, demo version dated 15 December 1994
Waterloo, Ontario, Canada       (MPCDEMO.ZIP, latest demo on MicroChip BBS)

B. Knudsen Data                 CC5x, demo version 2.1A from MicroChip BBS
Trondheim, Norway               (DEMO21A.ZIP in 3RD PARTY area)
Contact:  Dag Bakken
email:    dag.bakken@microchip.com
MCHIPBBS: Dag

Micro Chip                      MPLAB-C, demo version 1.10
Chandler, MA. USA               (CDEMOZIP.EXE for DOS version, in DEMO area)
Back to The Table of Contents. 

Custom Computer Services: PCM:

Overall Impression:
    This compiler offers a good set of features at a very bood price ($99
    US). free upgrades are provided via their BBS for 30 days.  Supports a
    significant "C" subset, including structures with bit fields, bit and
    8-bit integers (16-bit variables not directly supported).  The built- in
    RS-232 support and code generation is a real bonus.  During the 30 days
    after we bought this compiler, there were four new versions available
    from the BBS.  This is good in that they fixed a couple of bugs.
    However, it does make me wonder about the maturity and stability of the
    compiler.  Also, two of the versions had the same version number
    (1.9998) even though they had different time stamps and different
    features.

Advantages:
  - Automatically generates code for built-in USART or bit-banging RS-232
    asynchronous I/O.  This code is polled mode only.  For interrupt-driven
    RS-232 (either bit-banged or built-in USART) you must write your own
    code.
  - Provides built-in putchar() and getchar() that use the generated RS-232
    code.  Also provide printf() with constant strings (no number
    formatting).
  - Built-in functions to assist in using all built-in peripherals.
  - Can automatically in-line functions, or user can specify whether or
    not to in-line.
  - Overlays local variables for functions not in the same call tree.
  - Supports structures and unions, including bit fields.
  - Bit assignment generates compact code.  For example:
        short   bit1;
        PORTB.0 = bit1;     /* Assign bit1 to Port B, bit 0 */
    generates
        BCF     PORTB,0     ;Note that this causes glitch on output pin if
        BTFSC   bit1        ;pin was =1, and bit1 = 1.
        BSF     PORTB,0
  - Allows access to "look-up tables" using RETLW via arrays.  For example:
        int const data[5] = { ... };
        int func( int a ) {
            return( data[a] );
        }
    A possible disadvantage is that doing the data[] lookup adds another
    level of CALL/RETURN to stack usage.
  - Does not generate unnecessary GOTOs in SWITCH cases that end with a
    return() and no "break;".  For example:
        switch( a ) {
        case 0: return( 40 );
        case 1: return( 35 );
        }
    Generates:
        case0   MOVLW   40
                MOVWF   xx      ; xx is the return variable
                GOTO    end     ; end is the exit point of the switch
        case1   MOVLW   35
                MOVWF   xx
                GOTO    end
    Note that if you do include a "break" after the return statements, an
    extra GOTO is added.  For example:
        switch( a ) {
        case 0: return( 40 ); break;
        case 1: ...
        }
    Generates:
        case0:  MOVLW   40
                MOVWF   xx
                GOTO    end
                GOTO    end
        case1:  ...
  - Can decalare bit variables (short int) and let the compiler place them
    in RAM.
  - Technical support was responsive to questions posted on their BBS.

Disadvantages:
  - Compiler defaults to not case sensitive.  Enabling case sensitivity
    causes supplied .H files to not compile.
  - Does not optimize register loads.  For example:
            int   x, z;
            z = func( 0 );          CLRF    27
                                    CALL    func
                                    MOVF    21,W    ;Get return value
                                    MOVWF   26    nbsp; ;Store in z
            x = z;                  MOVF    26,W    ;Reload z (redundant)
                                    MOVWF   27
  - Bit assignment to port output pin can glitch that pin (may or may not
    be a concern...depends on application).  See bit assignment example
    under advantages.
  - Using the built-in TRISx variables used the TRIS instruction, even on
    16C7x processors where it is not recommended.
Back to The Table of Contents. 

Byte Craft: MPC

Overall Impression:
    The demo version is 1-1/2 years old and may not reflect the current
    capabilities of this compiler.  Supports a significant "C" subset,
    including structures, bit, 8-bit and 16-bit variables.
    The MicroChip MPLAB-C (which is derived from this compiler) generates
    better code and did not exhibit any of the bugs I found (bugs only caused
    excessive unused assembly instructions).

Advantages:
  - Allows structures and unions, but does not support bit fields.  Can access
    individual bits by declaring a varable of type "bits" (an 8-bit integer
    where bit 0 is accessed as name.0).
  - Allows separate compilation with a link stage (not in demo version).
  - Allows access to "look-up tables" using RETLW via arrays.  For example:
        int const data[5] = { ... };
        int func( int a ) {
            return( data[a] );
        }
    A possible disadvantage is that doing the data[] lookup adds another level
    of CALL/RETURN to stack usage.  A compiler bug generated an error message
    on the int const data[5] line complaining about the number of arguments,
    but generated correct assembly code.
  - Assigning a bit variable to a bit output variable does not glitch the
    output pin (although it does generate non-optimal code, see under example
    disadvantages).

Disadvantages:
  - Cannot declare bit variables without manually declaring a RAM location
    for them.
  - Does not automatically overlay local variables for functions.  User must
    manually declare global variables and use them.
  - Very inefficient code generation, due in large part to the next two items.
  - Always sets/clears PCLATH before CALLs and GOTOs, even local.
  - Does not track current data page setting.  Clears/sets RP0 at EVERY
    CALL or GOTO destination, even if a local goto (see next example).
  - Assigning one bit variable to another generates non-optimal code.
        bits    bit1, bit2;
        bit1.0 = bit2.0
    Generates:
        BCF     STATUS,RP0  :Select RAM page
        BTFSC   26,0        ;test bit2.0
        GOTO    x1
        BCF     27,0        ; bit1.0 = 0
        GOTO    x2
     x1 BCF     STATUS,RP0  ;redundant!!
        BSF     27,1        ; bit1.0 = 1
     x2 ...
  - Using built-in TRISx variable names uses TRIS instruction, even on 16C7x
    family where it is not recommended.
Back to The Table of Contents. 

B. Knudsen Data: CC5x

Overall Impression:
    This compiler provides a limited but usefull "C" subset at a reasonable
    price (about $380 US).  CC5x generated the smallest code and RAM usage
    from my test code.  It supports bit and 8-bit char variables, but does
    not support multiplication or division.  Various optimizations can be
    disabled from the command line.

Advantages:
  - Generats the most compact switch/case test code of all compilers.
  - Assigning data to built-in TRISx variables does not use TRIS instruction
    on 16C7x family (does use TRIS on 16C5x family).
  - Assigning a bit variable to an output bit variable generates glitch-free
    code.  The compiler also knows which bit variables are i/o pins and
    generates different (more compact) code for non-i/o bit assignments.
    For example:
        #pragma bit DATAOUT @ PORTB.2       /* bit variable on i/o pin */
        #pragma bit DATAIN  @ PORTB.3
        bit aBit;                           /* bit variable in RAM */
        aBit = DATAIN;      BCF     21h,aBit        ; efficient code here
                            BTFSC   PORTB,DATAIN
                            BSF     21h,aBit

        DATAOUT = aBit;     BTFSS   21h,aBit        ;less efficient but
                            BCF     PORTB,DATAOUT   ;glitch-free
                            BTFSC   21h,aBit
                            BSF     PORTB,DATAOUT
  - Optimizes out redundant register loads
  - Can replace CALL/RETURN with GOTOs for functions called from one place.
  - Allows access to "look-up tables" using RETLW via #pragma return or 
    multiple return instructions. (see sample code).
  - Can declare bit variables and let the compiler place them in RAM, or
    you can designate the location at compile time.

Disadvantages:
  - Does not support struct or union.
  - Limited complexity on source lines (minor complaint).  For example:
        ch = func1( func2(0) );     -->     ch = func2( 0 );
                                          &nbp; ch = func1( ch );
  - Does not support "~" (bit-wise invert) operator.
  - Functions can only return constants.  For example, does not support:
        char func( char a )
        {
            return( a + 3 );
        }
  - No built-in support for multiplication or division
Back to The Table of Contents. 

MicroChip: MPLAB-C

Overall Impression:
    The MicroChip version of the ByteCraft compiler is a much better compiler
    than the old ByteCraft version.  It provides the largest "C" subset,
    including 16-bit variables with multiply and divide.  It also provides
    built-in functions to support all PIC peripherals.  

Advantages:
  - Built-in support for 16-bit variables.
  - Support struct and union, but does not allow bit fields.
  - Support routines for all built-in peripherals.
  - Assigning to the built-in TRISx variables does not use the TRIS
    instruction on the 16C7x family.
  - Provides method to manually overlay local variables in functions (see
    under disadvantages).

Disadvantages:
  - Must manually locate all bit variables using #define.
  - Like ByteCraft compiler, sets/clears the register page (RP0) at the
    destination of all GOTOs, even local ones (causes unnecessary code bloat).
  - Generates inefficient (but glitch free) code for bit variable assignment
    such as:        bit1 = bit2;
  - Does not automatically overlay local variables from functions.  However,
    it does provide a method to manually overlay them by declaring global
    variables and assigning the local variables to the location of the global
    variables (specifying absolute locations for local variables).  This
    allows you to use meaningfull (different) names for the local variables
    in each function, and still map them to a single global variable.
Back to The Table of Contents. 

Code Comparisions

The ROM space noted here includes the RESET vector and the space before the
interrupt vector (which may or may not be used).  These are the results for
the AGILExxx.C files included with this review.  The source files for the
various compilers were modified to try and match each compiler's most-
efficient code generation syntax.

                              RAM         ROM
                            --------    ---------
CCS PCM                     15 bytes    177 words
ByteCraft MPC               20 bytes    246 words
B. Knudsen Data CC5x        12 bytes    140 words
MicroChip MPLABC            20 bytes    187 words
Back to The Table of Contents. 

C COMPILER FOR PIC 16Cxx

By Custom Computer Services (CCS) supplied by DonTronics.

CCS offers a C compiler for the MicroChip PIC16 processors. This C compiler based on original K&R is fully optimized for use on these unique parts. Built in functions make coding the software very easy. The integrated C development environment gives developers a fast method to produce efficient code from an easily maintainable high level language.


Overview

The integrated C development environment gives developers a fast method to produce efficient code from an easily maintainable high level language. The compiler includes built in functions to access the PIC hardware such as READ_ADC to read a value from the A/D converter. Discrete I/O is handled by describing the port characteristics in a PRAGMA. Functions such as INPUT and OUTPUT_HIGH will properly maintain the tri-state registers. Variables including structures may be directly mapped to memory such as I/O ports to best represent the hardware structure in C. The microcontroller clock speed may be specified in a PRAGMA to permit built in functions to delay for a given number of microseconds or milliseconds. Serial I/O functions allow standard functions such as GETC and PRINTF to be used for RS-232 like I/O. The standard C operators and the special built in functions are optimized to produce very efficient code for the bit and I/O functions normally required for these microcontrollers.

Functions may be implemented inline or separate. Function parameters are passed in reusable registers. Inline functions with reference parameters are implemented efficiently with no memory overhead.

During the linking process the program structure including the call tree is analyzed. Functions that call one another frequently are grouped together in the same page. Calls across pages are handled automatically by the tool transparent to the user. RAM is allocated efficiently by using the call tree to determine how locations can be re-used.

Features:


Specific Capabilities

BUILT-IN FUNCTIONS: PRAGMAS: STANDARD C:

Example Programs


1 khz generator with RS-232

#include <PIC16C56.H>
#include <stdio.h>

#use Delay(Clock=20000000)

#use RS232(Baud=9600,Xmit=PIN_18,Rcv=PIN_17)


main() {

   printf("Press any key to begin\n\r");
   getc();

   printf("1 khz signal activated\n\r");

   while (TRUE) {

     output_high(PIN_8);
     delay_us(500);
     output_low(PIN_8);
     delay_us(500);
   }
}

A/D Converter

#include <PIC16C71.H>
#include <stdio.h>

#use Delay(Clock=15000000)

#use RS232(Baud=9600,Xmit=PIN_10,Rcv=PIN_7)

void puthex1( byte n ) {

   if(n<10)
     putchar(n+'0');
   else
     putchar(n+'A'-10);
}

void puthex( byte n ) {

   puthex1( n / 16 );
   puthex1( n % 16 );

}

main() {

   int i,value,min,max;

   printf("Sampling:");

   setup_port_a( ALL_ANALOG );
   setup_ADC( ADC_CLOCK_INTERNAL );
   set_ADC_channel( PIN_18 );

   do {
      min=255;
      max=0;
      for(i=0;i<=30;++i) {
          delay_ms(100);
          value = Read_ADC();
          if(value<min)
            min=value;
          if(value>max)
            max=value;
        }
      printf("\n\rMin: ");
      puthex(min);
      printf("   Max: ");
      puthex(max);
   } while (TRUE);

}












Pulse timer

#include <PIC16C56.H>
#include <stdio.h>

#use Delay(Clock=20000000)

#use RS232(Baud=9600,Xmit=PIN_18,Rcv=PIN_17)

char get_scale() {
   char scale;

      do {
         printf("\n\rPress S for short or L for long:");
         scale = getc();
         if ((scale>='a') && (scale<='z'))
           scale|=0x20;
      } while ( (scale!='S') && (scale!='L') );

      return(scale);
}

void wait_for_low_to_high() {

   if(input(PIN_9))             /* if it's high, wait for a low */
      while(input(PIN_9)) ;

   delay_us(3);                 /* account for fall time */

   while(!input(pin_9));        /* wait for signal to go high */
}

void wait_for_low() {

   delay_us(3);                 /* account for rise time */

   while(input(pin_9));        /* wait for signal to go high */
}

void puthex1( byte n ) {

   if(n<10)
     putchar(n+'0');
   else
     putchar(n+'A'-10);
}

void puthex( byte n ) {

   puthex1( n / 16 );
   puthex1( n % 16 );

}


main() {

   char scale;
   byte time;

   do {
      scale = get_scale();

      if(scale=='S')
         setup_counters( RTCC_INTERNAL, RTCC_DIV_64 );
      else
         setup_counters( RTCC_INTERNAL, RTCC_DIV_256 );

      printf("\n\rPress any key to time\n\r");

      getc();

      wait_for_low_to_high();
      set_rtcc(0);
      wait_for_low();
      time = get_rtcc();

      printf("Counter value: ");
      puthex(time);
      printf("\n\n\r");

   } while (TRUE);
}












Stop Watch

#include <PIC16C71.H>
#include <stdio.h>

#use Delay(Clock=15000000)

#use RS232(Baud=9600,Xmit=PIN_10,Rcv=PIN_7)

#define high_start 57

byte seconds, high_count;

#INT_RTCC
clock_isr() {

    if(--high_count==0) {
      ++seconds;
      high_count=high_start;
    }

}

void putdec( byte n ) {

   putchar( (n / 100)+'0' );
   putchar( ((n / 10) % 10)+'0' );
   putchar( (n % 10)+'0' );

}


main() {

   byte start,time;

   high_count=high_start;
   set_rtcc(0);
   setup_counters( RTCC_INTERNAL, RTCC_DIV_256);
   enable_interrupts(RTCC_ZERO);
   enable_interrupts(GLOBAL);

   do {

      printf("Press any key to begin.\n\r");
      getc();
      start=seconds;
      printf("Press any key to stop.\n\r");
      getc();
      time=seconds-start;
      putdec(time);
      printf(" seconds.\n\r");

   } while (TRUE);

}
Back to The Table of Contents.

Price and Ordering Information

C Compiler Single User License:

Check the Dontronics "Manual and Disk" prices page for full pricing calculations.

MAINTENANCE

30 days of update rights . . . . Included with compiler
One year update rights . . . . . Same as current compiler price

A one year maintenance contract may be purchased at any time from CCS after an initial purchase for the current compiler price.

Prototype Software Board and LCD/Keypad Combination.

There is a Prototype Software Board and LCD/Keypad Combination available from CCS. Because of the Shipping charges to me, and and the possibility of me getting hit with Australian Customs and Sales Tax on these items, I get CCS to ship directly from the US to my customer.

Please contact me for current pricing.

CCS Home Page
Back to The Table of Contents.

Please Note ****
This review wasn't done by me, and as I have never programmed in "C", I can't answer a lot of your technical questions. Well, at least I'm honest. Perhaps I should learn. :)
However, support will be the same as any product. If I haven't got the answer, I'll get it.

Back to The Table of Contents.
Devices for PCB and PCM Compilers (Updated Dec-98)
Check Current devices listed at CCS

The PCB is for 12 BIT parts and PCM is for 14 BIT parts.
PCB:
MTA81010,PIC12C508,PIC12C509,PIC16C52,PIC16C54,PIC16C54A,PIC16C54B,PIC16C55, PIC16C56,PIC16C57,PIC16C57A,PIC16C57B,PIC16C58,PIC16C58A,PIC16C58B,
PCM:
PIC12C671,PIC12C672,PIC14000,PIC16C554,PIC16C556,PIC16C558,PIC16C61,PIC16C62,
PIC16C20,PIC16C621,PIC16C622,PIC16C62A,PIC16C63,PIC16C63EM,PIC16C64,PIC16C641,
PIC16C642,PIC16C64A,PIC16C65,PIC16C65A,PIC16C66,PIC16C661,PIC16C662,PIC16C67,
PIC16C70,PIC16C71,PIC16C710,PIC16C711,PIC16C715,PIC16C71A,PIC16C72,PIC16C73,
PIC16C73A,PIC16C73EM,PIC16C74,PIC16C74A,PIC16C76,PIC16C77,PIC16C83,PIC16C84,
PIC16C84A,PIC16C923,PIC16C924,PIC16CR84,PIC16F83,PIC16F84
 

Back to The Table of Contents.

Upgrade Policy for Overseas Customers

Date: Thu, 22 Aug 1996 08:31:40 -0500
From: CCS 
To: Don McKenzie 

Don McKenzie wrote:

>30 days upgrade via US BBS. Not really an option for Overseas customers.
>Do you have an alternative?


Not for the 30 days.  We do offer a service to e-mail updates every month
for a year at a cost of $119.  If a user finds a problems that we consider
serious within the 30 days and they do not have easy BBS access we will
e-mail them the update to fix their problem.

>I wonder if there are any 'chat groups' on the net that may offer a certain
>amount  of self help support? If not, I could always add small messages to
>a page on my site.

On our long list of things to do we plan to investigate this.  We know
customers do talk about us on the Microchip BBS and within the PIC list.  We
do plan to become more involved with this and try to organise a way for
customers to share code and hints.
Upgrade Policy 19-Nov-96Each compiler you have has a P.... number which is unique to it. That P... gives you the right to download for 30 days after you purchase from DonTronics.

To do this you must contact CCS via E-mail at ccs@ccsinfo.com and tell them your P number and purchase date.

Non-internet customers have the BBS or can ask CCS for a new disk.

Back to The Table of Contents.

Users Questions Log and self help.

==================================================================
Subject: Re: C compilers
Date: Mon, 4 May 1998 07:48:51 -0400
From: John Walker jjw@SEI.CMU.EDU
Reply-To: pic microcontroller discussion list PICLIST@MITVMA.MIT.EDU
To: PICLIST@MITVMA.MIT.EDU

Mark,
        I have been using the CCS compiler for about a year now and am very
pleased with the results. The Serial, I2C, and SPI functions included in the
library that comes with the compiler all worked great, no modifications were
needed. I was happy with the LCD functions I had written previously, so I
haven't tried those out, but they are included. I felt for the $99 I spent
on it, I really got my moneysworth back.

John

At 04:32 PM 5/1/98 -0700, you wrote:
>Anyone used the C compiler from CCS? At $99, it seems like a deal.
>
>Thanks,
>Mark

==================================================================
Date: Fri, 23 Aug 1996 09:25:14 +1000 (EST)
To: ccs@exepc.com
From: Brian Fitton 
Subject: PCML Problem
Cc: donmck@labyrinth.net.au

I am having problems setting up the PCM compiler V2.107, and would
appreciate your assistance.

The path includes \PICC, and a SET statement includes \PICC\EXAMPLES.
I am using your EX_LCDKB.C as an example.
If compiles using the IDE everything is fine.
Likewise using PCM -C \PICC\EXAMPLES\EX_LCDKB.C.

However if PCML is involked, either manually PCML \PICC\EXAMPLES\EX_LCDKB.C,
or from MPLAB, the RUNTIME ERROR 202  0002:11BC is displayed.
I have no reference to the error codes.

Would you please respond as soon as possible.

Thank You
Brian Fitton
============================================================================
From - Fri Aug 23 16:06:43 1996
To: ccs@exepc.com
From: Brian Fitton 
Subject: A/D and PIC14000
Cc: donmck@labyrinth.net.au

I have just acquired your PCM compiler, and intend to use it with PIC14000's.

I tried to compile one of your examples which sends A/D readings out through
the serial port with the processor changed to PIC14000,  only to get an
error message on the "setup_port_a()" command.
Looking at the "14000.H" indicates that A/D on the PIC14000 has not been
implemented.  

I realize it is not as straight forward as conventional 8 bit A/D on the
other devices, however

(1) do you intend to implement it ?
(2) do you have any sample "C" code using A/D on the PIC14000 ?

Thank You
Brian Fitton
=====================================================================
From - Fri Aug 23 16:06:45 1996
To: donmck@labyrinth.net.au
From: Brian Fitton 
Subject: CCS C Compiler (PCM)

Don
As you are aware by now I have contacted CCS on a couple of matters, and I
have CC'd you for reference.

I did this as I thought that you may want to build up a file on the product.

Please let me know if you want me continue this practise or not ?

If you come across any sites which support the CCs compilers and/or have
sample code, I would appreciate if you would let me know about them.

Likewise if can help you in any way, let me know.

Regards
Brian Fitton 
===================================================================
Date: Tue, 10 Sep 1996 08:55:23 +1000 (EST)
To: donmck@labyrinth.net.au
From: Brian Fitton 
Subject: PIC14000 and A/D

Don
I have not been copying you on all the correspondence between myself and
Mark from CCS has it has been quite detailed and would congest your
self-help pages.
However here is a summary.

(1) The PCML.EXE supplied with V2.107 of the PCM package has stack problems.
    This is reported, and will be fixed.
    For integration with MPLAB use PCM.EXE with the "-C" option in the
meantime, it works just fine.

(2) The A/D routines for the PIC14000 were implemented without the benefit
of a sample chip, and were data sheet only.
    In reality there are a few errors and omissions, but they are now being
addressed.
    There is an interim update on the CCS bulletin board, which I will be
evaluating over the next few days.

    There are a lot of questions still to be answered, but presently you do
not use SETUP_PRT_A(), just use READ_ADC().

I will keep you informed.

Regards
Brian
====================================================================
From: rhaddad@cts.com (Ray Haddad)
Newsgroups: comp.arch.embedded

Subject: Re: PIC C Compilers
Date: 14 Oct 1996 00:27:42 GMT

Don Krueger (dkrueger@erols.com) wrote:

: I have been using the CCS compiler as well and have been impressed by
: it's capabilities (especially considering the $99 price tag).  But it
: should be noted that the CCS compiler is not ANSI compliant either.
: It does not have pointers to functions for example.

: If you wish to know the differences between the two compilers, CCS has
: posted a comparison on their web site.  They even list features which
: are present on MPC that their compiler does not have.  I must admit I
: found that quite refreshing.  On the other hand, I suspect (due to his
: e-mail address)  that Mr. Miller has some association with CCS.  If
: that's the case, it should have been stated in the post.

: Don Krueger

Mr. Krueger,

CCS has only two employees and neither of them is Mr. Miller. Your
detective work is less that impressive. Just becuase someone uses the same
server means nothing. Exec-PC has over 10,000 subscribers. Are you
associated with everyone on Erol's Internet server? It is unfortunate, but
your suggestion does more harm just by being said than if it were true. 
Even if Mr. Miller has some association with CCS (indeed, he appears to be
a customer), what harm is there in what he said? You agreed with him for
the most part and I happen to think he is right on in his comments.

At any rate, I have been using the CCS compilers over 4 years now and 
have had fabulous success with both PCM and PCB. I also have both MPC 
from Bytecraft and MPC-LAB from Microchip and prefer CCS compilers hands 
down. I guess I should mention that I am a customer......

I will say that ease of use is very important to me and CCS has been an
Integrated Device Environment (IDE) from my first version. It is
interactive and easy to use. I can compile my code and call up my
programmer with two key combinations. It compiles 978 lines of PIC16C64
code in just under 12 seconds. 

-best regards,

Ray Haddad
rhaddad@cts.com

====================================================================
Date: Mon, 28 Oct 1996 10:34:30 -0600
From: ccs@execpc.com
To: dontronics@labyrinth.net.au
Subject: Re: DonTronics Question!

Don McKenzie wrote:
> I have a prospective customer question that I hope you can answer for
> me.
> 
> >I have a RICE16 emulator and a Picstart C and wish to use the C compiler
> >from CCS. Can I use it with the programmer I have for the PIC 16C73/74?

        Yes, it is compatible with both the RICE16 and PICSTART.

====================================================================
Date:         Thu, 31 Oct 1996 10:21:23 GMT+2
Sender: pic microcontroller discussion list 
From: Werner Terreblanche wterreb@PLESSEY.CO.ZA
Organization: Plessey SA Ltd
Subject:      Re: Serial port(s) on PIC

Tjaart van der Walt  wrote:

>Perhaps we can nag & nag & nag & nag Microchip until they include a
>second UART on chips like the 16C74. Doing it in software is a pain in
>the butt. Am I alone, or is there anybody else that agree?

Tjaart

  Maybe its time you should consider using the CCS C compiler.  I
recently started using it and one of the most usefull functions is
its capability to add a software serial port on ANY of the pic
devices.  What a pleasure to be able to use printf statements on
devices like the PIC16C84!  And if you need two serial ports on one
device its no problem at all, because the compiler already caters for
that.  And its defineteyl not a pain in the butt to implement.

I do all my development work now using that compiler and I add printf
statements while debugging my software.  Once I'm happy that its
working I just delete the printf statements and re-compile.  Its
really worth the $99 that you pay for it.

Regards
Werner
--
Werner Terreblanche   Tel +27 21 7102251   Fax +27 21 721278
wterreb@plessey.co.za (work) OR werner@aztec.co.za  (home)
====================================================================
Date:         Thu, 31 Oct 1996 10:21:23 GMT+2
Sender: pic microcontroller discussion list 
From: Werner Terreblanche wterreb@PLESSEY.CO.ZA
Organization: Plessey SA Ltd
Subject:      Re: Serial port(s) on PIC

Tjaart van der Walt  wrote:

>Perhaps we can nag & nag & nag & nag Microchip until they include a
>second UART on chips like the 16C74. Doing it in software is a pain in
>the butt. Am I alone, or is there anybody else that agree?

Tjaart

  Maybe its time you should consider using the CCS C compiler.  I
recently started using it and one of the most usefull functions is
its capability to add a software serial port on ANY of the pic
devices.  What a pleasure to be able to use printf statements on
devices like the PIC16C84!  And if you need two serial ports on one
device its no problem at all, because the compiler already caters for
that.  And its defineteyl not a pain in the butt to implement.

I do all my development work now using that compiler and I add printf
statements while debugging my software.  Once I'm happy that its
working I just delete the printf statements and re-compile.  Its
really worth the $99 that you pay for it.

Regards
Werner
--
Werner Terreblanche   Tel +27 21 7102251   Fax +27 21 721278
wterreb@plessey.co.za (work) OR werner@aztec.co.za  (home)
====================================================================
CCS Home Page
 
 
Home  Products Prices Directory Order Contact New Books Files Links Other
 

DonTronics Home Page

mailto: don@dontronics.com_
Copyright © 1996-99 DonTronics
 
 
 
Top of Page