Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : IR Remote
Author | Message | ||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Hi I was wondering if it would be possible to decode the NEC IR remote protocol with the Maximite. There is lots of info on the protocol to found here NEC Protocol The code below works pretty well with PicBasic Pro on a 16f629a @ 4Mhz How would the Pin have to setup on the Maximite ? Counting input or Peroid input maybe Any help or thoughts would be greatly apprecicated Thanks John Main: PULSIN PORTB.1,0,Leader ' leader pulse is ~9mS low-going IF Leader < 850 THEN Main FOR X = 0 TO 31 ' grab 32 incoming pulses PULSIN PORTB.1,1,BtnVal(X) ' now measuring high-going pulse widths NEXT X ' now we'll decode 4 bytes from 32 pulses FOR X = 0 TO 7 ' sort 1st 8 pulses IF BtnVal[X] > 150 THEN ' > 150 x 10uS = > 1.5mS pulse period DByte1.0[X]=1 ELSE DByte1.0[X]=0 ENDIF NEXT X FOR X = 8 TO 15 ' sort 2nd 8 pulses, etc.... IF BtnVal[X] > 150 THEN DByte2.0[X-8]=1 ELSE DByte2.0[X-8]=0 ENDIF NEXT X FOR X = 16 TO 23 IF BtnVal[X] > 150 THEN DByte3.0[X-16]=1 ELSE DByte3.0[X-16]=0 ENDIF NEXT X FOR X = 24 TO 31 IF BtnVal[X] > 150 THEN DByte4.0[X-24]=1 ELSE DByte4.0[X-24]=0 ENDIF NEXT X Lcdout $fe, 2 LCDOUT HEX DByte1, " ", hex DByte2 Lcdout $fe, $c0 lcdout hex DByte3, " ", hex DByte4 PAUSE 200 GOTO Main |
||||
shoebuckle Senior Member Joined: 21/01/2012 Location: AustraliaPosts: 189 |
I have thought of using the Maximite as a controller for time-lapse photography as my Nikon camera has an infra-red remote, but I have no idea of the protocol or what hardware might be necessary. Has anyone tried this? If so, could you post your schematic? Cheers, Hugh |
||||
mookster1 Regular Member Joined: 10/06/2011 Location: New ZealandPosts: 81 |
What I would do is get a pin to time how long the pulses were in both directions (how long a zero was, and how long a one was.) This could then be stored in a file and then used to pulse an IR LED. I'm assuming this is something similar to what you're trying to do? As for using the Maximite as a camera controller, just do lots and lots of research and see what you come up with. If no luck, just try the standard protocols and just play around until something works Hope this helps Capacitance is futile - roll on 2012! |
||||
Print this page |