Giter VIP home page Giter VIP logo

Comments (2)

cyborg5 avatar cyborg5 commented on August 11, 2024

I'm a bit embarrassed to admit that the hardware specific parts of the code are almost beyond my understanding. They are a slightly rearranged version of the code from Ken Shirriff's IRremote library. The code involves manipulating hardware registers to set up a specialized frequency adjustable PWM using hardware timers. You can look at IRLibProtocols/IRLibHardware.h at about line number 174 assuming you're using the default TIMER2 and see if you can figure out what you need to do. The value IR_SEND_PWM_START turns on the modulated signal and IR_SEND_PWM_STOP turns it all off but I'm not sure how you get the start version to conclude with the pin high unless you just stuck in your statement like digitalWrite(pin, HIGH). You might do better to use the bit-bang version of sending which starts at line 148. Just reverse the high and low statements in the digitalWrite commands. I'm assuming you're not using any kind of driver circuit because you said your board space was extremely tight. If you are using a transistor to drive the LED you could reverse the logic by substituting PNP instead of NPN.

from irlib2.

supuflounder avatar supuflounder commented on August 11, 2024

Thanks for the reply. I looked at that bit-bang code, and I have not
programmed that close to the metal in decades, and didn't want to attempt
it on an unfamiliar architecture (I, who used to write chained
channel-command words (CCWs) on IBM mainframes, and manipulate the bits in
the I/O controllers from the original 8088 PC through the 80386). I can
probably figure it out, given enough time, but time is in short supply as
we have an Oct 31 deadline. Because the IR path will be under three feet,
and possibly as little as 3 inches, power was not a primary concern,
hence, the decision to drive the IR emitter directly from the processor.

The tiny board size we have (two single-sided boards, 1" diameter and
including battery, 5/8" high), being able to reduce from four components
to one component matters, thus the desirability of the dual-emitter unit.
If only they made a common-cathode version!
Joe

I'm a bit embarrassed to admit that the hardware specific parts of the
code are almost beyond my understanding. They are a slightly rearranged
version of the code from Ken Shirriff's IRremote library. The code
involves manipulating hardware registers to set up a specialized frequency
adjustable PWM using hardware timers. You can look at
IRLibProtocols/IRLibHardware.h at about line number 174 assuming you're
using the default TIMER2 and see if you can figure out what you need to
do. The value IR_SEND_PWM_START turns on the modulated signal and
IR_SEND_PWM_STOP turns it all off but I'm not sure how you get the start
version to conclude with the pin high unless you just stuck in your
statement like digitalWrite(pin, HIGH). You might do better to use the
bit-bang version of sending which starts at line 148. Just reverse the
high and low statements in the digitalWrite commands. I'm assuming you're
not using any kind of driver circuit because you said your board space was
extremely tight. If you are using a transistor to drive the LED you could
reverse the logic by substituting PNP instead of NPN.

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#7 (comment)

from irlib2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.