We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i have to get data serially on hyperterminal window as well as p2. i have checked circuit 1000 of times but not getting ny output there. i am using following code plz verify it.
#include<reg51.h> void delay(unsigned int); //prototype declration of delay function void main(void) {
unsigned char z,X; unsigned char mess[]="ADITYA"; TMOD=0x20; TH1=0xFD; //9600 bits /sec SCON=0x50; TR1=1; for(z=0;z<6;z++) { SBUF=mess[z]; X=mess[z]; while(!TI); //check the transmit interrupt P2=X; delay(10000); TI=0; } }
void delay(unsigned int time) { unsigned int i,j; for(i=0;i<time;i++) for(j=0;j<100;j++); }
please help
aditya
By the way - have you connected your processor correctly to the PC? With a RS232 level converter such as MAX232? With RX, TX and GND to the correct pins?