Adding RS-232 DTR signal output to an AVR running the avr-cdc USB library
Cmdrk33n hacked the avr-cdc library to add the RS232 DTR signal output to one of the pins on his ATtiny MCU. Only a few lines of code need to be changed to implement his solution.
Demonstrated in the above video is the DTR signal turning the LED on whenever a terminal window (connection) is opened.
Let’s have a nice talk about the DTR signal of RS232 connections (PIN4). Back in the days, where we all slept besides these noisy little boxes that connected us to the world wide web (BRRRRRRP DRRRRRR), the DTR signal was the most important control line of your serial connection.
Via the forum.
This entry was posted in AVR, USB and tagged AVR, avr-cdc, DTR signal, USB.

Comments
Hey there, i’ll have to give you a few extra information about this hack:
at the time of writing this post, i’ve missinterpreted the DTR signal and thought it was active HIGH. My current code is also wrong in that behavior…
I will fix that in a few days (after my vacation) ;-)
The original avr-cdc code for the tiny2313 provides a full uart connection when you use the 16mhz or 20mhz version. the DTR signal is mapped to PIN5.
I’ll make a full tutorial about how to use the DTR signal on the 2313 and the tiny45/85 chips in the next week.