element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
element14's The Ben Heck Show
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • More
  • Cancel
element14's The Ben Heck Show
Forum USB to Serial to MCU
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14's The Ben Heck Show to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 8 replies
  • Subscribers 33 subscribers
  • Views 808 views
  • Users 0 members are here
Related

USB to Serial to MCU

timryder
timryder over 11 years ago

I'm designing an application that will be using USB to serial to communicate to an ATMEGA328p  There will be a ton of communication and in some case some streaming of data.

I'm looking to design the best most robust USB --> Serial circuit I can to ensure that this works very well.  Can anyone offer me some help in this matter? 

 

I have something in place already but it doesn't seem to be working well.  I need more robust.  Also I was curious, whats the point of the resistors between the TX off the USB/Serial chip to the MCU?  Also the RX line as well.


Thanks!

  • Sign in to reply
  • Cancel
Parents
  • michaelkellett
    michaelkellett over 11 years ago

    Most people get on well enough with the FTDI chips. If you have  a specific problem it might be possible to help if you can describe the setup and what goes wrong in detail.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • timryder
    timryder over 11 years ago in reply to michaelkellett

    I am using an FT232RL FTDI chip, but what i'm seeing is that every now and again the ATmega either fails to receive my string. I've been trying to see what could be the cause of it. Maybe it's noise on circuit board? I did implement 1k resistors from the FTDI to the MCU between the RX to TX and TX to RX lines. but to be perfectly honest, I'm a hobbyist and don't know the purpose of them.  I just mimicked another design from another engineer.  Maybe I need to increase this value?  Can anyone answer WHY I need these in there?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • timryder
    timryder over 11 years ago in reply to timryder

    i'll elaborate a little more, i'm using the "GRBL" firmware to run on the ATMEGA328p and communicating to it from a custom app that I wrote on the PC.  I know the PC is good because it seems to work fine with the Arduino Uno but not with my board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett over 11 years ago in reply to timryder

    You probably don't need the resistors but 1k won't do any harm. Is this your own ATMega328 board - if so can you post a  schematic and  a pcb layout. How often does the system go wrong, do you just get some corrupted data or a complete system crash ? What communications protocol are you using and does it have any error detection/correction.

    I don't know enough yet to guess at  a cause yet but there are a few things we can do to pin it down.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • timryder
    timryder over 11 years ago in reply to michaelkellett

    I messaged you privately for now,

    I should note I'm a newbie and this is my first ever design. I'm teaching myself all the theory and design principles along the way.  SO any help and criticism from ANYONE is appreciated!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • timryder
    timryder over 11 years ago in reply to michaelkellett

    I messaged you privately for now,

    I should note I'm a newbie and this is my first ever design. I'm teaching myself all the theory and design principles along the way.  SO any help and criticism from ANYONE is appreciated!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • gihu
    gihu over 11 years ago in reply to timryder

    Hi Tim,

     

    You better check what is happening step by step.

    To check how is working your PC with the FT232, so,

         1.Disconnect the FT232 from the ATMega, and make a loopback (shortcircuit Tx Rx of the FT232) and check that everything you send from the app is immediatly received.

              a.If it fails check if flow control is enabled, if yes disable and try again.

              b. It works, step2

         2 Connect it to the ATMega, and try. Do you receive any data?   

              a. No. Check if you are using the rigth UART in the ATMega. Are you reading by pooling or by interruption?, if interruption check that the interruption is enabled.

              b. Yes, but wrong, Check that number of bits, parity and bit stop selected are the same in the PC and in the ATMega

              c. Yes and rigth. GREAT!!

     

    Hope that helps,

    Miguel

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • royston02
    royston02 over 11 years ago in reply to gihu

    if you,re using bare chip then make suer you have a 100nf/0.1uf capacitor on the reset line

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube