Hareesh Kumar
Junior Member level 2
#include <reg52.h>
void delay_max()
{
unsigned int i=0,j=0;
for(j=0; j<100; j++)
for(i=0; i<6000; ++i);
}
void main(void){
TMOD |= 0x20; //use Timer 1, mode 2
TH1=0xFD; //9600 baud rate
SCON=0x50;
TR1=1; //start timer
//RI=0;
//TI=0;
while (1) {
SBUF=0x0A; //place value in buffer
while (TI==0); //wait until transmitted
TI=0;
delay_max();
SBUF=0x0F; //place value in buffer
while (TI==0); //wait until transmitted
TI=0;
delay_max();
}
}
i used this code for enabling serial communication in hyperterminal but connection is geting,not geting corect result in the hyperterminal...settings are alright...
void delay_max()
{
unsigned int i=0,j=0;
for(j=0; j<100; j++)
for(i=0; i<6000; ++i);
}
void main(void){
TMOD |= 0x20; //use Timer 1, mode 2
TH1=0xFD; //9600 baud rate
SCON=0x50;
TR1=1; //start timer
//RI=0;
//TI=0;
while (1) {
SBUF=0x0A; //place value in buffer
while (TI==0); //wait until transmitted
TI=0;
delay_max();
SBUF=0x0F; //place value in buffer
while (TI==0); //wait until transmitted
TI=0;
delay_max();
}
}
i used this code for enabling serial communication in hyperterminal but connection is geting,not geting corect result in the hyperterminal...settings are alright...