Ok im pretty new to all of this but ive been working on this all night and after trying a million things I am pretty much stumped.
My problem is that I cannot get the serial communication to work. With a simple sketch that blinks an LED and writes a message to the serial output every loop I just get a repeating serial read of garbage characters (always the same characters for a given message though).
I have this programmer -> https://www.sparkfun.com/products/11801
Im using the ATtiny85
Im using this USB-to-Serial RS232 5v converter (I use this adapter all the time on other hardware with no issues)-> USB to Serial Adapter - Works seamlessly with TunerStudio
Ive tried this code base -> Google Code Archive - Long-term storage for Google Code Project Hosting. as well as this one -> GitHub - damellis/attiny: ATtiny microcontroller support for the Arduino IDE
Ive tried every baud rate
Ive tried 1mhz, 8mhz internal clocks (yes I burned the bootloader each time)
Ive tried TinyTuner with no avail, I can't get any readable serial data so I can't see what its doing nor can I get the OSCCAL value.
Ive tried an external 16mhz clock and burned the bootloader for this as well and still the same garble.
Ive tried attiny85-TX on pins 2,3,4
Ive tried on my MAC and on my windows computer
Ive tried viewing the data with the arduino viewer, hyperterm, and coolterm
Ive tried reversing the RX, TX wires
Ive tried arduino IDE 1.06, 1.5.8, and 1.6
Here is one version of the sketch I was using, ive set it up for different pin configurations and other variances. I also get the garbage serial data with Tiny Tuner so I know its not a sketch problem.
#include <SoftwareSerial.h>
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://arduino.cc
This example code is in the public domain.
modified 8 May 2014
by Scott Fitzgerald
*/
const int rx=-1;
const int tx=2;
SoftwareSerial mySerial(rx, tx);
// the setup function runs once when you press reset or power the board
void setup() {
//pinMode(rx, INPUT);
pinMode(tx, OUTPUT);
mySerial.begin(9600); // connect to the serial port
mySerial.println("1");
// initialize digital pin 13 as an output.
pinMode(0, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
mySerial.println("123");
digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(0, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}