Hi Rob,
I've tried a few things but it's not as easy as I thought. Simply removing the IR receiver and replacing it with an optocoupler will not work. There's something behind it with no license plates. So I put the case back together and checked with a standard remote. He's working again. End of story : I do need a lib for the normal IR operation. If it can send and receive. I hope you have the time for it. Here is what i have done. I have a very old RC5 reader and on that one the data reeceived is correct, adres and commands. But not on the one i like to use. (as i said above) -- Title: RC5 test -- -- ------------------------------------------------------ -- -- include 16f877a -- target PICmicro -- pragma target clock 20_000_000 -- oscillator frequency -- pragma target OSC HS -- crystal or resonator pragma target WDT DISABLED -- watchdog pragma target DEBUG DISABLED -- no debugging pragma target BROWNOUT DISABLED -- no brownout reset pragma target LVP DISABLED---ENABLED -- low voltage programming -- enable_digital_io() -- make all pins digital I/O -- library with delay procedures include delay alias RC5 is pin_D2 pin_D2_direction = output RC5 = low include delay -- fetch delay library -- procedure HOOG is RC5 = low _usec_delay(889) RC5 = high _usec_delay(889) end procedure procedure LAAG is RC5 = high _usec_delay(889) RC5 = low _usec_delay(889) end procedure procedure BASIS is hoog hoog laag laag laag hoog laag hoog end procedure procedure START_PAUZE is for 10 loop basis hoog hoog laag hoog laag hoog delay_1mS(114) end loop end procedure procedure STOP is for 10 loop basis hoog hoog laag hoog hoog laag delay_1mS(114) end loop end procedure procedure VOLGENDE is for 10 loop basis hoog laag laag laag laag laag delay_1mS(114) end loop end procedure delay_1S(5) forever loop start_pauze delay_1S(2) start_pauze delay_1S(2) start_pauze delay_1S(2) stop delay_1S(2) volgende delay_1S(2) start_pauze delay_1S(2) stop delay_1S(5) end loop Thanks again. regards Hans Op woensdag 16 juni 2021 om 08:04:59 UTC+2 schreef [email protected]: > Hi Hans, > > I understand what you are doing so you do not need the 36 kHz carrier. > That makes it even simpler. In that case you only need a timer to generate > the RC5 bi-phase signal. Will you be able to do that or do you need some > help with that? > > Met vriendelijke groet, > Rob Jansen > ------------------------------ > *From:* [email protected] <[email protected]> on behalf of > hans <[email protected]> > *Sent:* Tuesday, June 15, 2021 9:54:26 PM > *To:* jallib <[email protected]> > *Subject:* Re: [jallib] RC5 lib > > > Hi Rob, > > Thanks for responding, even though you're on vacation. First some more > information. I have a device that I normally operate with push buttons, but > that can also work with RC5 if i connect a Tsop1836 on it, for example. I > also have the codes used for address and commands. So I want to use a Pic > as a transmitter. > > Actually I don't need the whole IR part because I can also connect an > output of the PIC directly to the RC5 input of the device.. I have already > found the information about what the pulse train should look like. > > At least it keeps the gray matter flexible. > > Greetings and have a nice holiday > > Hans > Op dinsdag 15 juni 2021 om 18:31:02 UTC+2 schreef [email protected]: > > Hi Hans, > > Some years ago (in 2014 to be exact) I wrote a decoder routine that is > capable of decoding RC5 and RC6 messages. It works on an interrupt basis. I > wrote two variants, one using Timer 0 and one using Timer 1. I attached the > sources files in the attached zip file. > > I could make a JAL library out of it - since these source files are not > yet Jallib compilant - and make it part of Jallib. I could then incorporate > the timer part in the decoder part so that you only have one library to > include. > > Currently I am enjoying my vacation so I am not able to test them but I > think they work. The main program uses a USART to write the received RC5 or > RC6 message. The UART part is also included in the zip file. > > I could make an RC5 and RC6 encoder program since I have done that in the > past because I have worked at Philips many years ago and was one of the > contributors of the Philips RC6 standard 🙂. As you may know, for the > encoder you need a 36 kHz modulated signal to drive the Infra Red LED so > you need a PWM signal for that. > > Kind regards, > > Rob > > > > > > ------------------------------ > *Van:* [email protected] <[email protected]> namens hans < > [email protected]> > *Verzonden:* dinsdag 15 juni 2021 10:49 > *Aan:* jallib <[email protected]> > *Onderwerp:* [jallib] RC5 lib > > Is there beside the SIRC lib also one for sending/receiving RC5 ? > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jallib/0e2b7ff9-dfde-4d3b-8db2-72e3c50ee21fn%40googlegroups.com > > <https://groups.google.com/d/msgid/jallib/0e2b7ff9-dfde-4d3b-8db2-72e3c50ee21fn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "jallib" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jallib/7bc0ee26-67d2-46ac-bd58-a6d339042326n%40googlegroups.com > > <https://groups.google.com/d/msgid/jallib/7bc0ee26-67d2-46ac-bd58-a6d339042326n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/850931fd-ea4f-45e8-9cd2-80389810ead6n%40googlegroups.com.
