hussain_kiet
Full Member level 5
- Joined
- Mar 15, 2007
- Messages
- 260
- Helped
- 45
- Reputation
- 90
- Reaction score
- 28
- Trophy points
- 1,308
- Location
- Karachi, Pakistan
- Activity points
- 2,802
89c51 serial programmer
hi i am using AT89C51 uc with KIEL microvision 2 compiler i want to write to and read from serial port
i ve made the required circuit but still having problems (cant see the data written)
can anyone plzz tell me how could i write on serial port and how can i see the data written to serial port..??
this is my code
hi i am using AT89C51 uc with KIEL microvision 2 compiler i want to write to and read from serial port
i ve made the required circuit but still having problems (cant see the data written)
can anyone plzz tell me how could i write on serial port and how can i see the data written to serial port..??
this is my code
#include <reg51.h>
void sertx(unsigned char);
void main(void)
{
unsigned char z;
unsigned char aa[] = "MHWSQ";
TMOD = 0x20;
TH1 = 0xFD;
SCON = 0x50;
TR1 = 1;
while(1)
{
for(z=0;z<5;z++)
{
SBUF = aa[z];
while(TI == 0);
TI = 0;
}
}
}