A less Cumbersome way of manipulating several LEDS?


Results 1 to 16 of 16

Threaded View

  1. #6
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Virtual Ports

    Hi Darrel,

    That's fantastic (ie two pins handled as one virtual pin...I'm figuring that the maximum number of Virtual Port bits is 8? if so, wouldn't you just know that I have 9 LEDs!)

    re VirtualPort and the TRISC settings ...hmm, maybe I can't use your funky routine after all - one thing I observed when using the HIGH/LOW command, was excessive audible clicking attributed to the port.pin switching state (I work with low level guitar signals, which often pass in close proximity to a PIC, guitar signals often get treated with enormous gain so I'm perhaps more aware/sensitive to such clicks than others!) The only way I was able to stop such clicking was to to use TRISC command instead of the high/low command, for example, this would result in clicking....

    TRISC.6 = 0
    HIGH PORTC.6

    whereas this doesn't...

    PortC.6 = 1
    TRISC.6 = 0

    ....whacky. (so to turn an LED on/off, I don't use high/low, but just set the pin as output or input)
    Last edited by HankMcSpank; - 1st September 2011 at 23:10.

Members who have read this thread : 0

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