Search Results - MEL PICBASIC Forum


Search:

Type: Posts; User: richard; Keyword(s):

Search: Search took 0.01 seconds.

  1. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    Logical operators are not bitwise operators
    | does a bitwise OR
    OR does a Logical OR

    2 | 3 = 7
    2 OR 3 = ! 0 [ not nothing ]
  2. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    .


    NOT sure about that , this is what the book says





    i_term=0
  3. Replies
    59
    Views
    80,992

    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
  4. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    TRISB = $f0|tmp the $f0 masks off the upper 4 bits [ this was to ensure other pins are not set to o/p by mistake

    if you need to make portb.4 an output the
    mask becomes $e0
    TRISB = $e0|tmp ...
  5. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    I probably could have phrased that better , the code does only support 12 leds . the idea was to get a feel about led brightness and flicker
    to see if a 64 led version was worth the effort.
    when...
  6. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    yes the tris and port columns are binary 0b1100=0xC = 12 or pbp parlance %1100=$c=12

    this is where i was heading for the led cube , current irq rate is 1000 Hz to drive 64 leds that needs to...
  7. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    yes t and p are tris and port in decimal form for us humans

    i can't run your code exactly my setup is wired differently to yours and different to my drawing too it appears
    hence my...
  8. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    led 11 failed cause i had a typo and did not convert from my setup to yours properly , sorry




    '****************************************************************
    '* Name : charlieplex.pbp ...
  9. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    by using multiplexing you can " light' any or even all the leds its all about persistence of vision

    to light them all

    mainloop:

    for led=0 to 11
    lookup...
  10. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    i see the problem

    TRISA = %11110100 == bad
    you can only light 1 led at a time , only two pins can be outputs at any one time (one high one low) the others need to be in a high impedence...
  11. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    NOT ALL PICS ARE EQUAL , some study of the data sheet is always reccomended

    your code is posted in Quote tags not code tags [#]


    try this for a 16f84a


    ...
  12. Replies
    59
    Views
    80,992

    Re: Charlie-plexing

    without a schematic its a bit difficult to intrepret whats going on in your code

    wired like this , i made a table on whats needed to light each led
    here is an example for a pic16f1825 to light...
Results 1 to 12 of 12