Discussion in "PIC Microcontroller Discussion" started by    Luqman    Jul 30, 2007.
Thu Aug 23 2007, 03:29 pm
#21
how does the following cunction give 1 second delay?

void sec1()//can be fine tuned by changing the for loop values
{

bit_8 i,j;
TMOD=0x11;
for(i=0;i<230;i++)
_nop_();
for(i=0;i<7;i++)
{
TH1=0;
TH0=1;
TL1=0;
TL0=0;
TR1=1;
for(j=0;j<119;j++)
_nop_();
while(TF1!=1)
{
for(j=0;j<255;j++);
_nop_();
}
TF1=0;
TR0=1;
TR1=0;
while(TF0!=1)
{
for(j=0;j<120;j++)
_nop_();
}
TF0=0;
TR0=0;
}
}
Thu Aug 23 2007, 03:40 pm
#22
well i was noob at that time.. when i wrote that function.. try writing a better 1 sec delay yourself take care of the call and jumps etc.

try making 1 sec routine with the help of simple for loops.. i think thats much better..
Thu Sep 06 2007, 11:48 am
#23
well ajay, i would like to request u plz start PIC projects and coding PIC controllers so that we can get skills to program it easily.
Thu Sep 06 2007, 01:30 pm
#24
well Luqman, i really want to start by i don't have PIC controller with me.. and i think there is not much difference in controllers..
PIC AVR 8051 everything is same.. there is no difference.. whatever you make in 8051/AVR you can do the same thing in PIC to.. the only difference is features and some registers thats all..
When i get a PIC IC with me... i will start another step by step tutorial for it... Thank you for your input...
Tue Sep 25 2007, 08:23 am
#25
hi, ajay
plz go thru the schematic and code that i've sent earlier.
Tue Sep 25 2007, 10:50 am
#26
I really don't remember which code/schematic.. must be lost somewhere in 1000 mails
Please post the code and schematic here in forum..
 buddy like this.
Thu Apr 24 2008, 10:49 pm
#27

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm
Charlestehed
Wed Apr 24 2024, 05:20 pm