hi there
I want to transmit 8-10 byte data at 2400 baud rate to a device. The device reads only at 2400 rate. I am doing this using Arduino Nano sucessfully. The Arduino Nano is connected to Max232 which then transmits data via RS232 port.
I want to do this using ATTINY85 (with or without Crystal) to save cost and components space/size. I have loaded all boards and first tested the ATTINY85 using a simple LED flash sketch. It worked. Later, I burned the bootloader at Internal 8Mhz by the method described on various websites. I then uploaded the sketch :
#include <SoftwareSerial.h>
const int rx=-1;
const int tx=3;
SoftwareSerial mySerial(rx,tx);
void setup()
{
pinMode(tx,OUTPUT);
mySerial.begin(9600);
}
void loop()
{
mySerial.println("Testing .... ");
delay(1000);
}
I attached the pin2 of ATTINY85 to a USB-Serial Converter pin RX and tested it on the serial monitor. The output came as “Testing…*)X+#$” … at times normal and at times garbage, not consistent … I then reprogrammed it at 2400 baud but the output never came normal (only garbage).
Later I installed updated libraries of from https://code.google.com/p/arduino-tiny/ and used this code:
#include <TinyDebugSerial.h>
TinyDebugSerial mySerial = TinyDebugSerial();
..
..
but arduino compiler failed to compile it. It always gives error:
“TinyDebugSerial does not name a type”.
But I have learnt that this tinydebugserial is unable to work below 9600 baud rate.
I wanted to know is there any solution with ATTiny85 ? or by using external crystal (of 8Mhz or 16 or 20Mhz)? Or should I shift back to Arduino Nano ?
I am using Arduino software ver 1.0.5.
thanks