ATtiny85 w/ tiny-core and serial write

As per this post here, the tiny-core has a softserial (write only) capability.

My development laptop, has no serial port, but I do have a PL2303 based USB-Serial converter (like this one on ebay). Can I use it to interface with my "ATtiny on breadboard" ? On the breadboard, do I need additional circuitry (level-changing), to enable serial communication ?

falcon74:
As per this post here, the tiny-core has a softserial (write only) capability.

My development laptop, has no serial port, but I do have a PL2303 based USB-Serial converter (like this one on ebay). Can I use it to interface with my "ATtiny on breadboard" ? On the breadboard, do I need additional circuitry (level-changing), to enable serial communication ?

It will take you about 30 seconds to find out...

Yes, you will need something like a MAX232 on the breadboard or some other circuitry to adapt the signal. You not only need voltage level conversion, but also to invert the polarity.

afremont:
Yes, you will need something like a MAX232 on the breadboard or some other circuitry to adapt the signal. You not only need voltage level conversion, but also to invert the polarity.

Most of those cables work at 5V so there's no need for any conversion.

If in doubt, use a multimeter.

While some of those cables will work with 0 and +5V, the specification calls for +12V and -12V (more or less, 10 to 18 I think). Since there is a 9-pin serial connector on the end of the cable the OP linked to, that pretty much guarantees the 12V signalling so there will most certainly need to be a polarity conversion before connecting it to the micro pins.

Best thing is to either:

  1. get something like one of these:
    FTDI Serial TTL-232 USB Cable : ID 70 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
    FTDI Friend + extras [v1.0] : ID 284 : $14.75 : Adafruit Industries, Unique & fun DIY electronics and kits
    USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi : ID 954 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits

  2. put in a MAX232 on the breadboard

I have one of these, works great:
http://www.microcenter.com/product/389986/OSEPP_FTDI_Breakout_Board

How about the polarity inversion that @afremont wrote about !
Actually, I'd found some contradictory information, which is why I asked here.

For instance, this link talks about the need of MAX2232 (and few caps) inspite of interaction with Arduino (which is clearly operating at 5VDC). See this one, where they talk of RS-232 working at 10VDC.

Sorry, but I am a software guy, with fairly superficial electronics knowledge, so this thing isn't very obvious.

Thanks folks. So it is indeed multimeter time. Will try out the voltage levels of the connector I have. If they are 5VDC, then I believe, I should be good to go. Would I still have to worry about polarity inversion ?

Look at the diagram on this page.

Note the little dots (inverters) on the points (outputs) of the triangles (drivers).

Here is another, check the first diagram on the page for the signal polarity and voltage:
https://www.sparkfun.com/tutorials/215

fungus:

falcon74:
Would I still have to worry about polarity inversion ?

No. RS232 doesn't do inversion, I don't know where anybody got that idea.

I don't know where you get that idea from, but please check this link:
https://www.sparkfun.com/tutorials/215

The RS232 voltage level signal IS inverted from the TTL level version.

EDIT: An RS232 line idles at -12V nominally, a TTL line idles at +5V. Some micros (I don't know about the AVR) will let you invert the signals that the hardware UART generates. This will sometimes work with the more modern serial ports, but I assure you that there is a whole lot of vintage equipment that will not honor +5V and 0V signals, even if they are the right polarity.

afremont:
I don't know where you get that idea from, but please check this link:
RS-232 vs. TTL Serial Communication - SparkFun Electronics

The RS232 voltage level signal IS inverted from the TTL level version.

True, but if his cable outputs the inverted signals then it won't work with any known RS232 device. Somewhere in the cable it has to invert them before they reach the pins.

The cable that the OP posted a link to must have a MAX232 type level converter inside or they wouldn't have terminated it in the DB-9 connector. The ones that I posted a link to only have the FTDI chip so they output TTL levels and polarities. That's why they terminate the way they do.

falcon74:
Thanks folks. So it is indeed multimeter time. Will try out the voltage levels of the connector I have. If they are 5VDC, then I believe, I should be good to go.

Thinking about this more, you only want to send data from the ATtiny85 and there's no flow control.

In this case there's no level conversion necessary. The only wire connected is TX (Tiny85->cable). It either works or it doesn't.

Thanks folks.

@afremont, I read though the sparkfun article and data-sheet, and I think I understand the RS-232 and TTL differences now, and can appreciate your reasoning and why you suggested what you suggested. I think, I do have some MAX232x's somewhere and can use those.

@fungus, are you suggesting that I hook-up the TTL-level Tx pin, to the dongle/converter's RS-232 level Rx pin, and "try it out" ? Nothing bad can happen, because Rx-end can, in worst case expect higher voltage signals (and perhaps, also inversion). At worst, this thing won't work, but usually no fear of magic-smoke! Right ? Or, I didn't understand your last statement.

falcon74:
@fungus, are you suggesting that I hook-up the TTL-level Tx pin, to the dongle/converter's RS-232 level Rx pin, and "try it out" ? Nothing bad can happen, because Rx-end can, in worst case expect higher voltage signals (and perhaps, also inversion). At worst, this thing won't work, but usually no fear of magic-smoke! Right ? Or, I didn't understand your last statement.

Yep. I don't see how anything bad can happen if you only connect that wire.

PS: Connect GND as well!

I have one of those USB to DB9 serial cables that I just tested. With respect to the ground pin in the DB9 connector, the outputs idle at -6.5V. So you can see, the DB9 versions support negative voltages of true RS-232. It's kinda like this cable:
http://www.tri-plc.com/USB-RS232/drivers.htm

It can deliver 30mA on a pin.

Fungus is right, connecting only the TX pin from the Arduino board to the RX pin of the USB to serial cable shouldn't be able to harm anything since the cable can accept a much broader range of voltages than the Arduino board can deliver. Don't hook up any of the other signaling wires though, because you don't really need the cable delivering -6.5V@30mA to the Arduino.

so basically, there is a specification in the standard for 12v, but some "smarter" interfaces will bend over backwards to be overly compatible?

anyway, i just got a number of these chips. excited to try them out cause their cheapness opens up new options...

The standard is very old so it calls for higher voltages and even expects negative voltages. I believe that the standard only demands a +5V to -5V swing on the signal for it to be considered acceptable. Still many modern devices will accept +5V and 0V as valid inputs as Fungus says, though they really aren't to spec and they will still require the polarity inversion.