Charlie-plexing


Closed Thread
Results 1 to 40 of 61

Thread: Charlie-plexing

Hybrid View

  1. #1
    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

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,653


    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