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
  • The erased state of EPROM is FF - which is the opcode for MOV R7,A

    So your could could run off the end of main(), then execute all the erased EPROM locations as MOV R7,A until the address spaces wraps around and it returns to the reset vector at C:0x0000

    The delay due to executing these MOV R7,A instructions is likely to be imperceptible, giving the impression that main() is just executing continuously...

Reply
  • The erased state of EPROM is FF - which is the opcode for MOV R7,A

    So your could could run off the end of main(), then execute all the erased EPROM locations as MOV R7,A until the address spaces wraps around and it returns to the reset vector at C:0x0000

    The delay due to executing these MOV R7,A instructions is likely to be imperceptible, giving the impression that main() is just executing continuously...

Children
  • It's a good idea keeping infinite loop at the end of 21 iterations and solving your problem....

    If you want to send 21 characters the next time you should reset the controller.......

    n secondly you couldn't get a clear answer why it is going to infinite loop.....

    How about writing your for loop in the infinite loop and using some flag option to get out of that infinite loop.....

    use the data Tx pin of controller and set the flag whenever a trnsition occurs on this pin.....

  • n moreover your program is not flexible
    first it sends character to first PC and then to second .... for suppose if the controller wants to send data to same PC it can't....u have to RESET the controller....