Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

IR remote question

Status
Not open for further replies.

HarveyH42

Banned
I was kind of wonder about something, kind of simplistic (I hope). Was thinking about building some simple IR ON/OFF modules using Attiny13, and was thinking if I could use a Sony Universal Remote, and teach the receiver a button code. Just don't know if I can store the code in the chip memory, and not lose it when power is lost. I'm hoping the learning function can be done without the programmer hooked up.

Attiny13 data sheet says I have 1k of flash, 64 bytes of EEPROM, and 64 bytes of SRAM. Any chance this might work?
 
Sure, definitly possible,
 
Hey i just ordered a few ATTINY2313's they should be here in about 3 days. I have to rebuild my programmer but when i get it done ima jump in this lol

EEPROM should be perfect. You can store quite a few codes in there. Just make a button used as a keep button. So when you press a button and its the correct one you press the "KEEP" button and it saves to eeprom.
 
The tiny2313 and the tiny13 are not the same chips. The 2313 has twice the flash and eeprom/sram and a significantly different peripheral set. The 2313 has 1 16bit and 1 8bit timer with four channels. The tiny13 only has two 8 bit PWM channels. The 2313 has no ADC, only an analog comparator, where the tiny13 has multiplexed 10bit ADC. Also the tiny13 is an 8 pin chip (mlf packages excluded) where the 2313 is a 20 pin dip (mlf packages excluded)
 
Last edited:
Oh my. This is what I get for typing phonetically =O Corrected. =>
 
I was kind of wonder about something, kind of simplistic (I hope). Was thinking about building some simple IR ON/OFF modules using Attiny13, and was thinking if I could use a Sony Universal Remote, and teach the receiver a button code. Just don't know if I can store the code in the chip memory, and not lose it when power is lost. I'm hoping the learning function can be done without the programmer hooked up.

Attiny13 data sheet says I have 1k of flash, 64 bytes of EEPROM, and 64 bytes of SRAM. Any chance this might work?

Far easier to just build the receiver so it receives a certain Sony code - it's more complicated to make it 'learn' a code, and there seems little reason to want to?.
 
Atom recently posted a thread with some pic code that worked with Sony remotes to turn on and off three LED's. Should be pretty easy to adapt it. At the very least his thread shows how to decode the sony IRC code so you have some place to start with your AVR's.
 
Far easier to just build the receiver so it receives a certain Sony code - it's more complicated to make it 'learn' a code, and there seems little reason to want to?.

Depends, since I don't know the code I'll be using, and I plan on building several of these switches, each needing a seperate code, or in some cases maybe the same. You might be right since I may not be able to save the number, and timing data in 64 bytes. I don't want to use codes that will effect my TV or anything else.

This is also a little intended for people that just want the IR switching from any remote, but don't know a thing about electronics. I have a brother, and a few neighbors who see my little gadgets, and want one. Pretty sure this will be one of those. Will definitely need to do some research on the remote codes. The EEPROM memory doesn't look too bad.
 
You either have to create your own code from scratch and build an IR transmitter to program the Universal remote, or use a remote control from a device you know you'll never have any interference with. The AVR itself can be programmed to recognize virtually any serial transmitted data stream, if you know the format. Rolling your own remote control code should be simple though I'm not sure what the limitation of your universal remote are, then again you have to build an IR transmitter if you want to use a custom code so you may as well use your custom built IR transmitter anyways eliminating the need for the universal remote altogether. You could take an example from the IRDA discovery mode standard which simply sends unmodulated 9600 baud data and uses error detection and a pre-amble packet to avoid confusing random noise with data. Personally I'd go the IRDA type approach, it's as simple as hooking the TX's UART up to an LED and the RX's UART to a photo transistor. The rest is totally done in software and not much different than standard serial communication.
 
Last edited:
Depends, since I don't know the code I'll be using, and I plan on building several of these switches, each needing a seperate code, or in some cases maybe the same. You might be right since I may not be able to save the number, and timing data in 64 bytes. I don't want to use codes that will effect my TV or anything else.

This is also a little intended for people that just want the IR switching from any remote, but don't know a thing about electronics. I have a brother, and a few neighbors who see my little gadgets, and want one. Pretty sure this will be one of those. Will definitely need to do some research on the remote codes. The EEPROM memory doesn't look too bad.

As long as you stick to Sony only, it's quite doable, if you want to use any type of remote it's doubtful you have enough storage space, unless you can invent some scenario for accurately storing any remote signal in very little space.
 
How many bits are typically sent? Since I don't know the code for each button, figured it would be much simple to have the receiver learn the button. I can use most any AVR, just have a bunch of the ATTiny13, and pretty sure it has all the features needed, except memory maybe.

Was hoping to avoid building my own transmitter, or even have yet another remote lying around for the dog to eat (think he's past that stage, but it's only been about two months). Anyway, most any universal remote has a bunch of unused buttons, was hoping to take advantage of that.
 
Atomsoft has an active thread in the forum that uses the SIRC code, including working code.
 
One thing to keep in mind is the fact that most remotes can be programmed to switch a different make of TV/Video. So, a Panasonic remote for a TV can be programmed to work with a Sony video. It's normally programmed by holding down a number key whilst switching it on. By using this feature you can make almost any remote produce Sony codes.

Mike.
 
what i was trying to say earlier was that since im diving into some AVR as well i might be able to help soon. :D

I never said those AVRs were the same. Just stated what i was getting and that i shoul dbe able to help soon!

:D so in a few days ill be up there. Im building me the:

ISP adapter (controlled with COM port) from:
ELM - AVR programmer

Its said to work with AVRDUDE which i here is popular around AVRs.
 
Didn't know you still needed a programmer, I just sent LiquidKernel my last idle AVRISP programmer.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top