Truth Tables in PBP


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: Truth Tables in PBP

    OK, Ive been thinking (with the aid of a glass of Rye.....) and I was wondering with my re-newed knowledge of arrays if the following would work:
    1. Have built the truth table - works.
    2. Found that there are 'conditionals' within the truth table.
    3. What if (new thought here) that a bit or flag is set in the timing section which turns on or activates another section of table!?
    4. In my example (I will flesh out the table in the AM) that input 9 or 11 are the timed events. If I set a flag which I can add to the base address of 4 bits (a 5th) and use the newly addressed table for the 2 conditionals!!??
    OK, I don't know yet how to do this but tomorrow I will try several trys at this......
    Thoughts?
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  2. #2
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Truth Tables in PBP

    Quote Originally Posted by ecoli-557 View Post
    OK, Ive been thinking (with the aid of a glass of Rye.....) and I was wondering with my re-newed knowledge of arrays if the following would work:
    1. Have built the truth table - works.
    2. Found that there are 'conditionals' within the truth table.
    3. What if (new thought here) that a bit or flag is set in the timing section which turns on or activates another section of table!?
    4. In my example (I will flesh out the table in the AM) that input 9 or 11 are the timed events. If I set a flag which I can add to the base address of 4 bits (a 5th) and use the newly addressed table for the 2 conditionals!!??
    OK, I don't know yet how to do this but tomorrow I will try several trys at this......
    Thoughts?
    Good thinking! Maybe I should try Rye.

    Obviously you could use all of the upper nibble as flags giving four sets of special cases if you set them as individual bits. By using the upper nibble as a value then fifteen special cases would be available.

    One complication, there is always at least one,

    TableIn=PORTA & %00110011

    TableIn is reset every time and the bits are manipulated. Obviously there is a workaround. More thinking is required, or Rye?

  3. #3
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: Truth Tables in PBP

    Ha! Clearly more of BOTH would be encouraged.......
    I'm re-making the truth table with the conditionals. I've always been better at diagramming and such - I'm sure a pattern may arise.
    Once I have the new 'map' I'll see what I can do.
    As far as TableIn=PORTA & %00110011, The dirty little secret DT showed me may come in handy for the INPUTS as well as it has for the OUTPUTS.
    The 'trick' is that the IO is sequential in the memory map, so, just set the base address:
    SYMBOL IN_PORT_PIN=PORTA ' starting address
    for x=0 to 4 'only 5 inputs for this chip
    IN_PORT_PIN.0=[x]
    next x

    OR just use alias - but that does 'bloat' the code......
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  4. #4
    Join Date
    Sep 2007
    Location
    Waco, Texas
    Posts
    151


    Did you find this post helpful? Yes | No

    Default Re: Truth Tables in PBP

    OK-
    I've worked on this for a bit (no pun) and now I am finding out what the 'conditionals' are are actually edge-triggered events.
    I have code which works using flags and if-then-endif style, but my real question is does DT's Instant Interrupts work not only on level conditions - but also for edge level??
    I have gone to his page and looked it over, but I do not see any reference to edge-level interrupts.
    Should I now start a new thread?
    "If we knew what we were doing, it wouldn't be called research"
    - Albert Einstein

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,605


    Did you find this post helpful? Yes | No

    Default Re: Truth Tables in PBP

    Hi,
    As far as I know all interrupts are edge triggered or "event triggered" if you will.
    Edge on input, mismatch on IOC pins, timer overflowing, byte in UART RX buffer, ADC finished etc.

    If you set the interrupt up to fire on the rising edge it will fire on the rising edge. If you then service the interrupt and clear the interrupt flag (which DT-INTS handles for you if you tell it to) it will NOT keep firing until there's a new rising edge on the input.

    What interrupt are you thinking of using that you thing may be "level triggered"?

    /Henrik.

Similar Threads

  1. tables using PBP and asm command retlw
    By queenidog in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th June 2012, 22:47
  2. Help with two lookup tables?
    By awdgsx in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th February 2012, 09:13
  3. Help with look up tables please
    By opticaltrigger in forum mel PIC BASIC
    Replies: 3
    Last Post: - 19th June 2010, 01:54
  4. Re:The Truth about Chernobyl Via Melanie
    By emmett brown in forum Off Topic
    Replies: 1
    Last Post: - 15th August 2006, 08:25
  5. Truth Tables
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th April 2005, 17:35

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