I'm a newbie to Arduino so please give me some guidance. What I'm trying to do is to figure out if I can get the attiny85 to communicate with RFID reader via serial comm. at 9600 baud rate. I'm not sure if this is doable or not. If not, do you suggest any other microcontrollers? I have a Arduino Uno and have done couple sketches. I know C/C++ programming quite well. Thank you in advance
You can program the ATtiny85 using the Arduino IDE:
Unfortunately it doesn't have an asynchronous serial port so you can't put a bootloader on it. You MIGHT be able to run NewSoftSerial on it to talk to your RFID reader.
Unless size (or cost) is absolutely critical you would probably be better off using a ATmega168 or ATmega328.
I doubt hardware serial will work, the hardware is lacking, as John noted. I tried NewSoftSerial and it appears to use ATmegaXX8-specific registers. Still, I'd think something similar would be possible, GIYF, let us know what you find! Given that, I might either calibrate the internal oscillator, or use a crystal or resonator. OTOH, I've run 9600 on a m328 using the 8MHz internal oscillator with no more than the factory calibration, and it seemed to work fine, but that's just one instance, I might have gotten lucky.
Writing your own 'soft-serial' for ATtiny chips is not that hard at all. It can be done with a combination of a pin-change-interrupt to capture the start bit and a compare-match timer to do the bit-sampling.
I had the same problem (no uart) with an ATtiny24, and it works reasonably well that way.
thanks everyone! I have decided to go w/ the ATmega328. This forum rocks and everyone here is so helpful.