Making Hex

2013. 1. 19. 15:58
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

에러 처리(in Fuse Setting in Mikro C)

만약 위 그림과 같은 Fuse Error가 보인다면.

http://www.microchip.com/forums/m694831.aspx

 

 

포럼 사이트 추천

 

http://zentronics.wordpress.com/tag/how-to-use-mikroc/

 

 Edit Project (Ctrl + Shift + E)

Choose the appropriate configuration fuse settings. Click OK.

 

 

Set the fuse settings properly.

 

 Add related C.files to Sources

H.files to Header Files.

 

 

 

All Libraries that are not use should be unselected.

사용되지않는 라이브러리들은 선택해제 되야만한다.

Otherwise, it might cause compilation error for some cases.

그렇지 않으면 에러를 유발할 가능성이 있다.

 

 

Click Build (Ctrl + F9).

If your code is error-free, you should get the picture above.

 

 


 

 

http://www.microchip.com/forums/tm.aspx?m=544634&mpage=&print=true

From Voltmeter example...

 

Now I noticed that

the directives #task, #use, and #device were not understood by the preprocessor
Also i removed a line before compiling that, the line was "#include <18F8520.h>"
제거했다. a 라인을 before 컴파일링하기전에 that을, 그 라인은 #include <18F8520.h>였다.

I removed it because i will not use that same PIC,

제거했다.it을 왜냐면 난 같을 PIC를 사용하지않을꺼기 때문에,

and the file was not found by the compiler too...
(I will also add some additional lines to provide the right configurations for clock.... but need to figure this out first)

그리고 그 파일은 검색이안된다. by the 컴파일러에의해서

(난 또한 추가할것이다. some 추가적 라인들을 to 제공하기위해 the 올바른 구성요소들을 for 클락을위한... but 알필요가있다. 이걸 우선)



So i'm wondering, it said that the code was designed for mikroC, and i did not make any changes to it...
What alternatives am i looking at in order to make this compile correctly?


 Edit Project

In order to set the configuration bits go to Project -> Edit Project.

단축키(=ShortCut) -- Ctrl+Shift+E

You can see all the options for selecting clock oscillator, WDT, Power up timer, etc.

Select the right setting for your project.

In this example, I am using the internal RC clock, and so I selected Internal RC No Clock option for the oscillator.

If you are using the MCLR reset pin, you should select Enabled option for Master Clear Enable.

To compile

click on Build -> Build or hit Ctrl + F9.

If there are no errors,

the HEX file will be generated successfully inside the same project folder

and you will see Project Finished Successfully message in the message window, at the bottom.

 


 

Q

I am after some information on how to use the #Include directive in MikroC.

I really want to know how an include file is set up from start to finish as I just cannot seem to get it to work.
The error message I get is: Can't open include file "display.h"

Does this mean that

it cannot find my include file or it CAN find it but doesn't like what I have in it?

I have opened some example programs with includes in then

and have tried to copy what has been done, with no luck.

I am beginning to think that

the biggest problems I have are located between my ears! :D

To anybody

that is kind enough to reply,

please take your time, it is not urgent,

I'm just frustrated that I don't know how to get it to work.

Thanks.

 

A1.

I have copied the .h file from another folder  

난 이미 복사했다. 그 헥사 파일을 from 다른 파일로부터 

 and altered it to suit my project,

그리고 바꿨다.그걸 to 어울리게 내 프로젝트에

now seems to work OK.

지금은 괜찮아보인다.

So, I have got it to work but don't really understand what I have done. :roll:

그래서 난 알았어to동작하는법을 but 정말 이해가안가 뭘 내가 했는지.


A2.

The preprocessor directive #include pulls in header files (extension .h)

into the source code.

Do not rely on preprocessor

to include source files (extension .c)

- see Add/Remove Files from Project for more information.

The syntax of #include directive has two formats:

#include 문법은 갖고있다. 두가지 포멧들을:

 

#include <header_name>

#include "header_name"

 

The processor removes the #include line

and

replaces it with entire text of the header file

at that point

in the source code.

프로세서는 제거한다. the #include 라인을

&

교체한다.it을 with 전체 택스트와 of the 해더파일의

at 그 지점에서

in the 소스코드안에서.

The placement of the #include

can therefore influence the scope and duration

of any indentifiers in the included file.

그 배치는

can 따라서 영향을 미칠수있다. the 범위 &기간에

of 어느 식별자들의 in the 포함된 파일안의.

 

 

The difference between the two formats

lies in the searching algorithm

employed in trying to locate the include file.

그 차이점 between 그 두 포멧들사이의.

은 있다. in the 검색 알고리즘

고용된 in 노력하는데 to 위치잡기에 the include파일을.

 

If #include directive was used with the <header_name> version,

the search is made successively

in each of the following locations,

in this paticular order:

만약 #include 지시어가 사용됬다면 with the <header_name> 버젼과,

그 서치는 만들어진다. 연속적으로

in 각각 of the 따라오는 위치들안에,

in 이 특정 순서로:

 

MikroC installation folder > "include" folder

your custom search paths

The "header_name" version specifies a user-supplied include file;

MikroC will look for the header file in following locations,

in this particular order:

 

the project folder (folder which contains the project file .pcc)

MikroC installation folder > "include" folder

your custom search paths

 

 


Making a Hex file in MikroC Pro

If no errors are encountered, the MikroC for PIC will generate output files.

Upon successful comilation, the Mikro C for PIC wil generate output files in the project folder.

'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
CCS 와 MikroC 의 비교  (0) 2013.01.23
Posted by ElectricShock
:
BLOG main image
잡동사니들(지극히 개인취향인...) (다른글에도 댓글 부탁해요♥) You May Leave English Messages on GuestBook. by ElectricShock

공지사항

카테고리

분류 전체보기 (782)
Programming(=프로그래밍) (3)
MiDi (2)
Animation (4)
Blender (3D Graphic Program.. (10)
Blendtuts.com (Series) (1)
Blender 기초 팁들 (2)
Processing (디지털미디어과) (2)
Music (1)
Books in the world (0)
Communication(CAN, UART, et.. (12)
MCU Examples (PIC 기반) (7)
Transistor (1)
Mikro C Pro (11)
Mikro Pascal (1)
Proton IDE (0)
Robot (0)
Swift 3D (1)
Dummies Series (1)
All about Hacking (0)
제2 외국어 (1)
PIC 해외서적들 (3)
AVR (25)
PIC (MikroC) (MPLAB) (4)
Assembly (2)
ARM (3)
Arduino (26)
PSpice (1)
Proteus ISIS (14)
CodeVision (2)
FPGA (15)
MPLAB (24)
PCB (the Procedure) (15)
3D Printer (5)
PICKIT3 (6)
Matlab (11)
RaspBerry PI (15)
BeagleBone (1)
Android Studio (17)
졸업작품 (172)
Korea History (0)
Issue(사회) (73)
Multimeter 리뷰 (1)
Oscilloscope (1)
A (34)
B (19)
J (6)
C (32)
P (12)
T (37)
H (12)
I (12)
M (44)
R (5)
E (5)
F (2)
D (9)
O (2)
L (7)
S (9)
W (2)
V (6)
G (14)
Visual C++ or Visual Studio (2)
Android App Development (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백