I'm trying to make an RF remote control using ATtiny85 running at 8MHz on internal oscillator, this cheap RF 434MHz transmitter module (like the one below), and VirtualWire lib, but had no success so far.

So, before I go any further, is it possible to use VirtualWire with ATtiny85 running at 3.6V and 8MHz with its internal oscillator? If so, how?
I've found a few scattered sources of information on the Net about it, but couldn't make much sense of it.
I have build ATMega328 versions of the receiver and transmitter using VirtualWire without any major problems. Both modules talk to each other will very little data drop out. Now, when I tried to replace the ATMega328 transmitter with a smaller version using the ATtiny85, I'm having problems.
Here are the symptoms:
The major one seem to be that when I add the VirtualWire include, my sketch seems to slow down a lot. So I figure it's a timing issue. But I'm not sure what the problem is.
I put a scope on ATtiny85 pin 6 (PB1) but I don't see anything being transmitted. I think I've messed up with the pin names.
I can make the LED blink and also can read the buttons without problems.
Here are the schematics and the board design for the remote controller:

The board is currently powered by 2 AA NiMH batteries that are currently at 2.6V. I can make the ATtiny85 blink with that voltage. I plan to power the RC with a 3.6V CR2 lithum battery.
Here are more details of my development enviroment:
- Arduino IDE 1.05
- I'm using ATtiny cores from here
- I'm programming the ATtiny85 using an Arduino UNO R3 as ISP, without problems (it's working as I can make the ATtiny85 blink an LED).
And here's my code:
#include <VirtualWire.h>
#define VCC_PIN A1
#define BTN_PIN A2
#define LED_PIN A3
#define TXD_PIN PB1
#define BLINK_UP_TIME 25
#define BUTTON_NONE 0
#define BUTTON_1 1
#define BUTTON_2 2
#define BUTTON_3 3
#define BUTTON_4 4
#define BUTTON_5 5
#define BUTTON_6 6
void setup()
{
pinMode(BTN_PIN, INPUT);
pinMode(TXD_PIN, OUTPUT);
pinMode(VCC_PIN, OUTPUT);
pinMode(LED_PIN, OUTPUT);
// leave RF transmitter off for now
digitalWrite(VCC_PIN, LOW);
// Initialise the IO and ISR
vw_set_tx_pin(TXD_PIN);
vw_setup(2000); // Bits per sec
// let the user know we are alive: heartbeat
blink(3, 50);
delay(1000);
}
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;
void loop()
{
byte button = ReadButtons();
if (button != BUTTON_NONE) {
// transmit button pressed
digitalWrite(LED_PIN, HIGH); // Flash a light to show transmitting
digitalWrite(VCC_PIN, HIGH); // turn tranmitter on
delay(10);
buf[0] = button;
vw_send(buf, 1);
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(LED_PIN, LOW); // turn off LED
digitalWrite(VCC_PIN, LOW); // turn tranmitter off
}
delay(100);
}
byte ReadButtons()
{
unsigned int buttonVoltage = analogRead(BTN_PIN);
byte button = BUTTON_NONE; // return no button pressed if the below checks don't write to btn
if (buttonVoltage < 10) { button = BUTTON_1; }
else if (buttonVoltage < 200) { button = BUTTON_2; }
else if (buttonVoltage < 400) { button = BUTTON_3; }
else if (buttonVoltage < 550) { button = BUTTON_4; }
else if (buttonVoltage < 720) { button = BUTTON_5; }
else if (buttonVoltage < 900) { button = BUTTON_6; }
else if (buttonVoltage > 1000) { button = BUTTON_NONE; }
return( button );
}
So, What's wrong with my setup?
A{n}, while the transmitter pin isPB{n}. Is that the correct pin mnemonic? – Connor Wolf Mar 18 '14 at 01:25PB1defined in any of the ATtiny headers you link. Assuming that your transmitter is on PORT B, pin 1, I think you should have#define TXD_PIN 1, since port B is just accessed using the traditional digital IO mnemonic. – Connor Wolf Mar 18 '14 at 01:29Axpin combination was the one that worked for me (except for the TXD pin, obviously). I guess you can refer to eitherPBxorAxas they are macros that end up getting replaced by integers (guessing here). – Ricardo Mar 18 '14 at 01:33PBxis referring to are not defined by the ATtiny libraries, so they may just kind of incidentally work. Have you verified you can controll PORT B 1 normally (e.g. with plaindigitalWrite()commands? Alternatively, just swap the LED and TX pins, and use the LED pin (which you know works) for the data output. – Connor Wolf Mar 18 '14 at 01:55PBnis defined by AVR-Libc. It just so happens that arduino-tiny maps PBn to Dn, and eachPBnis defined to have the value ofnfor use with_BV(). – Ignacio Vazquez-Abrams Mar 18 '14 at 02:40ARDUINO_INSTALL_DIR/harware/arduino/boards. Otherwise, you'd have to#define VW_PLATFORM VW_PLATFORM_GENERIC_AVRand use the additional calls needed for generic AVR platforms. – jfpoilpret Mar 18 '14 at 06:13F_CPUused to compile your code? Typically, when a program seems to be slower than it should it is often due to a mismatch betweenF_CPUand the real frequency (which is setup by fuses in your case I suppose). – jfpoilpret Mar 18 '14 at 18:04F_CPU, or a static variable (class instance) that, when constructed, changes something important. – jfpoilpret Mar 18 '14 at 19:14