Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

clock error in mikroC

Status
Not open for further replies.

bbgil

Full Member level 2
Joined
Mar 11, 2006
Messages
135
Helped
13
Reputation
26
Reaction score
9
Trophy points
1,298
Activity points
2,321
device clock cannot be zero

Hi. I an newbie in c and mikroC and i always got this error when compiling. "device clock cannot be zero". this is the code:
#include <P16F877.h>
#include <delays.h>

void main ()

{
INTCON = 0;
PORTB = 0;
PORTA = 0;
TRISA = 0xFF;
TRISB = 0;

while (1)
{
while (250);
PORTB=PORTB^1;
};
}

What does the error mean? Any help is appreciated thank you
 

mikroc clock

Hi,
With most C compilers for micros, you have to tell the compiler what clock speed you are running your microcontroller at.
I'm not sure about Micro C, but somewhere in your help file, or documentation you should be able to find how to do this.
According to their docs you have to set this value in an edit box. It looks as though you do this when you create a project.
Here is a link to their documentation, just in case you didn't get it with your compiler:
**broken link removed**
I found the info in Creating First Project in mikroC for PIC
Hope this gets you going.
Regards,
Robert[/quote]
 

error mikroc

BeeBop,

Tnx for the explanation and link, this clears up a lot of things for me. More power 2 u.
 

mikroc pic include

Hi, I'm little late but hope not too late. You should choose proper clock freq. You can find this option in Project/Edit project menu.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top