I've been mulling over the idea of using the PICAXE to implement a learning IR remote for some time. And I just had my eureka moment.
I've had a lot of experience with combining a PICAXE with a SPI memory to collect data. The cool thing about SPI memories is that once you initiate a write (or read) you can just keep pumping the clock and data shifts in bit by bit until you tell it to stop.
So... What if you tell the PICAXE you're about to "learn" an IR remote code. This causes the PICAXE to initiate a write into the SPI memory at a particular starting address. Then the PICAXE waits for a transition on the IR input line. As soon as that happens, it starts clocking the SPI memory. If the IR input line is also directly connected to the data input on the SPI memory, then you will be sampling the IR code at regular intervals.
After a certain number of clock cycles, then the PICAXE will stop the write.
To recall the learned code, then the PICAXE initiates a read at a certain starting address and clocks the SPI memory at the same frequency used to record it. With the data output of the memory driving the IR transmit circuit, then the resulting output will be identical to the previously recorded input.
I've had a lot of experience with combining a PICAXE with a SPI memory to collect data. The cool thing about SPI memories is that once you initiate a write (or read) you can just keep pumping the clock and data shifts in bit by bit until you tell it to stop.
So... What if you tell the PICAXE you're about to "learn" an IR remote code. This causes the PICAXE to initiate a write into the SPI memory at a particular starting address. Then the PICAXE waits for a transition on the IR input line. As soon as that happens, it starts clocking the SPI memory. If the IR input line is also directly connected to the data input on the SPI memory, then you will be sampling the IR code at regular intervals.
After a certain number of clock cycles, then the PICAXE will stop the write.
To recall the learned code, then the PICAXE initiates a read at a certain starting address and clocks the SPI memory at the same frequency used to record it. With the data output of the memory driving the IR transmit circuit, then the resulting output will be identical to the previously recorded input.