Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 04, 2024, 06:34:02 06:34


Login with username, password and session length


Pages: [1] 2 3  All
Print
Author Topic: CCS & MikroC Compiler Comparison  (Read 63452 times)
0 Members and 1 Guest are viewing this topic.
max
Senior Member
****
Offline Offline

Posts: 315

Thank You
-Given: 1601
-Receive: 52


« on: February 18, 2006, 12:22:44 12:22 »

Following are the test results of a common C source
file using 16F870.

CCS C     1053 words, 51% flash

MikroC    1556 words, 76% flash

This shows that the MikroC consume 25% more flash then
the ccs c for the same source file.
See the attached source files, the source files can
also be used as a template for these compilers.

p.s. the same source file with code vision avr C, using
     the MEGA48 will consume 1329 words, 65% flash.
Logged

Fate arrived and made the conscious unconscious It silenced the activity of life.
vsmvdd
Junior Member
**
Offline Offline

Posts: 92

Thank You
-Given: 1
-Receive: 25


« Reply #1 on: February 18, 2006, 02:28:38 14:28 »

its all down to the finaly assembly  using mplab  to do it
 
both  software  use it  both have there own versions  
 
perhaps the differance is  purly  an inline problem  with some  compilers
 
and also  ccs i found  isnt  as reliable under  tests  for endurance  of code
when the hardware is run
ccs  crashes more often  personaly i like free   free means  no money or hastle
 
try your tests  using sdcc  and  lets see if
1} its more robust
2} the word count and  flash count is less or more than  ccs and microc
 
 
i bet a free 0  that sdcc  works far better
Logged
mick
Active Member
***
Offline Offline

Posts: 228

Thank You
-Given: 1994
-Receive: 119


« Reply #2 on: February 18, 2006, 05:22:04 17:22 »

Cute

Can you run same tests for
IAR
Keil
 
                       Thanks
Logged
arvind
Guest
« Reply #3 on: December 30, 2007, 04:19:09 16:19 »

maybe...for pros these come into picture..but for beginners ...mikroc suits best..
Logged
valefrancy
Newbie
*
Offline Offline

Posts: 7

Thank You
-Given: 1
-Receive: 2


« Reply #4 on: January 03, 2008, 08:31:47 08:31 »

the miKroC for pic family 16 Use the first two benches ram the other 2 are not managing
Logged
vovchik02
Junior Member
**
Offline Offline

Posts: 62

Thank You
-Given: 43
-Receive: 13



« Reply #5 on: January 04, 2008, 06:48:25 06:48 »

MicroC don't integrated with Proteus & MPlab.
CCS more compatibility with this deduger.
Logged
mc993
Guest
« Reply #6 on: January 07, 2008, 06:42:44 18:42 »

And now, is CCS is more stable in the last version (4.0.65) ?
Logged
makall
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 6
-Receive: 3


« Reply #7 on: January 07, 2008, 08:10:36 20:10 »

What's the code was used to test? If you share the code, we can test in others compilers and post the results!
Logged
leandrohuff
Newbie
*
Offline Offline

Posts: 7

Thank You
-Given: 0
-Receive: 0


« Reply #8 on: January 07, 2008, 08:21:55 20:21 »

A good test is compare CC5X by http://www.bknd.com with another compiler.

Posted on: January 07, 2008, 09:20:07 21:20 - Automerged

share you code to compare the results.
Logged
valefrancy
Newbie
*
Offline Offline

Posts: 7

Thank You
-Given: 1
-Receive: 2


« Reply #9 on: January 14, 2008, 10:30:24 10:30 »

MicroC provides several tools and interfaces priced quite see easypic5 just come out with integrated touch screen controller

http://www.mikroe.com/en/tools/easypic5/
Logged
respected
Guest
« Reply #10 on: January 17, 2008, 05:39:51 17:39 »

as for me ccs compiler very good
Logged
vsmGuy
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 11
-Receive: 7


« Reply #11 on: January 27, 2008, 10:36:55 10:36 »

CCS is a great compiler and come with great support too. Forums both paid and free!
Logged
Davidvn
Guest
« Reply #12 on: March 01, 2008, 11:08:06 11:08 »

MikroC is easier for beginners !
Logged
free
Active Member
***
Offline Offline

Posts: 115

Thank You
-Given: 71
-Receive: 13


« Reply #13 on: March 01, 2008, 10:41:36 22:41 »

MikroC has great libraries.
Actually the compiler will be work on you to help your job is the point.
Logged

Some dream to escape reality, some to change it forever.
- Soichiro Honda -
magnum
Guest
« Reply #14 on: March 02, 2008, 03:54:14 03:54 »

