hkboy313
October 25th, 2004, 01:59 AM
hi again..hopefully i am somewhere along the lines of 'close'
i wont tell the program objectives...but i made prg that works actually
but donno whatthe outputs mean... here is the program
#include <8051io.h>
#include <8051bit.h> /* Bit set/clear macros */
#include <8051reg.h>
void main()
{
int i;
serinit(9600);
asm
{
MOV TMOD,#10H
MOV TL1,#047H
MOV TH1,#0FFH
}
for(i=0; i<1; i++)
printf( "\nTimer=%d %d", TH1, TL1 );
}
the output is Timer=253 254
however if i change the timer to 0 which is TMOD,#01
and the printf( TH0, TL0); then i get this output Timer=255 71
can anybody explain what is this number mean? is it frequency? square wave signal? please help... thanks ...
i wont tell the program objectives...but i made prg that works actually
but donno whatthe outputs mean... here is the program
#include <8051io.h>
#include <8051bit.h> /* Bit set/clear macros */
#include <8051reg.h>
void main()
{
int i;
serinit(9600);
asm
{
MOV TMOD,#10H
MOV TL1,#047H
MOV TH1,#0FFH
}
for(i=0; i<1; i++)
printf( "\nTimer=%d %d", TH1, TL1 );
}
the output is Timer=253 254
however if i change the timer to 0 which is TMOD,#01
and the printf( TH0, TL0); then i get this output Timer=255 71
can anybody explain what is this number mean? is it frequency? square wave signal? please help... thanks ...