Search Engine

Delay Header File

Add Question

14 Threads found on Delay Header File
For switching GPIO you need only header file with registers definitions. Bacicaly, it is just a changing value or register. For delay you can use simple cycle counter, timer or system timer systick. For that purpose you can download and use standart perephireal library from ST.
// LED blinking c code //start //turn ON LED // wait for some time (delay ) // turn OFF LED include // header file for 8051 include<delay.h> // header file for delay #define LED_ON 00000001 // LED ON #define LED_off 00000000 // LED OFF (...)
The files delay.h and delay.c is for hitech c for PIC18F!!! In this case, you only comment or remove the #include delay.h, because it not exist in pic for PIC12/16F and your program works, because the #define _XTAL_FREQ 8000000 Change too the _delay_ms(100); to __delay_ms(100); (2 (...)
Hi! I have written a code to display date and energy consumption for a project using MPLAB C18. Everything displays perfectly in Proteus but when I tested in real hardware variables such as date, time doesn't display on the LCD. I tried a MikroC example code and it displays everything perfectly. Can somebody explain me what I may have done wrong? I
Two comments: 1. Only the htc.h header file needs to be included, not the pic.h header file. 2. To utilize the delay macro routines you must specify the system clock frequency by defining _XTAL_FREQ as the clock/oscillator frequency. Synopsis __delay_ms(x) // request a (...)
Mr BigDog i gone through ur profile i found that ur also familiar with AVR. i am using AVR studio-4 to blink an led for 10seconds when a button is pressed connected to PORTB. for that purpose i am using #includedelay.h> header file. the program is being compiled and hex file was genereted . i (...)
Your code seems to be from a PIC microcontroller. PORTD, TRISD etc are internal registers that should be declared in a header that contains the info for the specific mcu, these are not variables and there is no point to declare them as variables. The delay is also a function defined in a library file so you have to include that too. Which (...)
Here is a sample program, which I tested as functional, make changes in your current code accordingly: #include <16F84A.H>// Include header file #fuses XT,NOWDT// Crysral Osc(4Mhz), No watchdog timer #use delay(clock=4000000)// 4Mhz crystal frequency #use rs232(baud=9600, xmit=PIN_A3, rcv=PIN_A2)// to set baud rate, Tx and Rx Pin void
Most of the compilers have built in delay routines. You can use that By the what compiler you are using?
Can anyone tell me how to generate exactly 20ms delay using 89S52?? pls help
I think your code is toggling some I/O pins. The delay between toggling is too low to notice the changes in the I/O pins. Just increase the delay to see the toggling instead of seeing the LEDS always ON -- Amr Ali
can the delay function handle more then 256 (unsigned char)? check the function prototype in the header file. hock
i am interfacing the lcd with pic16f877a and i got the source code . in tat code i got the header file delay.h i can understand about this file pl help me i attached the file ... your question is not clear, i guess you meant u "can't" understand the delay.h file??? (...)
#include //include PIC header file #include //include I/O header file #include "delay.c" //include delay header file __CONFIG(0x3f71); //Configuration word void main() { TRISC=0x00; // ass ign PORTC as a output port (...)