Hi all.
Previously I had just managed to get NEC IR codes working on an 18M2 using the Pause command. Although this worked it wasn't as reliable as I wanted. So I switched to the PauseUS function, however this failed to work.
I don't have any means of finding out why this wasn't working other than testing the output times using other PicAxes, but I could have purchased software to connect to my mic input on my computer or purchased hardware for this.
I found that the PauseUS time, when overclocked to 32 mHz, wasn't pausing at the times I was expecting.
I found that there's a very rough rule of thumb is as follows:
Get the time that you want to pause by, divide by 1.25 then minus 176. For instance, if you want to pause for 500 μs then:
Value = 500 / 1.25 - 176
= 400 - 176
= 224
This means that no value below 176 are not possible, however, from what I've found the values aren't reliable below about 200 μs.
I've attached a document with some analysis. I've structured it a bit like a scientific report but please don't think that this is in any way scientific. I didn't do "significance" tests, confidence intervals or anything actually scientific. I structured this way so I could repeat it later and so that it would still make sense when I re-read it in the future. However, the graphs are interesting.
Using the rule of thumb, then testing and adjusting through interpolation I got values very close to the NEC standard and the remote control signal now works reliably every time.
Previously I had just managed to get NEC IR codes working on an 18M2 using the Pause command. Although this worked it wasn't as reliable as I wanted. So I switched to the PauseUS function, however this failed to work.
I don't have any means of finding out why this wasn't working other than testing the output times using other PicAxes, but I could have purchased software to connect to my mic input on my computer or purchased hardware for this.
I found that the PauseUS time, when overclocked to 32 mHz, wasn't pausing at the times I was expecting.
I found that there's a very rough rule of thumb is as follows:
Get the time that you want to pause by, divide by 1.25 then minus 176. For instance, if you want to pause for 500 μs then:
Value = 500 / 1.25 - 176
= 400 - 176
= 224
This means that no value below 176 are not possible, however, from what I've found the values aren't reliable below about 200 μs.
I've attached a document with some analysis. I've structured it a bit like a scientific report but please don't think that this is in any way scientific. I didn't do "significance" tests, confidence intervals or anything actually scientific. I structured this way so I could repeat it later and so that it would still make sense when I re-read it in the future. However, the graphs are interesting.
Using the rule of thumb, then testing and adjusting through interpolation I got values very close to the NEC standard and the remote control signal now works reliably every time.
Attachments
-
65.5 KB Views: 47