+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Member level 5
    Points: 628, Level: 5

    Join Date
    Aug 2011
    Location
    Tirunelveli,Tamill Nadu, India
    Posts
    82
    Helped
    1 / 1
    Points
    628
    Level
    5

    Is it possible to have two Baud rates in 89S52?

    hi, I want to use 2400 for reception and 9600 for transmission.

    •   AltAdvertisment

        
       

  2. #2
    Full Member level 3
    Points: 1,896, Level: 10
    ismbn's Avatar
    Join Date
    Feb 2012
    Location
    Mumbai. india
    Posts
    160
    Helped
    4 / 4
    Points
    1,896
    Level
    10

    Re: Is it possible to have two Baud rates in 89S52?

    HI Jeffrey Peter

    I don't think you can do this... say you built 2 different routine to set the Baud rate ... the problem may be accores like ... when you are sending something at that time if there is some data cames to read then...

    ok try to do this but don't use the interrupt method.... share the experience.... or try to use the different uC with 2 TXD RXD....

    By the way why you need 2 different Baud rate what is your application....



    Ismail



  3. #3
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2357 / 2357
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Is it possible to have two Baud rates in 89S52?

    Quote Originally Posted by Jeffrey Peter View Post
    hi, I want to use 2400 for reception and 9600 for transmission.

    One possible approach is to utilize the hardware UART for the higher baud rate, 9600, and then implement a software UART for the lower baud rate, 2400.

    A software UART, aka softUART or bit banged UART, only requires the use of standard I/O pins and emulates the workings of a hardware UART.


    BigDog
    The Edge... there is no honest way to explain it, because the only people who really know where it is are the ones who have gone over.
    -- Hunter S. Thompson



  4. #4
    Member level 5
    Points: 628, Level: 5

    Join Date
    Aug 2011
    Location
    Tirunelveli,Tamill Nadu, India
    Posts
    82
    Helped
    1 / 1
    Points
    628
    Level
    5

    Re: Is it possible to have two Baud rates in 89S52?

    By the way why you need 2 different Baud rate what is your application....
    My Mc will be receiving data from a wireless receiver at any time while Mc sends data to PC through Rs232 at regular interval.
    One possible approach is to utilize the hardware UART for the higher baud rate, 9600, and then implement a software UART for the lower baud rate, 2400.
    Higher baud rate using software UART not possible ??



    •   AltAdvertisment

        
       

  5. #5
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2357 / 2357
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Is it possible to have two Baud rates in 89S52?

    Quote Originally Posted by Jeffrey Peter View Post
    Higher baud rate using software UART not possible ??
    Possible, Yes.

    Advisable, Definitely No.

    BigDog
    The Edge... there is no honest way to explain it, because the only people who really know where it is are the ones who have gone over.
    -- Hunter S. Thompson



  6. #6
    Member level 5
    Points: 628, Level: 5

    Join Date
    Aug 2011
    Location
    Tirunelveli,Tamill Nadu, India
    Posts
    82
    Helped
    1 / 1
    Points
    628
    Level
    5

    Re: Is it possible to have two Baud rates in 89S52?

    okay.. Do i have to give a time delay between each byte in UART ?



  7. #7
    Administrator
    Points: 69,512, Level: 64
    Achievements:
    Created Album pictures Created Blog entry 7 years registered
    bigdogguru's Avatar
    Join Date
    Mar 2010
    Location
    Southwest, USA
    Posts
    9,832
    Helped
    2357 / 2357
    Points
    69,512
    Level
    64
    Blog Entries
    4

    Re: Is it possible to have two Baud rates in 89S52?

    Quote Originally Posted by Jeffrey Peter View Post
    okay.. Do i have to give a time delay between each byte in UART ?
    I not quite sure I understand your question.

    A standard hardware UART samples the line x16 the specified baud rate, a softUART implementation typically samples the line at significantly lower rate.

    Due to this fact, softUART typically have offer a maximum baud rate of 9600 or lower for devices like the AT89S52.

    In fact, achieving a viable/reliable 9600 baud rate implementation on an AT89S52 can be quite difficult, which is why lower baud rates are preferable.

    BigDog
    The Edge... there is no honest way to explain it, because the only people who really know where it is are the ones who have gone over.
    -- Hunter S. Thompson



    •   AltAdvertisment

        
       

  8. #8
    Member level 5
    Points: 628, Level: 5

    Join Date
    Aug 2011
    Location
    Tirunelveli,Tamill Nadu, India
    Posts
    82
    Helped
    1 / 1
    Points
    628
    Level
    5

    Re: Is it possible to have two Baud rates in 89S52?

    When I was implementing hardware UART having a baud rate of 9600, I missed some bytes on reception;using Interrupt method.... So I used delay between consecutive bytes and it worked fine...



  9. #9
    Advanced Member level 1
    Points: 3,016, Level: 12
    Jestin_cubetech's Avatar
    Join Date
    Jun 2012
    Posts
    499
    Helped
    74 / 74
    Points
    3,016
    Level
    12
    Blog Entries
    6

    Re: Is it possible to have two Baud rates in 89S52?

    hardware UART for reception and Software UART for transmission.
    ----------------------------------------------
    One man's fault is other man's lesson...
    ----------------------------------------------



--[[ ]]--