Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Dual uart work together in DS89C450 ?

Status
Not open for further replies.

fireball003

Full Member level 3
Joined
Oct 28, 2005
Messages
181
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,298
Activity points
3,157
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.
 

Hi,
Your compiler should have provision to select the com port or you need to write your own I/O functions.
Regards,
Laktronics
 

Hi,
Thanks a lot for your reply.
what sort of I/O function I have to write? all the printf and scanf for another UART?

Can you please add some simple example (if there any)?
 

Hi,
Visit the site WWW.WICKENHAEUSER.COM where you get a free 8k limitted version of their uc/51 compiler and a good number of sources for different applications, including two serial port support.
Regards,
Laktronics
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top