Search Engine

pic16f877a timer0

Add Question

21 Threads found on pic16f877a timer0
Need to turn timer0 on pic16f877a after pressed switch 1 and then turn it off when pressed switch 2, then displaying the period of the time on LCD. Plz someone help me...i am new to micro c.... i attached proteus simulation screenshot....
I was trying to port the code for pic16f877a to PIC18F452. I'm stuck with this line.. option_reg = %00000111 //Prescaler is assigned to the timer0 module, 111 is Prescaler Rate Select bits which is 1:256. Since there is no option_reg in PIC18xxx, can somebody show me some example on how to implement this in PIC18F452? I'm using PIC18 S
To get min .5ms delay. I chosen prescalar as 1:32 (The main frequency chosen as 4Mhz), what will be the TMR0 register value? Is it 0x64 or 0x63 !!
Hey I am trying to start timer on the positive transition from external source like when I push the button, timer start counting. The code I wrote works well with internal instruction clock but not from external source. I am really frustrated for not figure out whats wrong with this. Can someone please help me out. Please?
i need help with using timer in pic16f877a... i'm looking for a code( mikro c pro 5.6.1),,,like... when AN0=1 timer 1 & timer 2 starts then when AN1=1 timer 2 stops again when AN0=0 timer 1 stops then timer 1= ? timer 2= ? i tried hard as a newbie...but failed. any suggestion will be great help.............Regards
Friends/sirs, I am trying to get the frequency of external clock pulse to displayed on LCD using pic16f877a in Hi-Tech PICC 9.82 c compiler. Following is the program:- ********************************XXXXX************************************************ #include<pic16f877a.h> #define ldata PORTB #define rs PORTCbits.RC0 #define en POR
Hello friends, Does anyone know on how can I use timer0 on pic16f877a ? I'm using Hi-Tech C. Thanks
I want to count frequency of sinusoidal signal using this module the microcontroller is pic16f877a with ccs c compiler,if possible you can help also using T1CKI.I want to count up to 1.756MHZ using 20MHZ quartz. Thanks
Please let me know that i want to make RPM meter or Tachometer but I successfully programmed external interrupt but problem in timer interrupt how to generate interrupt on our desire time like i want generate timer every 1 sec.Can anyone interested to tell me?
hello. Im going a make a simple clock using pic16f877a ,keypad and lcd.There i have used timr0 interupt ,furthermore i would to like to set my microcontroller to sleep mode,when there is no user.Also I have read that internal oscillator will be turned off in sleep does that timer0 interrupt work in sleep mode ..... thanks.
I am trying to compile the code for pic16f877a for timer0. Previously the same code was built successfully(with MPLAB v8.10) but now it is showing on error with MPLAB v8.56 as well as on MPLAB v 8.88 Error F:\practice\T0_timer.c; 7.1 undefined identifier "OPTION_REG' and shows build failed. actually .cof file is generated properly when
hi i m new to pic programming. i m doing my project using pic16877a,keypad and lcd , i want to make pic to update time continuously(timer0 interrupt) , so furthermore i m thinking to write data to eeprom.(i have read that there should be minimum 20ms delay between successive use of routines EEPROM_Write and EEPROM_Read) so if i add a delay to
As per the figure in the T0CKI High Pulse Width it takes No (Prescaler 0.5TCY + 20) times that mean to capture the High Pulse Width of external clock, the MCU takes 0.5TCY + 20 times This is related to pic16f877a It would be much appreciated any one can explain this scenario 77078
As I know, when we assign the pre scaler to any timers, (pic16f877a) 1:8 mean after 8 clocks timer register will increment by 1. but as per my picture in timer1 pre scaler 1, 2, 4, 8 instead of 1:1,1:2,1:4,1:8,.I think the result is same. please advice Yes, the nomenclature 8 and 1:8 represent the same
Hi guys I sow in timer0 of pic16f877a one block called " Sync with Internal clocks" has 2 cycle delay that mean, if we set to counter mode after 2 cycle later timer 0 increment with simultaneously to the internal clocks or something else need help
Hello!!! I am using MPLAB IDE along with Hi-tech C Compiler to use the pic16f877a I am trying to write a program to give some delay in timer0 Mode. But My Problem is that. while(INTCONbits.TMR0IF == 0); //This Statement Works Fine but when i reset the TMR0IF bit it doesnt work means INTCONbits.TMRR0IF = 0; //This gives no error but do
my application is to receive serial commands for servo motor and i am using timer0 for servo motor control. I have used mikroc and below is the code: unsigned int a,reset,set,max_value,cw,tmrcounter,tmrcmp; unsigned char output; void interrupt() { TMR0IE_BIT=0; PIE1.RCIE=0; if (INTCON.TMR0IF) { RB0_BIT=~RB0_BIT; tmrcount
sir, I am new in pic programming.I am using pic 16f877a crystel-20mhz and connected led portb (this is out put).i am using timer0 delay for led on off (RB7,RB6 connected led).iam using mplab icd3 for programming.This my timer0 first program please help me
I am trying to control Intensity of AC lamp. For this my steps are as follows 1. Initialise ports, timers. 2. wait for zero cross, if detect a zero cross point set a flag. 3. When zero cross flag set,enable timer0 & start timerto overflow after 8msec. 4. wait untill overflow. 5. When overflow, turn ON triac for some duration (may be 600usec)
hello, i am new on PIC. I try to toggle leds on port D using the timer0 and prescaler to reach 1 second. please correct me if im wrong. i use a 8MHz crystal. so the instruction cycle is 1/(8000000/4) = 500ns, by using a prescaler at 256. my cycle becomes 500ns x 256 = 128us i will do 235 cycles on the test of the INTCON,2 and 235 x 2 on th