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.

[SOLVED] Delay not working MikroC

Status
Not open for further replies.

renostro

Newbie
Newbie level 2
Joined
May 18, 2018
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
18
Hello, I am Bruno, I am from brazil and I am new here.I have started to learn C programming for microcontrollers but I have a bug and I don't know what to do.The delay function is not working on Proteus.I am using the not registred version of MikroC pro for pic ( demo version ) 7.2.

imagem1.png

imagem2.png

imagem3.png

imagem4.png
 

You forgot to add the delay after the instruction LED=0; as it is, the LED will stay high for 1 second, while it will stay low for only a few CPU machine cycles.
 
Change:
Code:
LED = 1;
Delay_ms(1000);
LED = 0;
to:
Code:
    LED = 1;
    Delay_ms(1000);
    LED = 0;
    Delay_ms(1000);
 
That's true!I spend hours on this lol, Thank you so much!
 

Cristal oscillator will not be simulated. Remove it from schematic. And tell the others.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top