PaulStoffregen / AltSoftSerial

Software emulated serial using hardware timers for improved compatibility
http://www.pjrc.com/teensy/td_libs_AltSoftSerial.html
328 stars 131 forks source link

ATtiny 85? #17

Closed hoonkai closed 8 years ago

hoonkai commented 8 years ago

Hi Paul,

This is an amazing piece of work. :)

Just wondering: are there feasible ways to massage AltSoftSerial to work on an ATtiny85? I see that about half a dozen boards are formally supported, but could something be done to make it support the attiny?

Cheers

PaulStoffregen commented 8 years ago

Ask Atmel to make a version with the right 16 bit timer hardware?

josephernest commented 4 years ago

@PaulStoffregen Would there be a way to make AltSoftSerial with ATTiny45/85? Maybe I thought there would be new alter2015, maybe not requiring 16 bit timer, or any other technique? Thanks in advance!

PaulStoffregen commented 4 years ago

16 bit timer is required

josephernest commented 4 years ago

Thank you for your answer. So impossible to have anything else than SoftwareSerial (aka NewSoftSerial) on ATtiny45?

josephernest commented 4 years ago

@PaulStoffregen if I take an ATTiny84, will your library work out-of-the-box with Arduino IDE (I use https://github.com/SpenceKonde/ATTinyCore)? The 84 has a 16 bit timer, so I'm thinking about getting one.

Congratulations again for your library!

PaulStoffregen commented 4 years ago

if I take an ATTiny84, will your library work out-of-the-box

Probably not. I have not personally tested this chip. If you read AltSoftSerial_Boards.h, so far nobody has contributed defines to support it. Maybe you will create these, test to make sure everything works, then contribute so others can have this chip work out-of-the-box?

josephernest commented 4 years ago

I am currently active on a few other (opensource too) projects, and if I have some time, I will definitely contribute. (For now, I just took an ATmega328p in order to have a real hardware UART, and everything is working great thanks to HardwareSerial). I've also looked at NeoSWSerial (another software serial library), but 31250 baud (for MIDI) is not supported for 8 Mhz chips, unfortunately!