Skip to main content
Spelling, grammar
Source Link

I am currently trying to generate a 38 KHz 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 (Iknow 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 (microsmicros(), millismillis() 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 38 KHz 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 give 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!

I am currently trying to generate a 38 KHz 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 (Iknow 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 38 KHz 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 give 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!

I am currently trying to generate a 38 KHz 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 (Iknow 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 38 KHz 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 give 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 :()

generating Generating a 38khz38 KHz signal without timers

iI am currently trying to generate a 38khz38 KHz signal for my tsop4838TSOP4838 (http://www.vishay.com/docs/82459/tsop48.pdf) with an attiny84AATtiny84A.

I know the real thing would be to utilize a timer but the attinyATtiny only has 2 Timers ( T0T0 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 iTSOP4838. I only want to use it as a light barrier ( i knowIknow there are better ICs for that but iI am stuck with the ones iI already have  ).

So what iI have tried so far is setting up timer0 for my pwmPWM stuff and everything worked IR Led wiseLED-wise. The delay functions ( microsmicros, millis etc..  ) stopped working and prevented me from using my serial communication. I tried to change the code in wiring.cwiring.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 iI guess: A

A: somehow modify timer0 to generate my 38khz38 KHz signal and still provide correct functionality for the timing functions.

B: let timer0 be initialized the way the arduinoArduino wants it and utilize the delay functions to blink the ir ledIR LED.

I would prefer A but googleGoogle didn't gavegive me a solution, maybe. 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 ledIR LED with delay  ? ( iI guess that is a silly question but iI can't figure it out at the moment :(  )

Thanks in advance  !

generating a 38khz signal without timers

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  !

Generating a 38 KHz signal without timers

I am currently trying to generate a 38 KHz 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 (Iknow 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 38 KHz 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 give 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!

Source Link
traffiq
  • 13
  • 1
  • 3

generating a 38khz signal without timers

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 !