Search Engine www.edaboard.com

Counter 16f877a

Add Question

43 Threads found on edaboard.com: Counter 16f877a
hello I have strange problem regarding pic16f877a .I want To use Pic timer1 as event counter .Clock Is attached to T1CLK .and I want to count 8 clocks and then toggle port B bit .Programm is well running in proteus .But at treal hardware programm is not running . I am using css c compiler . source code is as follow: #i
i need to be able to send several different commands (Start, stop, hit, etc) by ir and have another pic read that and run a sub routine dependant on what command it receives (Start, stop, hit, etc). i am using a pic16f877 and mikrobasic that came with my easypic4 development board. Any help would be greatly appreciated, code and circuits especially
hi.. i am using ccs compiler to program pic 16f877a. Now my fequirement is to count the digital pulse from proximity sensor which is connected at the 17th pin. can i use capture command to measure pulse width and there by i can i calculate frequency and speed? or should i have to use counter??? can anyone send basic codings regarding thiz?
i need example code counter 2 digit switch up-down 0-99 by 16f877a file.pbp
The PIC series allow direct access to the program counter so you can use it to store the result of a calculation. The RETLW instruction means "RETurn with Literal in W", in other words it is a subroutine return instruction that carries the value you placed in the instruction beck in the W register. What you need to do is calculate a subroutine a
Hi all , i am New here and i have problem with programing counter with proton program , i am using basic language . My project is to use an analoge to digital converter in Pic 16f877a to calculat the temp by using Lm35 and to make alarm when the Temp reatches a certain value, the problem is i canot declare the Puch button to the program , and also
I need help for counting pulses of a 3200 pulses per revolution encoder motor. I want to know are there any registers or pins which can operate independently from main program. Then it can count pulses, and return count when it needed for main program without interrupting main program. I use pic 16f877a and pic 18f452. I used RB4-7 interrupt befo
Thanks for your helping, I start to write the PWM code and generate 10 pulse from RC2 thats is working, but 1.I want to generate another High signal it will be start when pulse start and stop at same time this one for detected signal?.. 2. when I write the code to start counter? can you help me??? :sad: :cry: LIST P=16f877a
As per the picture, the program counter support 13 bit. But Instruction register support 14bit. Let me know the reason. What is the bit escape by program counter Please advic 60024
Hai friends, In my project i interface an IR module with PIC 16f877a,This system is used for counting motro rotation. PIC in counter mode using timer1.Now the problem is that when i connect manually to an IR then PIC count properly.But when it connected to the motor it reads wrong count.OR it does not work properly. Here i post my code.
Hi guys... I really need some help... I created the code below which just displays time and some amount which depends on the time lapsed.. My problem is that when I ran it in proteus, it went smoothly and produced the output I expected... But when I implemented it on the actual hardware, it all went gibberish.. The LCD keeps on updating every se
That code simply doesn't make sense. Starting from the top: "decfsz temp" should have a second parameter, file or W as the destination. I'm guessing you want 'f' as you are using it as a counter. "movlw 0x04;0x38;0x28;0x21" puts 0x04 into W, what are the other numbers? They will be seen as comments by the assembler. You then load 0x6A into TMR0
Well, may be google wasn't kind to you :grin: but I found a frequency counter with 16f877a (eqivalent to 16f876a) from google. It is downloaded from here. See the attachment....
Hi,every body I want to read the frequency from the function generator and use the PIC16f877a here below are my codes which are not working can you please help me to handle the issue. Help me plz. - - - Updated - - - The codes are here below: #include <16f877a.h> #device adc=10 #fuses XT, NOWDT, NOPROTECT, PUT, BROW
Can some body plz help me to modify the following codes for counting the frequency up to 2Mhz of a square wave and sine wave: #include <16f877a.h> #use delay(clock=20M) #include #include #fuses hs,nowdt,nocpd,nolvp,noprotect #byte portc=0x07 #bit led=portc.4 void LCD_D(); unsigned int16 value; void main()
Hi all, I am trying to make a frequency counter and wrote some code. I wanted to use a frequency averaging part to make things more accurate. But when I run the code with the averaging part it acts funny (at frequencies close to 10kHz). Also please give me some pointers to the variable declaration (eg int, float etc) as I am pretty sure me u
and during your debugging, did u happen to check if your program counter is getting into all the functions and register values are getting updates?? I dont think proteus is a good idea for debugging internal working of controller.
1) what is meant by vector address in program memory?? 2)explain about reset vector,interrupt vector ,paged memory,program counter,stack?? 3) explain the sequential operation of an instruction to be executed??
Read section 2.3 & 2.4 page 30 of the datasheet. K is not big enough to address the whole memory space so the upper bits come from PCLATH. The program counter is 13 bits but K is only 11 bits. Keith
After just glancing at your code, it seems the majority of the issues you describe are located in the following section of code: if(TMR2IF_bit==1) //At PWM period end { if(a>=di) //when counter reaches end of string { a=0; //reset counter
#include <16f877a.H> //Configure the PIC to use: HS clock, no Watchdog Timer, //no code protection, enable Power Up Timer #fuses HS,NOWDT,NOPROTECT,PUT //Tell the compiler the clock is 20 MHz thereby can be used at subroutine DELAY_MS() //and for serial I/O (RS232) #use Delay(clock=20000000) . . . Void main() { #asm #ORG 0x1F00,0x1
I prefer PIC for my applications, because of high current capacity of its pins. 20 mA is quite enough to drive most of the loads for pull up or pull down applications. But one should consiter the total power on Vcc or Vdd pin according to its datasheet. I really enjoyed with a PIC 16f877a at 20 MHz while developing my application when I saw
Hi, I have been trying to convert some C code for an ATMEL2323 chip to code for a Microchip 16f877a. The line of code for the 2323 chip that I cannot understand is this: count += (count_hi << 8) + inp(TCNT0); // get counter value where the count_hi is an overflow accumulator. what does the inp() command do? and how could I impleme
Hello everybody, Since I want to learn Proteus, I'm developing simple circuits with pic 16f877a writing the firmware with Hi-tech Picc 9.50pl2. Currently I'm trying to use TMR1 to create a 16-bit counter. The circuit I designed is very simple: it consists in a push-button connected to RC0 with a pull-up resistor. My purpose is simply to see
Here is the code list p=16f877a ; list directive to define processor #include 16f877a.inc> ; processor specific variable definitions __CONFIG _CP_OFF & _WDT_OFF & _BODEN_OFF & _PWRTE_ON & _RC_OSC & _WRT_OFF & _LVP_ON & _CPD_OFF COUNT1 equ 08h ;First counter for our delay loops ;*************************
Hi, There you go: Schematics and C code for a PIC (16f877a) frequency counter operating up to about 50 MHz
how should i display digital time in lcd using 16f877a Hello guys, The clock can be very simple you can use the mikroBasic or assembly as well. Below is some sample in MB The processor is up to you which you want to use (minor changes) program RTC_Timer0_FreeRun_18F452 ' 24 Hour Real Time Clock - Zero-Sum
One way to do this is to have two global variables to use as counters, one for period, one for duty cycle. Set up one of the timers to interrupt every 1mS, you can use mp sim to adjust the timing by setting a breakpoint in the interrupt routine and using the Stop clock. The period for 50Hz is 20mS, so when the period counter reaches 20, clear
#include <16f877a.h> #fuses XT,NOWDT,PUT,NOBROWNOUT,NOLVP #use delay(clock = 4000000) #byte PORTA=0X05 #byte PORTC=0x07 #byte PORTB=0X06 #define A0 PIN_A0 #define A1 PIN_A1 #define A2 PIN_A2 #define A3 PIN_A3 #define A4 PIN_A4 int sec1,sec2,min1,min2,hour1,hour2; int num1=5,num2=5,num3=5; int counter=125; int flag=0; const
hello everyone. I need some help regarding on our source which is compiled for our project. Our project supposed to be is a digital clock with stopwatch(with reset, and stop), and a countdown timer but we only built a digital clock. We used 4 buttons for setting time (hold, hours, minutes, and seconds). Schematic: i586.pho
please help me... #include <16f877a.h> #fuses XT,NOWDT,PUT,NOBROWNOUT,NOLVP #use delay(clock = 4000000) #byte PORTA=0X05 #byte PORTC=0x07 #byte PORTB=0X06 #define A0 PIN_A0 #define A1 PIN_A1 #define A2 PIN_A2 #define A3 PIN_A3 #define A4 PIN_A4 #define A5 PIN_A5 #define E1 PIN_E1 int sec1,sec2,min1,min2,hour1,hour2; int secs1
hi i'm building a pulse counter... i'm using the external interrupt on RB0 in 16f877a for counting the pulse... i have also used the TMR0 interrupt in the same interrupt function.... but my variable which is count9 for counting the pulses does not get incremented at all....i'm kind of a newbie when it comes to PICs so can anyone of u friends
Hai, The program will be a big one, Here i post a program for RTC and LCD using pic 16f877a So make necessary will be working one. void write(); void read(); void read1(); void disp( int temp,int i,int j); void main() { trisc.f4=0; trisc.f3=0; Lcd8_Config(&portb,&portd,0,2,1,7,6,5,4,3,2,1,0); Delay_ms(10
well ... i will send it to you ---------- Post added at 16:06 ---------- Previous post was at 15:38 ---------- /*************************************/ /* Project: Frequency counter */ /*************************************/ #include <16f877a.h> #use delay(clock=20M) #include #include
Dear all Now I bit understood operation of timer0 counter mode of 16f877a see picture 66522 as I know The internal sampling that occurs on the T0CKI signal takes two clock cycles of the PIC microcontrollers oscillator. Divide 2 by the oscillator frequency in Hz to obtain an answer in seconds (same as multiplying
Hi, if u mean using one micro instead of 4 , I've got to say it is a better choice to use timers in the microcontrollers. For example imagine that : atmega16 has three timers . so u can use three counters at the same time.
hi, i want to start the timer when a pin high and stop the timer when another pin high and display the count in lcd for that i written a c program in hi-tech c compiler . first i didnt know how to convert hex value to decimal . my program my simulation as follow 70644 in program display function i wrote to display the hex va
I use p16f877a but I forgot to write that in include "p16f877.inc" I'll use 100khz "ENSURE THEY ARE SET TO DIGITAL, NOT THE DEFAULT ANALOGUE" I don't understand what do you mean in this statement . I'm trying to make a counter count the secounds pass
If you aren't going to be doing anything during that long period, you can use software delay, using the delay_ms() function and for loop. If you are going to be doing something during that period, you need to use timer as Oyvind has said. I don't know which PIC you'll be using. But you can use Timer 1 as most PICs have a Timer 1 and Timer 1 is a
Hello friends, i have this code from the Mikroc examples EasyPIC5 #include "Display_utils.h" char kraj; unsigned short zz, j, v; unsigned int i; unsigned short por; void interrupt() { PORTA = 0; PORTD = por; PORTA = zz; // turn on appropriate 7seg. display zz <<= 1; if (zz > 8u) zz = 1;
What sensor are you using? #include<16f877a.h> #fuses HS, NOPUT, NOLVP #use delay(clock=20Hz) void main() { while(true) { //-------------------------------for motor operation if(!input(PIN_D0))//---------microswitch { //-------------------------------switch for reversing output_high(PIN_B2);//----clockwise
PIC 16f877a Hi, I have a problem where i don't how to write a program for my rotation counter. My system is a rotation counter, It count decrementally. does anyone here can help me on the programming part? Thank you.