Charlie-plexing


Closed Thread
Results 1 to 40 of 61

Thread: Charlie-plexing

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    As I study what is clearly an amazing example, many thoughts come to mind...

    "There is only one step from the sublime to the ridiculous." - Napoleon Bonaparte.

    Stay tuned for Robert's forthcoming book: "Burglary with a Light Show"

    A subtitle: Redundancy in redundant lighting systems .

    While I jest, I do so in fun. I am... I search for an adjective... somehow "flabbergasted" seems appropriate. You are controlling nearly what could be, an entire string of holiday lights, with 10 pins!

    Thanks for sharing!

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    And the real beauty is that unlike multiplexing you don't have to constantly service the array just set the inputs and outputs and write once to the outputs. Good example Demon.

    George

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Congratulate me once I get mine working. LOL

    Robert

  4. #4
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Hi Robert - a couple questions / thoughts....
    I think you have too many resistors. With the original Charlie-plexing, there should be one current limiter per pin, not per diode, since some combinations rely on the forward volt drop of a diode to keep two others from coming on. I think what you did will work, but once you get beyond 3 pins, you may start having different intensities of LEDs. It would certainly save you some components to go per pin rather than per LED pair.
    Do the red and green diodes have the same volt drop? Green is usually about double red, so there will be still more challenges. Is it your intent that something is green or red, but never off unless broken? I think that might be difficult to do too. The array will need to be constantly scanned if more than one led should be on at any given time. But you'll want to do that to save power, anyway.
    Have you done a big truth table to see what happens for each combination? You'll need that to write the code anyway, but it might save you a lot of work. I don't think this is something that can be tested in a simulator easily since it depends on analogue effects.
    Anyway, very cool approach if you can work around those limitations!

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Charlie! We were just talking about you.

    Quote Originally Posted by Charlie View Post
    Hi Robert - a couple questions / thoughts....
    I think you have too many resistors. With the original Charlie-plexing, there should be one current limiter per pin, not per diode, since some combinations rely on the forward volt drop of a diode to keep two others from coming on. I think what you did will work, but once you get beyond 3 pins, you may start having different intensities of LEDs. It would certainly save you some components to go per pin rather than per LED pair.
    Many LEDs on the same pin may be on, but only a single LED per pair can be lit.

    The tri-state properties of a pin control which LED is lit, not forward voltage drop. See Tip #2 in the Microchip PDF.

    LED intensity is not supposed to vary depending on active LEDs.

    Do the red and green diodes have the same volt drop? Green is usually about double red, so there will be still more challenges.
    Probably not, the LEDs I have in stock do not have identical properties. But they are close enough for personal use. I am compensating by using different light intensities; ie: I have varying intensities of LEDs for the same colour. Bulk purchases so I don't have specs.

    Is it your intent that something is green or red, but never off unless broken? I think that might be difficult to do too.
    I don't understand.

    The array will need to be constantly scanned if more than one led should be on at any given time. But you'll want to do that to save power, anyway.
    Yes, definitely scanning to save current.

    Have you done a big truth table to see what happens for each combination? You'll need that to write the code anyway, but it might save you a lot of work.
    Next on my TO-DO list.

    I don't think this is something that can be tested in a simulator easily since it depends on analogue effects.
    Anyway, very cool approach if you can work around those limitations!
    Yes it can be tested, this is digital only. But I don't have Proteus.

    Robert

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Here one I made earlier
    Name:  Xylon.gif