If you use MCU has small ram don't use MikroC
Logged
joshua1
Inactive

 Muted
Offline Offline

Posts: 5

Thank You
-Given: 4
-Receive: 2


« Reply #15 on: March 03, 2008, 02:46:10 14:46 »

CCS is a great compiler, MikroC is easier for beginners.
 
 
Logged
ata_tr
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 28
-Receive: 2


« Reply #16 on: March 07, 2008, 11:30:23 23:30 »

I think CCS is also easy for novices, experienced users should try HITECH C and Microchip C18.
Logged
wATAw
Guest
« Reply #17 on: March 12, 2008, 09:49:06 09:49 »

I donĀ“t know how is MikroC but i have seen very interesting libraries for it. I use ccs because i think that is easy, but i know C18 and other microchip compilers are better...I will try with C18 someday.... Cheesy Cheesy
Logged
shaban
Guest
« Reply #18 on: March 15, 2008, 09:44:02 09:44 »

I have ordered EasyPIC5 and I will try it with mikroC. I think it is great for beginers and offers great possibilities for experimenting.
Logged
billy77
Guest
« Reply #19 on: March 19, 2008, 03:01:17 03:01 »

MikroC is complicated for many applications.
Logged
gasper
Guest
« Reply #20 on: March 20, 2008, 06:09:57 18:09 »

I use generally ccs, but I believe that mikroC has good tools that ccs not, As the different terminals of communications for exaple.
Logged
ambo
Newbie
*
Offline Offline

Posts: 23

Thank You
-Given: 127
-Receive: 6


« Reply #21 on: March 25, 2008, 06:06:41 18:06 »

Well for beginers like me, I find that mikroC has a lot more built-in routines compared to ccs c.  More easier on beginers like me.
Logged
ninjammx
Inactive

Offline Offline

Posts: 6

Thank You
-Given: 6
-Receive: 0


« Reply #22 on: March 28, 2008, 09:52:14 09:52 »

Mikro C is more built in lib. and easy to use too. It come with all in one package.
CCS is flexible and expandable.

Mikro C is suitable for beginer and upper.
CCS is suitable for middle and higher level.

Logged
TigerX
Newbie
*
Offline Offline

Posts: 12

Thank You
-Given: 4
-Receive: 1


« Reply #23 on: April 03, 2008, 02:06:42 14:06 »

I have tested both compiler with a smallest program. Test result is:

MicroC:
Used ROM : 36
Used RAM : 18


CCS C:
Used ROM : 69
Used RAM : 9

CCS C --> more ROM, smaller RAM
MicroC --> smaller ROM, more RAM

And also have a great difference:

-CCS doesn't show the asm code of whole program. It cuts the some important intgrated operation like multiplication:

The program and the ASM outputs of both ones are:

Micro C:

char a,b;

void main()
{
    //a = 3;
    //b = 5;
    PORTB = a*b;
}

Micro C - ASM Output:

;  ASM code generated by mikroVirtualMachine for PIC - V. 8.1.0.0
;  Date/Time: 04/03/2008 15:37:48
;  Info: http://www.mikroe.com


; ADDRESS   OPCODE   ASM
; ----------------------------------------------
$0000   $281D         GOTO   _main
$0004   $   _Mul_8x8_U:
$0004   $1303         BCF   STATUS, RP1
$0005   $1283         BCF   STATUS, RP0
$0006   $0870         MOVF   STACK_0, W
$0007   $00F1         MOVWF   STACK_1
$0008   $01F0         CLRF   STACK_0
$0009   $3008         MOVLW   8
$000A   $00FC         MOVWF   STACK_12
$000B   $0871         MOVF   STACK_1, W
$000C   $0CF4         RRF   STACK_4, F
$000D   $1803         BTFSC   STATUS, C
$000E   $2813         GOTO   $+5
$000F   $0BFC         DECFSZ   STACK_12, F
$0010   $280C         GOTO   $-4
$0011   $01F1         CLRF   STACK_1, F
$0012   $3400         RETLW   0
$0013   $1003         BCF   STATUS, C
$0014   $2818         GOTO   $+4
$0015   $0CF4         RRF   STACK_4, F
$0016   $1803         BTFSC   STATUS, C
$0017   $07F1         ADDWF   STACK_1, F
$0018   $0CF1         RRF   STACK_1, F
$0019   $0CF0         RRF   STACK_0, F
$001A   $0BFC         DECFSZ   STACK_12, F
$001B   $2815         GOTO   $-6
$001C   $0008         RETURN
$001D   $   _main:
;Muitiplication.c,3 ::       void main()
;Muitiplication.c,7 ::       PORTB = a*b;
$001D   $1303         BCF   STATUS, RP1
$001E   $1283         BCF   STATUS, RP0
$001F   $0820         MOVF   _a, 0
$0020   $00F0         MOVWF   STACK_0
$0021   $0821         MOVF   _b, 0
$0022   $00F4         MOVWF   STACK_4
$0023   $2004         CALL   _mul_8x8_u
$0024   $0870         MOVF   STACK_0, 0
$0025   $0086         MOVWF   PORTB
;Muitiplication.c,8 ::       }
$0026   $2826         GOTO   $


CCS C:

#include <16F88.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES NOLVP                      //Low Voltage Programming on B3(PIC16) or B5(PIC18)

#use delay(clock=8000000)

char a,b;

Void main()
{
   Output_B(a * b);
}


CCS C - ASM Output:

CCS PCM C Compiler, Version 4.068, 34857               03-Apr-08 15:38

               Filename: I:\PIC-Elektronik\PIC\Prog_Source Codes\ccs_c PCW\PIC16F88 Projeleri\PIC16F88 Binary Mult.lst

               ROM used: 69 words (2%)
                         Largest free fragment is 2048
               RAM used: 9 (2%) at main() level
                         10 (3%) worst case
               Stack:    1 locations

*
0000:  MOVLW  00
0001:  MOVWF  0A
0002:  GOTO   02A
0003:  NOP
.................... #include <16F88.h>
.................... //////// Standard Header file for the PIC16F88 device ////////////////
.................... #device PIC16F88
.................... #list
.................... 
.................... 
.................... #FUSES NOWDT                    //No Watch Dog Timer
.................... #FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
.................... #FUSES NOLVP                      //Low Voltage Programming on B3(PIC16) or B5(PIC18)
.................... 
.................... #use delay(clock=8000000)
.................... 
.................... char a,b;
.................... 
.................... Void main()
.................... {
002A:  CLRF   04
002B:  BCF    03.7
002C:  MOVLW  1F
002D:  ANDWF  03,F
002E:  MOVLW  72
002F:  BSF    03.5
0030:  MOVWF  0F
0031:  MOVF   0F,W
0032:  BCF    1F.4
0033:  BCF    1F.5
0034:  MOVF   1B,W
0035:  ANDLW  80
0036:  MOVWF  1B
0037:  MOVLW  07
0038:  MOVWF  1C
....................    Output_B(a * b);
0039:  BCF    03.5
003A:  MOVF   20,W
003B:  MOVWF  22
003C:  MOVF   21,W
003D:  MOVWF  23
003E:  GOTO   004
003F:  BSF    03.5
0040:  CLRF   06
0041:  BCF    03.5
0042:  MOVF   78,W
0043:  MOVWF  06
.................... }
0044:  SLEEP

Configuration Fuses:
   Word  1: 3F70   NOWDT PUT MCLR BROWNOUT NOLVP NOCPD NOWRT NODEBUG CCPB0 NOPROTECT INTRC_IO
   Word  2: 3FFF   FCMEN IESO


In MicroC Fuses and Clock are setted at sperately. Same fuses and clock rate has choosen. So, All everthing same. But the outputs are not same. As you can see, CCS C has not multiplication algorith but MicroC has.

This program is very very shot. Then, that is not a true comparion. But gives us some ideas.

I use CCS. But I have trying MicroC in a few days. MicroC has some internal utilities an statements. And also,

I din't run USART with CCS but MicroC I have run. Some code but CCS didn't give any output at USART PIN's. Because of the fact that, I tried MicroC. Now, I am testing both anywhere.

But I like CCS ...
Logged
jabuka
Newbie
*
Offline Offline

Posts: 14

Thank You
-Given: 0
-Receive: 8


« Reply #24 on: April 04, 2008, 08:54:17 08:54 »

mikroE is good for beginners, but CCS C caters to beginners and professionals as well. Aside from the fact that mikroE's libraries are hidden, there is not much you can do to somehow flex your code. Here is a classic example: The flex lcd driver in the code section of this forum. You cannot write such a flexible lcd driver with mikroE without going thru the pain of coding the whole thing again. C18 is definitely not at par with CCS C because of its limited MCU support. I never tried Hi Tech. the SDCC v2.7 (gnu) is stable than the previous releases but you will have to write your own libraries - painfully. In my experience, CCS C is the best RAD for PIC MCUs. with regards to the crashing of your PC, If we are using exactly the same CCS C IDE version and mine is stable then the problem could be in your OS version or some libraries /behind the scene programs running in your PC.
Logged
Pages: [1] 2 3  All
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC