This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

2 UARTs

Hi guys,
Here is the situation I've 89c51 microcontroller board which I want to connect with PC as well as GSM but as everybody knows it(8051) has only one UART so one solution is try using 87xx or 83xx series of controller but that means I'll have to change my programmer. So what I'm thinking is I'll use simple mux/demux for Tx/Rx of 8051. I want to know will it be o.k.? Can simple AND or OR gates can handle data rate of 9600bps?

Thank you very much in advance.

Parents
  • ya after MAX232 i.e. when signals are TTL level I guess my switching occurs properly but serial initialization routine can't be activated properly have a look

     #define R 1
     #define G 0
       .
       .
       .
      Long_Delay(200);
      Select_Serial = R;
      LongDelay();
      Init_Serial();
      Xmit_Static_Char('R');
      P0 = 0x01;
      LongDelay();
      Select_Serial = G;
      LongDelay();
      Init_Serial();
      Xmit_Static_Char('G');
      P0 = 0x02;
      LongDelay();
      Select_Serial = R;
      Init_Serial();
      Xmit_Static_Char('R');
      P0 = 0x01;
      LongDelay();
      Select_Serial = G;
      LongDelay();
      Init_Serial();
      Xmit_Static_Char('G');
      P0 = 0x02;
    

    Here I can see R(1st terminal) G(2nd terminal) and R(1st) but that also sometimes then nothing but P0 shows LED status correctly as 0x01,0x02,0x01,0x02 etc.

Reply
  • ya after MAX232 i.e. when signals are TTL level I guess my switching occurs properly but serial initialization routine can't be activated properly have a look

     #define R 1
     #define G 0
       .
       .
       .
      Long_Delay(200);
      Select_Serial = R;
      LongDelay();
      Init_Serial();
      Xmit_Static_Char('R');
      P0 = 0x01;
      LongDelay();
      Select_Serial = G;
      LongDelay();
      Init_Serial();
      Xmit_Static_Char('G');
      P0 = 0x02;
      LongDelay();
      Select_Serial = R;
      Init_Serial();
      Xmit_Static_Char('R');
      P0 = 0x01;
      LongDelay();
      Select_Serial = G;
      LongDelay();
      Init_Serial();
      Xmit_Static_Char('G');
      P0 = 0x02;
    

    Here I can see R(1st terminal) G(2nd terminal) and R(1st) but that also sometimes then nothing but P0 shows LED status correctly as 0x01,0x02,0x01,0x02 etc.

Children