Hi, I am new to the hobbyist field of electronics and microcontrollers. I began researching the field about one year ago, and have been working on several projects over the summer time. One of my projects is developing a cheap, minimalist IR remote for my Nikon D50 DSLR. My goal is to shrink my code enough so that I can run it on an ATTINY13A-PU, which has 1 kb of program space, 64 x 8 bytes of RAM, and 64 x 8 bytes of EEPROM. The datasheet for this microcontroller can be found on Digikey. The problem is, I can only get the code down to 1050 bytes, so I wanted to reach out to the Pololu community to see if anyone can help me with this. My code is as follows:
void setup() {
pinMode(13, OUTPUT);
}
void loop()
{
pulseIR(2080);
delay(27);
pulseIR(440);
delayMicroseconds(1500);
pulseIR(460);
delayMicroseconds(3440);
pulseIR(480);
delay(60*1000);
}
void pulseIR(long microsecs) {
while (microsecs > 0) {
digitalWrite(13, HIGH);
delayMicroseconds(10);
digitalWrite(13, LOW);
delayMicroseconds(10);
// so 26 microseconds altogether
microsecs -= 26;
}
}
I could also use help with figuring out how to upload programs to the ATTiny 13A and an ATMega 48pv using either an Arduino Uno R3 or a V2.1 pololu programmer.