Hi,I try to build a communication between the tablet PC and the MCU with PL2303 chip. My tablet PC use Android 4.0 system. My MCU is a 51 series. I choose the setting '/dev/ttyUSB0' and 'Baud rate 1200' on tablet PC. I tried the 'Loopback' and 'Send 01010101', but the MCU can not receive any data. Does anyone know what is the problem?
The program in the MCU. Crystal oscillator 11.0595 MHz
include <REG52.H>
include <stdio.h>
unsigned char b;
void main (void)
{
SCON = 0x50;
TMOD|= 0x20;
PCON|=0x80; TH1 = 0xD0;
TL1 = 0xD0;
TR1=1;
ES = 1;
EA = 1;
P0=0xff;
b=0xff;
while(1)
{
if (RI)
{ RI=0;
b=SBUF;
P0=b;
}
} }
- receive.c 571
Comment #1
Posted on Feb 20, 2013 by Swift Lion(No comment was entered for this change.)
Status: Invalid
Labels:
Type-Defect
Priority-Medium