Discussion in "Project Help" started by    Shezo    Apr 9, 2010.
Fri Apr 09 2010, 12:04 am
#1
Hello Rickey,
Iam Done with my GPS programming by getting my Required string from GPS " $GPRMC...." Now i have to send it through GSM am also done with GSM at commands but the problem iam Facing is that at a same time in 89c52 GPS or GSM will work so i take a sbit P1^5 as a Mux activation bit.if its 1 then GPS data will be recieved if its 0 then GSM will transmitt and Recieve...So tell me how will i interface two RS232 with a one sbit which i have...

Thanks
Fri Apr 09 2010, 12:29 am
#2
well you might need little more pins for mux purpose. take a look at CD4052 Analog MUX/DEMUX you use it for uart muxing.

Fri Apr 09 2010, 12:46 am
#3
Try some of the posts around this post
http://www.8051projects.net/forum-t28099-120.html#post_32582
Fri Apr 09 2010, 11:55 am
#4
hey Rickey i have been through this program which is some how similar to mine..here u can c he used a single pin name mux....


void main()
{
int ddd=0
lcd_delay();
int_lcd();
clear_lcd();

while(1)
{
qq=1;
mux=1;
r4=0;
Set_Baud_Rate_For_GPS();
Receive_gps_data();
mux=0;
Set_Baud_Rate_For_Mob();
Transmit_First(); //at
delay();
Transmit_Second(); //at+cmgf=1
delay();
Send_sms_gps_data();
for(ddd=0;<26;ddd++)
{
recv[ddd]=0;
}
r4=0
if(c1==0)
{
ACC=0x4f;
lcd_write_txt();
lcd_delay();
ACC=0x4b;
lcd_write_txt();
lcd_delay();
hex_lcd();
r4=1;
}
delay();
//delay();
//delay();

Transmit_First(); //at
delay();
Transmit_Second(); //at+cmgf=1
delay();
Read_command();
qq=0
if(read[0]=='!')
car_engine=0;

if(read[1]=='!')
car_engine=0;


if(read[2]=='!')
car_engine=0;


if(read[0]=='%')
car_engine=1;


if(read[1]=='%')
car_engine=1;


if(read[2]=='%')
car_engine=1;
delay();
}
}
Sun Apr 11 2010, 02:08 pm
#5
hi shezo i am really not sure what component he is using for mux-ing uarts. so if you can come up with the circuit it would be easy to help.
Mon Apr 12 2010, 12:39 pm
#6
well he is using max232...my friends said that to use buffer..i dont have enuf knowledge about buffer so prefer me some...i thought about nand or xor logic implementation

Mon Apr 12 2010, 12:45 pm
#7
Hey Rickey wot u think about this??


[ Edited Mon Apr 12 2010, 12:46 pm ]
Mon Apr 12 2010, 12:52 pm
#8
Tue Apr 13 2010, 03:08 pm
#9
yes that will work for sure

and using only one pin.. clever i never thought that way
Wed Apr 14 2010, 02:01 pm
#10
Dear Ajay and Shezo

I am doing almost the same project. I am using 89v51rd2, garming gps 15h and sim300

Please do advise me which option should i choose for connecting 2 serial devices (gps and gsm) to 89v51

1. Emulating a software UART like mentioned on the tutorials on the site
2. Using a 2:1 Mux - Quadraple
3. Do something like Shezo has done by using nand gates.

Regards

Abhishek

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am