fireball003
Full Member level 3
Hi,
I am interfacing PC + DS89C450 + GPRS where I will send AT command from PC terminal (serial port 0) and DS89C450 will send the command to gprs modem (via serial port 1). Then the reply will go from gprs modem -> DS89C450-> PC terminal
Now serial port0 works fine with the following configuration.
/**********Serial port initialization**************************/
SCON0 = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 252; /* TH1: reload value for 1200 baud @ 22.1184MHz */
TR1 = 1; /* TR1: timer 1 run */
TI_0 = 1; /* TI: set TI to send first char of UART */
/************End of serial port initialization****************/
But For same settings (SCON1 instead of SCON0) serial port 1 doesn't work. I send scanf and printf command to serial port 0 which works fine .But for Serial port 1 it doesn't work.
What am I missing? Please suggest me.
Thanks in advance.
I am interfacing PC + DS89C450 + GPRS where I will send AT command from PC terminal (serial port 0) and DS89C450 will send the command to gprs modem (via serial port 1). Then the reply will go from gprs modem -> DS89C450-> PC terminal
Now serial port0 works fine with the following configuration.
/**********Serial port initialization**************************/
SCON0 = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
TH1 = 252; /* TH1: reload value for 1200 baud @ 22.1184MHz */
TR1 = 1; /* TR1: timer 1 run */
TI_0 = 1; /* TI: set TI to send first char of UART */
/************End of serial port initialization****************/
But For same settings (SCON1 instead of SCON0) serial port 1 doesn't work. I send scanf and printf command to serial port 0 which works fine .But for Serial port 1 it doesn't work.
What am I missing? Please suggest me.
Thanks in advance.