i am currently trying to generate a 38khz signal for my tsop4838 (http://www.vishay.com/docs/82459/tsop48.pdf) with an attiny84A.
I know the real thing would be to utilize a timer but the attiny only has 2 Timers ( T0 and T1 ). Timer1 can not be used because it is already used by other features.
I don't want to transmit actual data to the tsop4838 i only want to use it as a light barrier ( i know there are better ICs for that but i am stuck with the ones i already have ).
So what i have tried so far is setting up timer0 for my pwm stuff and everything worked IR Led wise. The delay functions ( micros, millis etc.. ) stopped working and prevented me from using my serial communication. I tried to change the code in wiring.c to use a prescaler of 1 instead of 64 by changing the defines but that didn't work out.
I am now stuck with two options i guess: A: somehow modify timer0 to generate my 38khz signal and still provide correct functionality for the timing functions
B: let timer0 be initialized the way the arduino wants it and utilize the delay functions to blink the ir led.
I would prefer A but google didn't gave me a solution, maybe some of the gurus around here could help ?
If A is not possible can somebody give me a hint how to "bit bang" the ir led with delay ? ( i guess that is a silly question but i can't figure it out at the moment :( )
Thanks in advance !