Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is this code correct?

Status
Not open for further replies.
Joined
Dec 4, 2012
Messages
4,294
Helped
822
Reputation
1,654
Reaction score
793
Trophy points
1,393
Location
Bangalore, India
Activity points
0
Is this code correct? I am using PWM of 38 KHz to generate IR bursts and sending some data. I am attaching mikroC Project files + Proteus file + DSO output. Is the working correct. I want to make it sure so that I can implement it using PWM and Timer. I am using SIRC Protocal mentioned here. https://www.sbprojects.com/knowledge/ir/sirc.php

97833d1382950326-ir.png
 

Attachments

  • mikroC PRO IR.rar
    82.8 KB · Views: 6
  • ir.png
    ir.png
    12.2 KB · Views: 31

Venkadesh_M

Advanced Member level 4
Joined
Jun 26, 2013
Messages
1,375
Helped
258
Reputation
516
Reaction score
254
Trophy points
83
Location
Coimbatore, India
Activity points
6,738
Hi just looked at the protocol and your DSO output, I am considering long width of bursts are high and small widths are low, The problem in your output is It remains high between some of the output bursts....

ir.png
 

Joined
Dec 4, 2012
Messages
4,294
Helped
822
Reputation
1,654
Reaction score
793
Trophy points
1,393
Location
Bangalore, India
Activity points
0
It is because of the last state of the PWM signal. I will try turning of the CCP1 pin.

Edit: Fixed. I just added a pull down resistor to CCP1 pin.

97837d1382952753-ir2.png
 

Attachments

  • ir2.png
    ir2.png
    9.7 KB · Views: 28
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top