Attiny85 serial comms

is there any way to let the attiny85 (uart-less) communicate with a softwareserial when it's clocked at 1mhz? i would like to connect it to a serial lcd. i've compiled against the 45_85 core and the arduino tiny core but without success. any help ?

(deleted)

thank you for your reply tested and it doesn't work too.. :( i know , the core i'm using has a tinydebugserial, but i cant find examples around... i would also be happy with a tx only solution Edit: my fuses are: lfuse E2 hfuse DF efuse FF and avrdude says they're ok

(deleted)

i saw it , but it says 4800bps, i need 9600 because the serial lcd only works at that baudrate.. do you think it could be modified to reach 9600bps?

(deleted)

(deleted)

thank you for your advice, but i know newsoftwareserial leans on interrupts and it wont work out of the box with the attiny85. i would avoid to use interrupts if it is possible.. Edit: anyway , programming fuses at 8mhz let the newsoftwareserial (with some modifications) actually work, but i'm afraid about interrupts and timers screwing up, but now at least i can read my hallo world on my lcd.

is there any way to let the attiny85 (uart-less) communicate with a softwareserial when it's clocked at 1mhz?

It depends. Do you need to be able to receive, transmit, or both?

For transmit-only to a serial LCD, you should certainly be able to do 9600bps even on a 1MHz AVR. That's about 106 microseconds per bit (or instructions, at 1MHz, approximately); plenty of time! However, the arduino "softwareserial" library is not a particularly good place to start for doing this, since it's designed to use interrupts to allow several concurrent receive/transmit serial ports, which is overkill, and the timer-based interrupts may not work correctly on a tiny85, either.

that's the what i thought for first... it should be not so complicate to bitbang an rs232 frame.. divide the clock and the baudrate to have the delay between two subsequent bits, send the start bit, transform the char in byte and send the 0 or the 1, send the stop bit. But with this method in my tests, if i send "aaaa" i receive sometimes "aaaq" or sometimes the right string, or randomly "qqaq", i guess because of the internal oscillator and his low precision. do you think TinyTune may help? and why when i use the arduinoTiny core i'm not able to do it via the tinydebug serial at 1mhz?

that's the what i thought for first... it should be not so complicate to bitbang an rs232 frame.. divide the clock and the baudrate to have the delay between two subsequent bits, send the start bit, transform the char in byte and send the 0 or the 1, send the stop bit.

That's exactly how Tiny Debug Serial works.

BrainBooster: But with this method in my tests, if i send "aaaa" i receive sometimes "aaaq" or sometimes the right string, or randomly "qqaq", i guess because of the internal oscillator and his low precision.

The untuned internal oscillator is probably why serial communications does not work.

do you think TinyTune may help?

It has helped me. If the temperature and voltage is fairly stable I've been able to tune the internal oscillator to ±0.5%. Which is certainly good enough for serial communications to work.

and why when i use the arduinoTiny core i'm not able to do it via the tinydebug serial at 1mhz?

It worked when I tested it. :D Try tuning the processor.