Go Down

Topic: TinyTuner, attiny85, serial over USB, how to connect ? (Read 4201 times) previous topic - next topic

falcon74

Feb 11, 2012, 04:38 pm Last Edit: Feb 11, 2012, 07:10 pm by falcon74 Reason: 1
Hi,

This topic deserves independent attention, so branching this off from my other open thread.

My development PC is a laptop, and it has no serial port. I do have a USB to serial converter based on an el-cheapo (and somewhat notorious) Prolific chip. Apparently, these are the cheapest, and used in the most common of such converters all over eBay. I run Ubuntu Linux on this laptop. This USB-to-serial converter surely works on this laptop, since I also use it for some work I do on an ARM board.

The instructions found for attiny85 in the Save_to_EEPROM.pde sketch under examples, bundled with TinyTuner, say thus --

Code: [Select]

 - Select the correct board / serial port
 - Upload this Sketch to the processor
 - Connect PB4 / Pin 4 to transmit on the serial converter
 - Connect an LED + resistor --> ground on PB0 / Pin 0
 - Start your favorite terminal program, open the correct serial port, change
   the baud rate to 9600


So now, I am wondering as to how exactly do I connect the female DB9 out from the USB-serial converter, to attiny85. While I do not know the details of RS232, I believe that they and ATtiny use different logic levels (TTL and CMOS), and I need a buffer in between. Is that right ? I think I do have some MAX232 samples, but those are SMD ICs, which I am not comfortable soldering. So I wanted to be sure if I really need to use those, or is there a simpler way. Or, maybe I have misunderstood the instructions, and all this mumbo-jumbo isn't required.

A schematic on how to connect this, would be really very helpful.

Coding Badly


Do you have an Arduino (or compatible) board?

Do you have an "older" board with an FTDI USB-to-TTL-serial converter?

falcon74


Coding Badly

#3
Feb 12, 2012, 10:41 am Last Edit: Feb 13, 2012, 06:25 am by Coding Badly Reason: 1

Excellent.  On the Duemillanove, connect a jumper from RESET to GND.  This holds the processor in reset preventing it from running.  You now have an accurate USB-to-TTL-serial converter.

Connect RX (or TX; I can't remember the reference point) to the appropriate pin on the ATtiny processor.  Connect GND on the Duemillanove to GND on the ATtiny.  Using your favourite terminal application send 'x' characters (don't send them too quickly; Tiny Tuner needs a little gap for processing).  It usually takes less than a dozen 'x' characters to find the ideal value.

Note: The ATtiny84 processor has enough memory to run the interactive sample.  Just connect TX (or RX) to the pin used for Tiny Debug Serial.

falcon74



Excellent.  On the Duemillanove, connect a jumper from RESET to GND.  This holds the processor in reset preventing it from running.  You now have an accurate USB-to-TTL-serial converter.

Connect RX (or TX; I can't remember the reference point) to the appropriate pin on the ATtiny processor.  Connect GND on the Duemillanove to GND on the ATtiny.  Using your favourite terminal application send 'x' characters (don't send them too quickly; Tiny Tuner needs a little gap for processing).  It usually takes less than a dozen 'x' characters to find the ideal value.

Note: The ATtiny84 processor has enough memory to run the interactive sample.  Just connect TX (or RX) to the pin used for Tiny Debug Serial.



Which is the sketch loaded on Duemillanove ? Sorry, it is a slow monday.
Also, did you mean ATtiny85 (not 84) ?

Coding Badly

Which is the sketch loaded on Duemillanove ?


Makes no difference.  By holding the processor in reset it is essentially dead.  (But uploading an empty sketch will help prevent accidental short-circuits.)

Quote
Sorry, it is a slow monday.


No doubt!  It's still Sunday here.

Quote
Also, did you mean ATtiny85 (not 84) ?


Yes.  Sorry about that.  Both processors have enough memory to run the interactive sample.  If I remember correctly it does not fit on an ATtiny45.

falcon74

Argh. Too much of Arduino-as-ISP hangover. I glossed over the bit about jumpering GND/RESET too fast to register, drawing a mental picture of 110R between them instead.


falcon74

Was referring to the 110R resistor added between RESET and +5VDC on Arduino board, to disable autoreset, when used as Arduino-as-ISP.
Blame it again on slow monday :-)

Go Up