I'm new in this forum, I'm trying to send/receive data via serial protocol, 9600 baud is enough, from/to attiny 84/85 processors but I can't find complete guide, I'm a bit confused with cores, pins, clocks, and what is the correct library to use.
Maybe it could be useful also to other people to write a summary of all is needed because all that I can't find is a big mix of everything.
If someone has succeded in serial comm, could you please summarize these steps:
core to use and it's link, which is the speed to select to have succesfull data sent/received
which library to use serial, softwareserial, tinyserialdebug, other...
ports to use, if mandatory on the 84 and the 85, or any
capacitor if needed between output and ground or other
sample working code
I'm trying to send data to a 44780 lcd display via a serial adapter but I see always bad data on the display while with arduino it was working properly. I'm using a usb tiny isp as a programmer. I'm trying with an attiny 85 and an 84.
Me, I'm really confused about this. For one thing, is Tiny Isp software or hardware? I've been trying to understand the directions on the pages Erni posted as well as this tutorial, but it's still not clear to me. The end goal for me is to be able to debug and reprogram at will. What I don't understand is if this can be done with an Attiny 85. Must there be additional hardware such as an USB to serial converter or a TinyISP AVR Programmer or an Arduino? If both debugging and programming can be available without switching hardware, how is the hardware connected to an Attiny 85? - Scotty
It is software, it is a a sketch, just like the normal ArduinoISP you have in your example menu in the Arduino IDE
If you want to program an ATtiny you need a programmer.
It can be a Arduino with the ArduinoISP, or TinyISp
or any other programmer like USBAsp, Pololu programmer and so on
If you want the debug output in your Serial monitor, you can use a USB/Serial converter, and you can use your Arduino as such.
If you want both of the above (like you are used to from Arduino), you can use Arduino (hardware) with the TinyISP sketch (software) loaded, and the KnockBang sketch (software) on yor Attiny.
You connect it like this
thank you for your help, I have succeded in having output from attiny 84/85 with your documentation, my mistake was only using port PA0 instead of PB0 on ATTINY84.
Now I'm trying also to receive serial data with ATTINY84/85 chips, but using SoftwareSerial I am not able to receive any data, I'm thinking it could be an issue linked to clock tuning.
Now I'm struggling with the Tiny Tuner, probably I've missed a library, I've tried to use the example:
Interactive with NewsoftSerial
but it gives me some compilation error, is there another easy way to tune the internal oscillator? I have an old Fluke scopemeter so I was thinking to use this to calibrate.
Everybody writes many things difficult to understand without attaching a simple schema, also docs of TinyTuner has no schema, and examples use different pins each other, I'm a bit confused.
Everybody writes many things difficult to understand without attaching a simple schema, also docs of TinyTuner has no schema
If you open the sketch Interactive_to_Serial_with_Details you will find a detailed description of how to make the connections for both ATtiny85 and ATtiny84,
Out of 20 - 30 ATtiny84's I've never had to use TinyTuner to get SoftwareSerial to work correctly.
Me neither, but there has been quite many posts about others having trouble, so maybe we have just been lucky ?
I have an old Fluke scopemeter
If it can measure frequence, you can use the sketch below. It outputs 1MHz on pin PB0, if your
tiny is running @8MHz
You connect a potmeter with the wiper to pin PB4. Then turn the potmeter until your meter show 1 MHz.
You can then use the OSCCAL value in the setup like this:
Erni:
If it can measure frequence, you can use the sketch below. It outputs 1MHz on pin PB0, if your
tiny is running @8MHz
You connect a potmeter with the wiper to pin PB4. Then turn the potmeter until your meter show 1 MHz.
You can then use the OSCCAL value in the setup like this:
Just do this:
void setup()
{
delay(2000);
Serial.begin(57600); // Or even 115200...
for (int i=0; i<256; ++i) {
OSCCAL = i;
delay(1);
Serial.println();
serial.print("This was printed with OSCCAL=");
serial.print(i);
}
}
void loop()
{
}
Pick a value in the middle of the range that displays something legible.