Views: 12336
Size:  210.2 KB

    Actually simulated, it's the display of a tidal state indicator that one day I'll get round to building. The Xylon effect is just to test all bits with the two elements separate.

    George

    N2 does work, just a slightly dodgy GIF
    Last edited by towlerg; - 14th December 2014 at 19:16.

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Quote Originally Posted by towlerg View Post
    ...Actually simulated, it's the display of a tidal state indicator that one day I'll get round to building. The Xylon effect is just to test all bits with the two elements separate.

    George
    Either you messed up recording your GIF, or there's a bug in the top row.

    And it's Cylon.

    Robert



    EDIT: It might also be an Internet Explorer thing, I'm still on XP on my laptop.
    Last edited by Demon; - 14th December 2014 at 20:14.

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Charlie, about the red-or-green-or-broken question. I can light the red, green or nothing at all if I wish (which is possible in this application).

    I am powering only one pin at a time. Due to the interconnections on the matrix, applying power to more than one pin will have undesired results.

    Pass 1:
    "1" on pin 1, "0" on pin 2, Input remaining pins lights the top left red LED.

    Pass 2:
    "1" on pin 4, "0" on pin 3, Input remaining pins lights the top green LED between pins 3 and 4.

    But...

    Pass 3:
    "1" on pin 1, "0" on pin 2,
    "1" on pin 4, "0" on pin 3, Input remaining pins lights the top left red LED and the top green LED between pins 3 and 4,
    but it also lights
    a red LED between pins 1 and 3 and
    a green LED between pins 4 and 2
    since those circuits are also completed unintentionally.

    Robert

  9. #9
    Join Date
    Jun 2016
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Hi Richard
    Thank you for the information, seems I have a lot to learn.
    I have been reading up on Bitwise in the PBP Compiler Ref manual.
    Can't find out how to type in the OR operator, doesn't appear to be on my keyboard.
    Anyway I'll keep on reading and see if I can make sense of it.
    Regards
    Jim

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Jim,

    If you can't type | using SHIFT, go through again with ALT.

    Edit: or come here and COPY the character and then PASTE it in your code.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Quote Originally Posted by Charlie View Post
    Hi Robert - a couple questions / thoughts....
    I think you have too many resistors. With the original Charlie-plexing, there should be one current limiter per pin, not per diode, since some combinations rely on the forward volt drop of a diode to keep two others from coming on. I think what you did will work, but once you get beyond 3 pins, you may start having different intensities of LEDs. It would certainly save you some components to go per pin rather than per LED pair.
    ...
    Aaaaaaaand I think this just came back to bite me. LOL

    Robert

  12. #12
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Hi Robert,
    This article explains what I was trying to tell you about analog vs digital effects: http://www.instructables.com/id/Char...s--The-theory/
    The Microchip article is a quick example, but not true Charlie-plexing, and it doesn't scale up nicely.

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Ah perception, what a wonderful thing. When I said digital I meant the logic, and when you said analog you meant the properties of the LED. LOL

    I had found that article on google but didn't see anything new at first glance and moved on. It's really a few pages deep that it gets into the meat of the matter. Excellent article though, explained everything so clearly.

    I especially appreciate how he discusses making a pin input disables it. I never understood "high impedance state". It's simple, it impedes, like that 10M resistor he has on his schematic of the input pin.

    It also explains why I couldn't get a decent reading on my Saleae probe; current DOES flow through the unwanted LEDs. It's just that they don't get enough current to light up; hence the importance of forward voltage drop you mentionned (he explains that clearly). It's nice understanding what's going on.

    No ghosting with 200usec delay:


    No pauses:


    Robert
    Last edited by Demon; - 15th December 2014 at 19:23.

  14. #14
    Join Date
    Jun 2016
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Hello [insert user name ],
    You can disagree with someone's opinions, but calling that person an idiot or a profane name is a violation of our forum etiquette. Some forums are more liberal about this than others, but keeping it civil is never the wrong thing to do.

    Posting the same thing over and over again is called scrolling, and is also a banning offense. It is annoying in the extreme and it is entirely unnecessary, please refrain from further activity of that nature or risk a ban from this forum.DATA sheets are your friend.
    Please read the chips DATA sheet and make it happy You are in breach of the forums rules.

    Your recent post [insert post ref] breached the rules because [insert reason]

    This warning has been noted. We operate a three strike policy, however enforcement is at the admin / moderator discretion, in all respects our decision is final.

    Further warnings will result in suspension of the service to you.Please start a thread in the appropriate forum for detailed technical help. This is just a chat box, your post will disappear quickly.We accept that the vast majority of our forum members follow general forum etiquette.

    Forum etiquette means maintaining a standard of posting behavior that is acceptable and appropriate. Forum etiquette can be flexible, according to the subject of the forum, but there are certain standards most people expect others to maintain. Some lines must be drawn for the safety of all posting on the forum.

    You may disagree with someone's opinions, but calling that person an idiot is a violation of forum etiquette.

    Posting the same thing over and over again is called scrolling, and is also a violation of forum etiquette.

    Trolls enjoy disturbing the peace. Trolls tend to call names, gossip about other posters, post things that are deliberately provocative and usually violate the forum's rules about posting. Don't become a Troll.

    Another violation of forum etiquette is posting in ALL CAPS. This is considered shouting and is very rude.

    Flaming, or deliberate insults or personal rants, are also against forum etiquette. Flaming is often employed by people who are losing arguments on a forum. Their response is to personally insult the poster disagreeing with them, usually in a long, nasty post. The veil of anonymity seems to bring out the worst in these people, and any bullying tendencies they have tend to become magnified in the semi-protection given by the anonymity provided on a forum.

    Forum etiquette involves using the Golden Rule: treat others as you would like to be treated.

    Behaving as a reasonable adult, even in the face of being flamed, is always the best course of action. If a poster becomes harassing, obscene or personal, do not retaliate. Instead, report it to the moderators or forum administrators.

    Here we set out the basic rules that we use when managing the forum. By using the forum, you agree to abide by these rules and the decision of the administrators and moderators.

    General Forum Use
    • Do NOT make the same post in multiple forums. Moderators will remove multiple posts and you will receive an infraction for doing so.
    • The User Infraction system is designed to automate the management of misbehaving users. When a user reaches pre-determined number of infractions, the user permissions may be restricted.
    • Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to an infraction, followed by a BAN.
    • Members are asked to not act as “back seat moderators”. If members note an issue which contravenes something in this policy document they are welcome to bring it to the attention of a moderator.
    • Members should remember this board is aimed at a general audience. Posting pornographic or generally offensive text, images, links, etc. will not be tolerated and will lead to a BAN.
    • Members are asked to respect the copyright of other users, sites, media, etc. Users linking to or asking for information on warez, crackz, etc. or re-printing material without permission will receive an infraction and their post will be removed. Blatant abuse and links to warez may result in an instant BAN.
    • Members are asked only to post in English, as this is an English speaking community.
    • Members should post in a way which is consistent with "normal writing". That is users should not post excessive numbers of emoticons, large, small or coloured text, etc. Similarly users should not SHOUT by writing in upper case or use excessive punctuation (e.g. ! and ?) in topic titles or posts. Users consistently abusing this will receive an infraction.
    • Members should use an appropriate, descriptive subject when posting a new topic. Examples of bad subjects include; "Help me!", "I'm stuck!", "I've got an error!" etc.
    • Members are welcome to use the test forum for general "test purposes". These may include checking signatures, testing a link or image, etc. (subject to previous points on decency, warez, etc.).
    • Spam is not tolerated here under any circumstance. This includes offering hosting services (charged and free), installation services, solicitation etc. Users posting 'SPAM' will be banned.
    • The moderators may edit, remove or put on moderation queue any post at any time. Please note that currently any very first post by a new user is automatically placed in the moderation queue and will be approved/disapproved according to the present Rules. The determination of what is construed as indecent, vulgar, spam, etc. as noted in these points is up to the admins and moderators, NOT the users.
    • The above forum rules where applicable also apply to private messaging. Abuse of the private messaging system may lead to an infraction and/or the revocation of private messaging facilities.

    Signatures
    • Signatures containing an image may also include one line of small size text.
    • Animated images are not allowed.
    • Links in signatures are permitted to a maximum of four unique pages or sites. Such links may only be to relevant or moderator approved material. Links to sites may be commercial in nature. You may not include links in a way which suggests you offer official support, software, etc. for Crownhill Products. You may not link to warez, porn, racist or other similar hate sites. Links are included in signature size limits.
    • Users abusing these rules will receive an infraction, their signature will be removed and repeated abuse will result in a BAN.

    Policing
    • Arguing with moderators or admins after having received an infraction or warning will lead to an immediate additional infraction and ultimately a BAN.
    • Users who feel they have been unfairly warned may contact an admin with their complaint. The admin's decision is final.
    • Any attempt to circumvent a temporary ban or other moderator action will lead to a permanent ban of your account(s). Circumvention includes re-registering or using an already registered account under a non-banned username. Other examples include changing IP addresses, using a new email account or other action that can be taken to evade moderator action to hide your identity as the owner of the sanctioned account.
    • An exception to the three strike rule applies when users contact team members personally (via any method) and post insulting, indecent or vulgar material. Such users may be subject to an immediate permanent BAN.
    • Permanent bans are a last resort and thought is given before implementing them.

  15. #15
    Join Date
    Jun 2016
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    It seems I went off Topic?

  16. #16
    Join Date
    Jun 2016
    Posts
    19


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    Hi Richard
    Thanks again for some great information.
    Got the 20 Leds working fine. Tried the pauseus 1200 in the code and they are very dim with 100 ohm resistors.
    Found out that in the tris values where you have a pair you leave both alone if the port.4 (16) is involved.
    I have been looking through the PBP compiler manual but can not find any reference to the $e0 or the $f0.
    Does the $e0 remove the mask from all the upper 4 bits? and are there any more masking commands?
    I am thinking of doing a 30 led charlieplex, I have the layout for it.
    They are just on a breadboard at the moment and until I can design a good pattern that is where they will stay.
    I would like to know more about your last code set but I think I will need to wait until I upgrade and get a 16f1825 pic.
    Regards
    Jim

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


    Did you find this post helpful? Yes | No

    Default Re: Charlie-plexing

    $e0 = binary 11100000
    $f0 = bin 11110000

    logical function AND (&) goes like this

    a b a&b
    0 0 0
    0 1 0
    1 0 0
    1 1 1

    logical bitwise function OR (|) goes like this
    a b a&b
    0 0 0
    0 1 1
    1 0 1
    1 1 1

    masking clearing and setting bit/s in a var can be accomplished this way

    eg if a = %11111111 (255 or $ff)

    then a&$e0= %11100000

    then a | 12 = %11101100

    see bitwise in book
    Warning I'm not a teacher

Members who have read this thread : 2

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