ATTinyXX Serial Communication and Alternative MCU's for Serial Communication

Hello Everyone,

This is a kind of a long post, Sorry about the lengthy text, but please bare with me :slight_smile:
Any Help is much Appreciated.

First of all, I’ve been unsuccessfully trying to get my ATTiny85, ATTiny44A to display text to the Serial Monitor using Arduino Uno as an ISP. I have the correct Baud rate in the program of 9600, I am using the built in SoftwareSerial library. I’ve even burned the 8Mhz bootloader on both ATTiny85, and ATTiny44A with no luck of being able to display text on Serial Monitor.

I am using the follwing cores for the ATTiny’s:
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

When I have the following code uploaded to the ATTinyXX, the Serial Monitor just displays a bunch of garbage text, for example “yoyyuou/u” with two dots on top of both “y” and “u”.

So my questions is, what am I doing wrong?

Moving on, the reason I am trying to get the ATTinyXX’s to work with Serial communication is so that I can use them with a BT module to transmit data to an Application, Since I only need a few I/O pins for peripherals, I figured ATTinyXX’s would be a good idea, However, given the difficulty I am having with getting them to work, I would like to explore alternatives, which brings to my second question, What alternative MCU can I use instead of ATTinyXX’s (incase they don’t workout)? the main thing I need is for the MCU’s to be able to pass on the data to the BT module that will connect to a mobile App using TX, RX pins. I was thinking atmega168? atmega328p?

Any suggestions would be much appreciated, preferably stating Pro’s and Con’s from personal experience and use.

Sorry again for the long post, I would really appreciate any help/suggestions/feedback as I’ve been banging my head for a few weeks now trying to get over this hurdle.

Thank You

There are some newer ATtinys that have hardware uarts. ATtiny1634 and ATtiny841, for example.
Or you could just get an ATmegaXX8 in a tiny package...

Thank You westfw.

I was hoping for something along the lines of 4-8 PINS total as I don't need that many attached Peripherals, using ATTiny1634 or atmega328P seems like an overkill, are there any other options?

Thanks Again.

Maybe you need to tune the internal oscillator if your using it to get a more accurate clock for software serial.

A quick google search shows others have done what you want to do.

Thank you Riva,

Unfortunately, I've had no luck with Tuning the internal oscillator.

What is the simplest way (perhaps one you've tested?)
Thanks Again.

babsndeep:
...given the difficulty I am having with getting them to work, I would like to explore alternatives, which brings to my second question, What alternative MCU can I use instead of ATTinyXX's (incase they don't workout)? the main thing I need is for the MCU's to be able to pass on the data to the BT module that will connect to a mobile App using TX, RX pins. I was thinking atmega168? atmega328p?

Something to consider, if you want the ability to use and program your board like a "regular" Ardunio, you could just use the same chip an Uno or Leonardo uses, and you don't really need to connect all the pins. You can embed a Pro Mini if you want and it has the power of an Uno. I think these are interesting although I haven't bought one yet, they are small Leonardos with just a few pins brought out to the headers: Beetle_SKU_DFR0282-DFRobot

The attiny 841 is the same size at the 84, but with two hardware serials, and the on chip oscillator is calibrated well enough that you don't need to tune it.... See link in my sig for the core and info

Thanks for the Info, dmjlambert & DrAzzy.

What about using an atmega168?
Seems like it has a TTL Level Serial Transciever port RX/TX

Thank You

ATmega168 is the processor used in the Diecimila, Nano, Mini, Lilypad, and other older Arduino boards. It is essentially same as ATmega328P except the memory size. ATmega328P is probably quite a bit less expensive since it is so popular, and you will find it easier to get help for ATmega328P since you can just treat it like an Uno or Pro Mini. So if you go into the ATmega family, I recommend ATmega328P. There is no advantage I can see picking ATmega168 for a new purchase instead of ATmega328P. If you happen to have a ATmega168 already just sitting there in front of you in your supplies, then go for it.