Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.
 
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: 158
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
 
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: 210
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 :D

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 :)
 
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:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top