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.

Why is __delay_ms (2500) not exactly 2.5s on 16F877A ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Guys,

Why is __delay_ms (2500) not exactly 2.5s on 16F877A ?
and after few loops , why is it freezing ?
Something wrong with my clock and configuration ?

thanks
 

Hi Friend,

Inbuilt delay might vary based on your clock and oscillator settings. Have you tried with any other time delay value?
 

Hi there,

This is a sample inbuilt configuration setting example. I am recommending you to please refer PIC16F877A main datasheet(Clock and configuration setting section).

#define _XTAL_FREQ 4000000

__CONFIG(INTCLK & WDTDIS & PWRTDIS & MCLRDIS & UNPROTECT & DUNPROTECT & BORDIS & IESODIS & FCMDIS & LVPDIS);
__CONFIG(BORV40);


Please go through it.

https://www.edaboard.com/threads/210298/
 

Hi friend
I invite you to use timer for make exact delay
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top