Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
hi everyone;
I'm using PIC16F877A to count pulses on T1ck in a specific period to get the rate of these pulses in minute (PPM) but it don't act as i expect and i don't know where is the error ?:(
so can anyone help me ?
here is my code (i MicroC):
// LCD module connections
sbit LCD_RS at...
just try this:
void main() {
trisb=0;
portb=0;
while(1){
portb=0b11111111;
delay_ms(50);
portb=0;
delay_ms(50);
}
}
=====================================
also your code will work good but if you use any simulation software you should reduce delay time as simulators has a different calculations...
yes like axxe say
as without this delay the transition from 0 to 1 on portb will happen but you will not be able to see it as it is very fast.
as in your code the MC will do 1 sec OFF and xx usec (xx depend on your OSC ) ON then it convert to OFF and so on.
hi
u can see this, i think it may help
**broken link removed**
===================================================
this is an Example:
**broken link removed**
===========================================================
you can get them from here
thanks pmar_kpj for help
the program now run very well.
but if i want to increase the period at which the pulse-width change since i press the increase button, i.e. when i press pushbutton the pulse width become full after short time so if i want to increase this time i have to increase delay...
hi every one
=============
I wrote this program sothat i can change pulse-width but i think there is an error as it doesn't work as it should.
i'm using Microc pro Compiler .
so can anyone help me.
===================================
here is the code:
sbit speed_I at RB0_bit;
sbit speed_D at...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.