Pages: [1]   Go Down
Author Topic: IRAnalyzer output  (Read 1085 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I’m just starting out with Arduino and have some project ideas around using IR remote control (which certainly appears to be a bit of a minefield).  I’m using the IRAnalyzer.pde sketch from the playground to capture the output from my aircon remote control unit.  I haven’t made any material modifications to the code so haven’t bothered to re-paste it, but here is the link:.
http://arduino.cc/playground/Code/InfraredReceivers

It’s working well, it certainly seems to be recording the on/off sequence of the transmitting remote.  My query is around interpreting the output of the sketch, which consists of a time stamp and the transition (0->1 or 1->0).  Am I correct in thinking that each increment in the time stamp (time) variable represents 16 microseconds?

My rationale being as follows, comments is this line:
 
Code:
TCCR1B = 0x03;          // 16MHz clock with prescaler means TCNT1 increments every 4uS
And the times 4 multiplication in this line:
Code:
time = (long) TimerValue[change_count] * 4;
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, ignore my question.  Just had a re-think with a straight brain and now realise that each increment in the time variable that is output represents a microsecond, not 16 as I first thought. Was getting my division vs multiplication mixed up.  The code makes complete sense to me now as well.
Logged

Pages: [1]   Go Up
Jump to: