Giter Site home page Giter Site logo

Comments (2)

hexagon5un avatar hexagon5un commented on July 24, 2024

Great that you're having a good time with it!

There's "serial" and there's "serial" -- what we need is a TTL (3.3V or 5V) serial adapter rather than an RS-232-style adapter. If you've got an RS-232 adapter (or are just using a computer's serial port) that could explain it?

In brief: RS-232 uses +12V/-12V signal levels rather than 0V/5V, and what's worse the low voltage in RS232 stands for a 1 bit, while in TTL serial, the high voltage is a 1. So to convert, you need to get the voltage levels right and invert the logical sense of things.

If you've already ordered an FTDI TTL serial cable, you should probably just sit tight. That's the elegant solution anyway.

If you're looking to build a simple level-conversion circuit, you can try one of these:
http://freecircuitdiagram.com/2009/03/27/simple-ttl-rs232-level-converter-using-transistor/
It's basically just two transistors to do the logic inversion and level shifting. I made one of these fifteen years(!) ago when I was just starting learning about microcontrollers and all I had was a serial port on an old desktop computer.

Thanks for the question. I'll try to work an update clarifying this into the next version of the book, if they let me get away with the extra couple paragraphs.

Let me know if the FTDI cable clears things up.

  Elliot.

from avr-programming.

jonmiller1 avatar jonmiller1 commented on July 24, 2024

I just received the FTDI USB to TTL Serial cable (3.3V) Part No TTL-232R-3V3. It totally solved the problem and everything works great! Thanks again for your fast response and for your awesome book! I love that you are continuing to revise and refine it. I found a good article that explains the difference. I had no idea that RS-232 serial on PCs was different than Serial on micro-controller. Thanks!

https://www.sparkfun.com/tutorials/215

from avr-programming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.