system
August 3, 2012, 5:44pm
1
I'm having trouble getting the SoftwareSerial library to work. When I "print" data from the tiny45, it shows up as odd characters such as "ÿÿ" in Serial Monitor.
Here is my code:
#include <SoftwareSerial.h>
#define RX 1
#define TX 2
SoftwareSerial ms(RX,TX);
void setup () {
pinMode(RX, INPUT);
pinMode(TX, OUTPUT);
ms.begin(9600);
}
void loop () {
ms.print("Testing");
delay(1000);
}
I have tried 4800 and 9600 baud rate with the only difference being the random characters returned. Am I doing anything wrong?
system
August 3, 2012, 6:08pm
2
You are going to have to supply a little more information.
What core are you using for the tiny?
What is the wiring of your circuit, schematic/photograph?
What clock speed are you using?
What clock source are you using?
system
August 3, 2012, 7:47pm
3
wanderson:
You are going to have to supply a little more information.
What core are you using for the tiny?
What is the wiring of your circuit, schematic/photograph?
What clock speed are you using?
What clock source are you using?
Core? Not sure what that is but I followed this guide: http://hlt.media.mit.edu/?p=1695
Wiring is literally just Pin 2 from tiny45 to RX<-0 on the Arduino Uno.
Clock speed is @ 8Mhz using internal oscillator
system
August 3, 2012, 8:55pm
4
Try using this instead of the mit core which is known to have issues supporting software serial.
http://code.google.com/p/arduino-tiny/