2 LEDs used Bi-directionally


Results 1 to 15 of 15

Threaded View

  1. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: 2 LEDs used Bi-directionally

    Quote Originally Posted by AvionicsMaster1 View Post
    In regard to the site mentioned in post #1:

    Just to let you know I found the value of the current limiting resistors for the LEDs to be important. Set incorrectly they'd give me ghosting...
    I'm using Darrel's interrupts to control blinking; both on and off duration. Ghosting is not a problem.


    Quote Originally Posted by AvionicsMaster1 View Post
    ...You also have to repeatedly set the TRISIO and the GPIO to get the specific LED or LEDs you want lit. Usually once wasn't good enough...
    I'm testing activating LEDs in bi-directionnal manner now. It's taking me a while 'cause I'm setting it up so the bytes RX from Master will line up with pin order. I'm also learning bit masking; never did that really.


    Quote Originally Posted by AvionicsMaster1 View Post
    ...If you're in need of more than 20mA per pin I successfully used opto-isolators instead of the LEDs. I don't remember the specific part number but I think I posted that link somewhere. If needed I'll find it and reference it here...
    I have MCT6 opto-isolators for now if needed. I don't know if I'll need faster, testing will show.


    Quote Originally Posted by AvionicsMaster1 View Post
    ...I'd also suggest you put a switch in the ICSP clock and data lines to isolate the PIC for programming. It will save you alot of time and effort...
    I simplified matters and dedicate MCLR, PGD, PGC, RX1 and TX1 pins.


    Now I just have to figure my bits:

    Code:
    Port has: 10001001
    Mask is:  10001111
    Desired:  10000110 (bits 7-4 untouched, bits 3-0 reversed)
    I made a truth table using an LCD to show how bitwise operators work. It's just setting up this particular syntax.

    Robert


    UPDATE: Have my bit masking working exsactly like I want it. Thanks everyone.
    Last edited by Demon; - 13th January 2014 at 02:43.

Similar Threads

  1. 32 LEDs with less than 20mA
    By Demon in forum Off Topic
    Replies: 11
    Last Post: - 23rd January 2014, 04:28
  2. Leds on/off
    By Leonardo in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 2nd September 2009, 22:36
  3. Two LEDs on one Pin
    By modifyit in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 6th June 2006, 14:32
  4. 8 Leds
    By leonel in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th June 2005, 23:15
  5. Want some help with LEDs
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 23rd November 2004, 21:46

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