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.

mikroC pro file p18f4431 header

embarq

Newbie
Joined
Apr 5, 2024
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
62
Hi,

I encountered an issue while trying to build a new project, and I received the following error messages:

  1. Error: Can't open include file "p18f4431.h"
    #include <p18f4431.h>
  2. Error: Can't open include file "delays.h"
    #include <delays.h>
I am unable to locate the header files needed for my project. I have attempted to reinstall the software, but the problem persists. Could you please provide guidance on how to resolve this issue? Any assistance or tips would be greatly appreciated.

PS: I am working on a variable speed drive for an AC motor using the PIC18F4431 microcontroller.
 
According the the MikroC web site that MCU is supported.
My guess would be that the compiler has not been installed correctly to locate the required include files.
(I don't use that compiler - I use the XC8 from Microchip where you just include <xc.h> and the IDE tells the compiler which MCU you are using. Much simpler in my opinion.)
Susan
 
Hi,

this makes me to ask: who told you to write these lines:
"#include <p18f4431.h>" and
"#include <delays.h>"?

Did you write the code on your own, or did you dowload it? Maybe it was written for a different compiler/IDE.

Klaus
 
Hi,

this makes me to ask: who told you to write these lines:
"#include <p18f4431.h>" and
"#include <delays.h>"?

Did you write the code on your own, or did you dowload it? Maybe it was written for a different compiler/IDE.

Klaus
Hi,

I'm new to programming and I'm following tutorials and chatgbt to write the code. I included "#include <delays.h>" because the mikroC Pro for PIC software couldn't recognize the 'delay' instruction in my code. However, I discovered that the issue was related to the Library Manager. Once I checked the necessary libraries, the problem was resolved.

Now, I'm encountering another issue with my circuit. I'm using PWM4, PWM5, and PWM6, but I only find PWM1 and PWM2 in the library.
Capture d’écran 2024-04-18 160322.png


but the PIC18F4431 have PWM0 to PWM7.

Could you help me address this problem?
 
Hi,

I´m not experienced with mikroE.
But if I´m not mistaken:
* You don´t need to include "p18xx.h" because it is done in background by you selecting the target microcontroller
* there is "delay_ms()" function as mikroE standard (instead of delay() )

My opinion about mikroE: It is rather easy to use. Comes with some features. But it´s not ANSI C language. So you learn some kind of dialect.

Klaus
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top