14 Threads found on edaboard.com: 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.
Microcontrollers :: 03-27-2016 14:35 :: Easyrider83 :: Replies: 3 :: Views: 322
I wrote code for LED blinking
turn ON LED
wait for some time (delay )
turn OFF LED
// LED blinking c code
//turn ON LED
// wait for some time (delay )
// turn OFF LED
include // header file for 8051
include<delay.h> // header (...)
Microcontrollers :: 11-28-2014 11:19 :: jidan12 :: Replies: 2 :: Views: 735
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 (...)
Microcontrollers :: 06-15-2014 07:01 :: nagkiller :: Replies: 7 :: Views: 1367
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
Microcontrollers :: 12-04-2013 13:07 :: ADGAN :: Replies: 15 :: Views: 605
Hey guys I'm new PIC microcontrollers and programming them in C. I started many months ago but had to stop since school started and I got busy with other things. But now I'm back to it determined to learn and I really need your help guys. I have a small issue in my program and I was wondering if you guys can help! I have an issue with the delay fun
Microcontrollers :: 01-01-2013 18:22 :: DanT29 :: Replies: 2 :: Views: 1000
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 (...)
Microcontrollers :: 02-15-2012 03:05 :: alexan_e :: Replies: 13 :: Views: 12444
ANSEL; // Configure AN pins as digital I/O
//Move Anti Clockwise direction
PORTD=(1<delay_us(1000); //want servo to move to 0 degrees.
Microcontrollers :: 12-05-2011 08:41 :: yanami :: Replies: 7 :: Views: 5987
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
Elementary Electronic Questions :: 10-31-2010 15:31 :: Jack// ani :: Replies: 4 :: Views: 1136
Most of the compilers have built in delay routines. You can use that
By the what compiler you are using?
Microcontrollers :: 10-27-2010 20:20 :: nandhu015 :: Replies: 6 :: Views: 1148
Can anyone tell me how to generate exactly 20ms delay using 89S52??
Microcontrollers :: 03-19-2010 11:28 :: sramgrk :: Replies: 2 :: Views: 1464
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
Microcontrollers :: 03-07-2010 02:23 :: amraldo :: Replies: 3 :: Views: 2955
can the delay function handle more then 256 (unsigned char)?
check the function prototype in the header file.
Microcontrollers :: 07-10-2009 14:51 :: hock :: Replies: 10 :: Views: 2114
i am interfacing the lcd with pic16f877a and i got the source code . in tat code i got the header file delay.h .i cant understand about this file plz help me and i attached the file ...
* delay functions for HI-TECH C on the PIC
* Functions available:
Microcontrollers :: 04-10-2009 06:23 :: shivachellam :: Replies: 3 :: Views: 5514
#include //include PIC header file
#include //include I/O header file
#include "delay.c" //include delay header file
__CONFIG(0x3f71); //Configuration word
TRISC=0x00; // ass ign PORTC as a output port (...)
Microcontrollers :: 04-24-2008 04:51 :: malaiyappan :: Replies: 3 :: Views: 910