Search Engine www.edaboard.com

Delay Header File

Add Question

47 Threads found on edaboard.com: Delay Header File
hi 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: * (...)
#include #include "delay.h" void main (void) { TRISD=0; PORTD=0; while(1) { PORTD=~PORTD; delayS(1); } } Thanks for sent this c code Sorry for asking again Actually i don't know how to add the header file The MPLAB ide asking the header file (...)
first create a file header file. these usually do not need any other header file to be added in it, but if you declare any variables that is dependent of any other , then you have to include that header file in the header file you are (...)
#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 (...)
hi i use delay(1000) of MikroC in the programming pic18f452 but the problem the PIC wlll not delay correct and i see sometimes if the voltage of PIC between 5v and 6v thePIC will give you correct delay if more or less than this the PIC will give wrong delay.... is this correct how i can get correct (...)
Can anyone tell me how to generate exactly 20ms delay using 89S52?? pls help
Most of the compilers have built in delay routines. You can use that By the what compiler you are using?
Dear experts i have got a Lcd program but i didnt get the output in Proteus what are the Pins for Enable ,rs .and data please help me i am pasting the program as follows #define LCD_en P3_1 #define LCD_rs P3_0 #define LCD_delay 1535 /* delay for 1 ms */ #define LCD_clear() LCD_command(0x1) /* Clear display LCD */ #d
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 (...)
This may be simpler void delay_1ms(unsigned int a) //delay_1ms(1),Îó?î3us { unsigned int i,j,k; for(i=a;i>0;i--) { for(j=152;j>0;j--) { k++; } } }
I am facing a problem in this code (asm). Code is working fine and i urge to modify a little. Led at PORTB,6 is blinking @ 2hz. I am new in asm. I search low and high delay time, as we write in C delay_ms or toggle etc, but could not found in whole program. Even i observe in include header file. I wish to stop led (...)
Dear All, I need add continuously use program subroutine as header file to my project folder Example In Assembly delay subroutine is using continuously, therefore I need use delay subroutine in separate file and add to main program like we add processor register file (#include (...)
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 (...)
2 threads with same title joined The Pic-C compiler seems to have problem using the PIC18F4580's internal oscillator with the following code: #include <18f4580.h> #device ADC=8 #fuses INTOSC,NOWDT,NOPROTECT,NOLVP #use delay(clock=8000000) #use rs232(baud=9600,parity = E, bits = 7, xmit=PIN_C1, rcv=PIN_C0) Wha
if your using a .h file the device type needs to be in the header and not in the .c files here is an example comvdd.h file ========= #include <16F877.H> << include header file #fuses HS, NOPROTECT, PUT, NOWDT, BROWNOUT, NOLVP, NOCPD #device *=16 //use 16 bit (...)
Hi guys, i need c code example for AT89s51 or 52 or 53 using .....Keil C or SC51 compiler. Need the basic one, like LED blinking, delay, loop, PWM, Interrupt...... Starting to learn how to program the Atmel 8051. plz help, thanks....
here is the code: this is the single frequency with 5khz #include <16f877a.h> // load the header file for PIC16F877A #include #include #use delay (clock=20000000) // The oscillator frequency = 20MHz, // System clock = Fosc/4 = 5MHz, the (...)
I have written a c code for atmel 89c52..... i just wanted to see if my lcd is working fine..... this is just a test code to display "a" on the lcd.... but its not working.... please help me out........ #include #define lcd_data P1 #define lcd_busy P1_7 #define lcd_rs P3_3 #define lcd_rw P3_2 #define lcd_en P3_4 #define
Is this any use, actually for AT89s8252/3. should not require many changes. For 1x16 display, electrically 2x8. P1.0 = RS P1.1 = E P1.2 = D4 P1.3 = D5 P1.4 = D6 P1.5 = D7 Ground Pin 3 on LCD delay shown is "delay.h" delay.h #define XTAL_FREQ 12 #define delayUs(x) { unsigned char _dcnt; \ _dcnt = (...)
I have used a Pi controller for motor speed control using the Pic18f4431. A Pi controller is usually enough for motor speed control. Code space was not a probllem for me so I used float variables. One advantage with floats is you dont need to worry to much about overflow. Tune the response by tweeking the float kCoeffs values. In the init
Most programs are compatible between PICs with just a few changes (header file names, port names, configuration, etc), so those servo programs you found may work for the 18F4550 also. There are a few ways to go about doing this: - Use TMR1 running on a high prescaler (so it ticks slow) and have it trip at the minimum pulse, the end of the serv
This is the coding I typed and compiled and no error is detected. But after I burned the coding in the chip and try out in the circuit, It didn't work. Is it because of circuit faulty or coding? Is it possible the coding is wrong after compiled and no error is detected? void main(void) { TRISA = 0x00; //Initialize these Ports as Output
Hi all, I am generating a PWM using PIC16F877. I had been trying out example code in CCS compiler for setting up PWM. When doing simulation using Proteus Isis, I cant see any PWM pulse from pin C2. Please help. Is it the frequency problem? Or the header file got problem? I still cant get any pulse even though had tried many value of duty cycle.
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
Hi, 1) I am interfacing winstar's WO12864A1-TFH 128X64 Lcd module with PIC 16f882, but i don't have complete datsheet and application note as it not available for download at wintstar's website. Plz provide some link/pdf for it. 2) since speed of pic is very fast compared to peripheral( lcd ) so on what basis should delay be introduced and fo
Can anyone plz explain this program??? #include sbit pin=P2^0; void external0(void) interrupt 0 { while(1) { pin=1; delay(); delay(); delay(); pin=0; delay(); if (P2^0==1) break; } } void main() { EA=1; EX0=1; IT0=0; while(1) { pin=~pin; delay(); } }
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
Hi, The reason for the numerous errors is due part by the fact the C file was written for the HITECH PIC compiler, however the delay.c file was not included. So you'll have to write your own delay routines.The MPLAB requires a different header file, something like: #include (...)
hello all, im trying to interface an 16x2 lcd with a pic16f819. i've already succeeded to interface an lcd w/ a pic16f877a, using header files given by hi-tech in c language. the header was written for picdem2 and therefor used port D. the 819 doesn't have port D and so i changed the header file to read (...)
The program is part of a micro ...!! What is compiled with the program to compile? #include "macros.h" #include "iom8v.h" /*********************************************************/ /* P R O T O T Y P E */ /*********************************************************/ void delay(int del); void Timer1_Co
hi there i wrote this program so that wuth a simple potentiometer i will see results on leds but it is giving me erros. can someone help me plas? thanks code is below with the errors at the end. #include #include void delay(unsigned char itime); void main (void) { TRISAbits.TRISA=0; //RA0 input for analog TRISC=0xC
Hi everyone Im so confuse why the simple syntax gives me error . while I use __delay_ms(); it gives me error and i dun know the reason, is anyone can help me plz ? here is my program :(once i deleted the __delay_ms() then it builds successful) #include #include __CONFIG ( 0x3F32 ); //configuration for the microcontroller
Hi. guys. got some things here that you might be able to help me out. I am able to get adc going by measuring a voltage divider, able to send it to lcd and get it to the gui i created in c#. Here is the problem. as the adc is updating, so is the gui keeps getting data but its continiuous, example is voltage reading = 3.7. i am getting in gui, 37373
is it possible to generate microsecond delay using for loop in C?If yes then pls send me that delay routine bcz i think to run motor fast i need 2k or 5khz frequency. dont use sms or short hand typing skills in this forum... type the complete words by spending few more seconds. this is the last warning and fu
When i write code in MPLAB software and buid it i got error............. C:\Users\DCS\Desktop\example\ex1.c:76:Error: syntax error nd my code is // Program to get input from keypad and display it on LCD. #define pad PORTD #define r1 PD0 #define r2 PD1 #define r3 PD2 #define r4 PD3 #define c1 PD4 #define c2 PD5 #defin
Hello, I need to run avr code into p89v51rd2, but i am not good in avr's, so need your help to convert it for P89v51rd2. Here is the code : /* code for packet mode communication */ #include // header file defining I/o operation #define F_CPU 8000000 // CPU @ 8MHZ #define USART_BAUDRATE 9600 // SERIAL Communication @ 9600 ba
I've written the code for delay_ms() for pic16f877a....I want to use it in other programs... How do I do it in MPLAB?
i an getting errors for my program #include #include #include delay.h> #include "lcd.h" volatile uint16_t count=0; //Main revolution counter volatile uint16_t rpm=0; //Revolution per minute volatile uint16_t rps=0; //Revolution per second void Wait() { uint8_t i;
1. Make sure that the LCD initializes first before the microcontroller will send control commands in the module. Do this by adding delay in your microcontroller boot-up after reset. 2. Check your contrast control.
Hello, I am using PIC18F452 (with HI-TECH C Compiler V9.80, in MPLAB) to control safeties of an Electrical System. Things were going fine till yesterday when i started getting this strange message for which I do not have a clue. Upon Compiling, it gives the following in the last line (among other warnings for deprecated usage) in the output
i have the problem with I2C program, while interfacing with ds1307 RTC. can anyone upload the I2C header or program for the 8051 controller? :cry: here is my source code for I2C. void I2CInit() { SDA = 1; SCL = 1; } void I2CStart(){ SDA=1; SCL=1; _nop_(); //No operation _n
How to solve this problem? i using MPLAB, Project -> PIC16F877A -> Hi TECH ANSI -> Finish. When i execute the error is occur. Error: Warning C:\Program files (x86)\HI-TECH Software\PICC\9.83\include\pic16f877a.h; 3.82 #warning: header file pic16f877a.h included directly. Use #include instead. Warning C:\Users\WhyWhy\D
delay(10) is too fast. You can't see led blinking. Try delay(10000). remove the line P1 = 0xFF and P1 = 0x00
.... through a series resistor ! And unless you are using a very slow clock speed, don't expect it to flash visibly, the present delay is very short (probably a few mS) which is why I suggested looking for delay routines built into the compiler libraries. Brian.
Why are you using software delay routines other than those provided by the Hi-Tech Compiler? Utilizing a Timer with an accompanying Interrupt Service Routine (ISR) to generate the required delays would certainly free up a significant amount of code storage. Also remove the following: #include As it is not required, t
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 (...)
I am new for PIC micro controllers....... i want to toggle a bit continuously i have wrote a following code can anyone rectify my code i am getting error that *** Error 49 "test.c" Line 19(4,5): Expecting LVALUE such as a variable name or * expression *** Error 49 "test.c" Line 22(5,6): Expecting LVALUE such as a variable name or * expressi