EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / Problems with RS-232 Interfacing

Problems with RS-232 Interfacing

|

Microcontroller › AVR › Problems with RS-232 Interfacing

  • This topic has 6 replies, 4 voices, and was last updated 13 years ago by Amrith.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • April 9, 2012 at 12:09 pm #1511
    Dhruvil Shah
    Participant

    Hey guys. I have a problem with interfacing my bluetooth module (aubtm-20) with Atmega 640. The BT module works perfectly and responds to the commands sent when connected directly to a PC. I have also debugged the code and it works perfectly. But when I connect the BT module (Rx and Tx pins are connected to MAX232 and then to DB9 connector) to the microcontroller using DB9 connector + MAX232, I get incomplete response.

    For example, instead of getting getting the response as “<CR><LF>OK<CR><LF>”, I get a response like “<CR><LF>O<LF><CR><LF>”. The response I get seems to be a part of the actual response but I get a different response everytime.

    Rx of BT module is connected to Tx of microcontroller and Tx of BT module is connected to Rx of microcontroller.

    I also have shorted grounds of both the boards and have ensured that the baud rates are proper.

    Please let me know what the problem could be.

    April 18, 2012 at 1:18 pm #7480
    AJISH ALFRED
    Participant

    Your BT module works on 3.3V and it gives 0  for low bit and 3.3V for high bit. It will cause issues while connecting with 5V ttl logic. Use a 3.3V to 5V level shifter before connecting it with the controller

    May 2, 2012 at 7:31 am #7573
    Manivannan
    Participant

     

    I don’t where is the problem, whether it is in code or hardware?

     

    can you post your Usart code?

    May 9, 2012 at 8:19 am #7663
    Amrith
    Participant

    Hi Shah,

     

    If you are able to connect your Bluetooth module directly to PC, it seems that the bluetooth module has max232 on board. Try reducing the length of wire between your controller and bluetooth module. Can you post your code to verify.

    May 9, 2012 at 8:19 am #7684
    Amrith
    Participant

    Hi Shah,

     

    If you are able to connect your Bluetooth module directly to PC, it seems that the bluetooth module has max232 on board. Try reducing the length of wire between your controller and bluetooth module. Can you post your code to verify.

    May 9, 2012 at 8:30 am #7665
    Amrith
    Participant

    As Ajish suggested you can try using the circuit as below 

     

     

    wysiwyg_imageupload:4635:

    May 9, 2012 at 8:30 am #7685
    Amrith
    Participant

    As Ajish suggested you can try using the circuit as below 

     

     

    wysiwyg_imageupload:4635:

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • LED circuit for 1/6 scale diorama May 14, 2025
  • Electronic board faulty?!? May 13, 2025
  • Can I use this charger in every country? May 13, 2025
  • using a RTC in SF basic May 13, 2025
  • An Update On Tarrifs May 13, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise