Sony Infared Code in C18

Status
Not open for further replies.
I personally think there is some issue with the transmitter. It sends the same pulses if i send command
SendSIRC(1,1) and SendSIRC(1,3) and SendSIRC(1,5) ... all odd commands
and also sends same pulses for all even commands such as
SendSIRC(1,0) and SendSIRC(1,2) and SendSIRC(1,4) ...

Checked it on oscilloscope.
 
you do know that when you use that keypad the numbers that they send are different like when you press #1 it sends a 0111 (DECIMAL 7)
 
Its like from left to right top to bottom 0x00 to 0x0F... meaning

+ = 0
= = 1
0 = 2
C = 3

- = 4
3 = 5
2 = 6
1 = 7

X = 8
6 = 9
5 = 10
4 = 11

/ (DIVIDE) = 12
9 = 13
8 = 14
7 = 15

anyway i decided not to change it ill post code now
 
Last edited:
Here you go i edited the send out part in transmit to send out 0-F as the command and device #1....

The issue was simple really the code was shifting the bits wrong... i guess i should fix that lol
 

Attachments

  • Project_IR.zip
    502.9 KB · Views: 160
sorry Atom for not replying. I was out for dinner and took a long while due to saturday rush lol.

I will test it out right now and update the status. Also where should i change the code in order for it to work with 4MHz oscillator? I have tried increasing the delays to double and also reducing them to half.. couldn't get the 8MHz system to work with 4MHz.
 
lol, couldnt test it so far. The proteus file wont open. It says that you (Atom) have latest Proteus version

Will revert the file and test again.

P.S: Just curious which version of Proteus do you have ?
 
Version 7.6.... You can just use your DSN file and use my code.. Like copy your Proteus file over mines. and open your and it should still work since it just needed the new code/hex file
 
Here you go... its called NewOld since its new code old isis file heh
 

Attachments

  • Project_IR_newOld.zip
    498.4 KB · Views: 245
Yeah dude thanks, it works!!!

I have seen the changes you made.. I actually tested the >> shift for Cmd, not for Dev. Maybe thats why it didnt work.

Any clue how to make it work for 4MHz?

Will check out the latest version of Proteus in a few mins.
 
to make it work on 4mhz is simple.... just cut delays in half... heh like you said before... remember for 4MHZ its

1 CYCLE = 1 US

so its tricky... try to delay less... ill try it in a minute and post what i can
 
4MHZ with Proteus here....

Let me thank you tho... i never knew how to use that IR for proteus until you posted this heh...
 

Attachments

  • Project_IR_4MHZ.zip
    503.7 KB · Views: 211
Let me thank you tho... i never knew how to use that IR for proteus until you posted this heh...

Thank you so very much for helping

Lol its my first time too Actually its my first month with PIC MCU, earlier i had interfaced 8051 with RC5 (Philiphs protocol) but it was not simulation based and was in assembly (which i dont like that much).

You should look into RC5 aswell, and since you are a code genius, you will be able to translate it quite easily into your own libraries.

P.S: The new Proteus version is awesome
 
yEAH HEH

Can you send me some links on RC5? And your welcome.... You are a great learning for being a starter... good job dude!!
 
Cool ! thanks ill take a look at it... Since i dont have a 36khz part i guess i can only simulate it for now... Ill order some to make some actual devices with...

Thank again
 
hmmm, i actually used it with 38Khz part my self and it worked.

As you can see in the last link i posted (the one from 8051projects), the image contains TSOP1738 .. here the 38 means 38Khz.

I think it should work if you have a 38Khz receiver
 
Last edited:
COOL! heh i guess theres only one way to check heh. Ill see if i can make code tomorrow.. heh its 10:40PM here and im so tired...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…