Continue to Site

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.
Advanced Member level 6
Joined
Dec 4, 2012
Messages
4,280
Helped
822
Reputation
1,654
Reaction score
791
Trophy points
1,393
Location
Bangalore, India
Visit site
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: 63
  • ir.png
    ir.png
    12.2 KB · Views: 114

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
 

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: 95
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top