Actually sounds like a good project to me Roger. Let us know how you get on. How do you propose to write the data to the PIC once the IR data has been received?
Actually sounds like a good project to me Roger. Let us know how you get on. How do you propose to write the data to the PIC once the IR data has been received?
I tried to do a thing awhile back where I saved the data to an eeprom first, then re-wrote over myself while I was running, take extra special care to keep the region where my 'overwriting' code was located exactly the same between the old and new version of the firmware....but not over an IR link...
Never did get it to work right...
I've taken it the simple way.
According to the PIC's array capacity, I can store 2 arrays of 40 bits information coming from a teaching remote. Every incomming signal is then measured on a timed base and corresponds to a bit. The 40 bits limits is because I never saw an ir pattern sending more than 40 bits of information.
Fourty "HVar(n)" variables get the logic 1 signal and store for how long it stayed like this; then comes the next logic 0 signal ans there again, I measure the time it stays low and stores its result in fourty "LVar(n)". And so on for 39 (n) more variables.
The result is store in the program memory (its access is much faster than a data-eeprom one) with regard to the actual program space (avoid any conflict). I tried to do the same with a data-eeprom but the timing was far too slow.
To send the ir signal, I use a loop calling every eeprom position one-by-one back and pause (wich means the ir led is emitting) as long as needed and go to next bit and do the same.
The rest is just finalizing the ergonomy of the gadget which I'm working on currently.
My prototype works splendid. I could even make usage of it's internal 8MHz clock source and have still a good incoming signal sampling rate.
I schould get some PCB from a manufacturer next week so I'll have a good idea how this remote will work in hands of friends and colleagues.
Today, the remote looks like this:
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2789&stc=1&d=121727970 3">
Roger
Bookmarks