Can an AVR output Rs-232 commands?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Probably not huh? I will have level converters for the voltages, but this is probably out of the AVR league. Anyone disagree? You have to deal with baud rates, timing, etc.

Thanks for any comments.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course, you will have to have a TTL-RS232 level converter (chip or discrete). However, the AVR can transmit and receive asynchronous data. This can be done either through software control and timing or though a hardware UART (if your AVR has one).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course, you will have to have a TTL-RS232 level converter (chip or discrete). However, the AVR can transmit and receive asynchronous data. This can be done either through software control and timing or though a hardware UART (if your AVR has one).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What do you mean by RS232 commands? As far as I know, RS323 refers to the electrical signal levels(-12V to -3V / +3V to +12V or thereabouts).
If you are talking about asynchronous serial communication(baud rates, parity, start and stop bits) then AVRs are eminently capable. Some of them have built in hardware for this purpose, and those that do not can achieve results by so-called bit-banging. Search these forums for examples and code snippets.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most AVRs have a UART which is all you need for logic-level serial communications. If you need to communicate using the true RS-232 standard with +/- signal levels, then you will need a level shifter something like the MAX-232 series.

Since you say you "will have level converters for the voltages" I am guessing you mean can the AVR send serial data suitable for RS-232 communications?

If that's what you mean, the answer is definitely yes it can. It does it really well actually. I've used the UART both with and without level shifters to talk serial with PDA serial ports, PC serial ports, etc.

Works like a champ.

Please note - this post may not present all information available on a subject.