http://www.sonsivri.to/forum/index.php?topic=920.0
CCS C와 MikroC 의 비교 !!!
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
큰 차이점
-CCS doesn't show the asm code of whole program.
It cuts the some important intgrated operation like multiplication:
프로그램 & 어셈블리 출력들 ▽
Micro C:
char a,b;
void main()
{
//a=3;
//b=5;
PORTB = a*b;
}
MikroC - ASM Output:
; ASM code generated by MikroVirtualMachine for PIC - V.8.1.0.0
; Data / 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 NPWDT //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
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 MikroC
Fuses & Clock are setted at separately.
MikroC에서
퓨즈와 클락은 셋된다. at 개별적으로.
Same fuses & clock rate has choosen.
같은 퓨즈 & 클락률은 이미 선택됬다.
So, All everything same.
그래서, 모든것이 같다.
But,
the outputs are not same.
하지만
그 출력은 같지않다.
As you can see,
CCS C has not multiplication algorithm
but MikroC has.
네가 볼수있는바와같이,
CCS C는 갖고있지않다. 다중 알고리즘을
하지만 MikroC는 갖고있다.
This program is very very short.
이 프로그램은 매우 매우 짧다.
Then,
that is not a true comparison.
그런다음,
사실비교가 아니다.
But gives us some ideas.
I use CCS.
But I have trying MikroC in a few days.
난 사용한다. CCS를.
하지만 난 이미 시도하고있다. MikroC를 in a 몇일동안.
MikroC has some internal utilities an statements.
MikroC는 갖고있다. 몇몇 내장 유틸리티들을
And also, I didn't run USART with CCS
but MikroC I have run.
그리고 또한, 난 돌리지않았다. USART를 with CCS로
하지만 MikroC는 돌린다.
Some code but CCS
didn't give any output at USART PIN's.
몇몇 코드 but CCS가 아닌
는 주지않았다. any출력을 at USART 핀에.
Because of the fact that,
I tried MikroC.
그러한 사실때문에,
난 시도했다. MikroC를.
Now, I am testing both anywhere.
But I like CCS...
이제, 난 테스트하는중이다. 둘다 어디서든.
하지만 난 좋아한다. CCS를.
'Mikro C Pro' 카테고리의 다른 글
Bluetooth Code using HC-06 module (0) | 2015.08.09 |
---|---|
MikroBootloader (0) | 2015.06.19 |
MikroC pro for AVR 설치법 (0) | 2015.06.15 |
Making Hex (0) | 2013.01.19 |