my project Capacitive Sensing LED dimmer 12F1822 via PWM


Closed Thread
Results 1 to 40 of 43

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,680


    Did you find this post helpful? Yes | No

    Default Re: my project Capacitive Sensing LED dimmer 12F1822 via PWM

    rather than confuse hecklers fine and working project why not start a new thread that reflects your project and hardware more closely
    say "using multi cap-sense inputs on a pic16f722a" .

    there are many issues with your code starting from the tmr0 setup (prescaler ?) to a 100mS delay in the isr that will interfere with key scanning to such an extent to make success unlikely.

  2. #2
    Join Date
    Apr 2016
    Location
    Mi, USA
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: my project Capacitive Sensing LED dimmer 12F1822 via PWM

    Okay. But if the timer0 source works for Heckler, why won't it work in mine? Everything seems to be working okay, except that I want it to be a single-shot occurrence on the 1/0 button, rather than a continuous loop, as it is for the up/down buttons. I thought the 100mS pause was the period that the count from timer 1 is occurring? Thanks. The reason I posted on Hecklers was because I was hoping to get some input from him.

  3. #3
    Join Date
    Apr 2016
    Location
    Mi, USA
    Posts
    24


    Did you find this post helpful? Yes | No

    Default Re: my project Capacitive Sensing LED dimmer 12F1822 via PWM

    Hello,
    Another one...in your example (PIC12F1822) with the LATA and LATA.0 references, is there a way that I can implement the same function, still using the PIC16F722A device, uisng the B port instead?

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: my project Capacitive Sensing LED dimmer 12F1822 via PWM

    Code:
    ccp1con=12|((PW&3)<<4)
    1. it keeps only the first two bits (Bit 0 and Bit 1) of the PW. Rest bits are set to 0
    2. shifts left by 4 positions
    3. Makes a Bitwise OR with the number 12 (binary 00001100) so to keep te bits 2 and 3 if they are set)
    4. Places the result in ccp1con

    Ioannis

Similar Threads

  1. 16F726 Capacitive sensing module
    By Byte_Butcher in forum General
    Replies: 39
    Last Post: - 15th May 2014, 19:40
  2. Need help setting up Capacitive Sense 12F1822
    By Heckler in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th November 2013, 21:10
  3. Replies: 1
    Last Post: - 6th August 2012, 10:57
  4. Capacitive sensing module on 16f1936
    By grahamg in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th April 2010, 14:17
  5. mTouch capacitive sensing
    By jrprogrammer in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 1st November 2008, 22:54

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts