Push Button Sequence

Discussion in 'Homework Help' started by 74266, Sep 3, 2016.

  1. 74266

    Thread Starter Member

    Mar 20, 2016
    41
    0
    Our professor want us to make a sequence machine with timer

    where :
    RB[4-7]-LED
    RD[4-7]-LED

    INPUTS
    INT0 START/STOP
    INT1 SEQ SELECTOR

    DELAY TIMER :TIMER0

    INTERRUPT
    INT0: RISING EDGE,HIGH PRIORITY
    INT1: FALLING EDGE,LOW PRIORITY
    TIMER: HIGH PRIORITY

    Conditions:
    -Single write to the out register(LATB)
    -Seq Generation is at main
    -Seq Selector will work on all mode
    -Stop will pause the current state starting again will only resume the sequence
    -At least 4 sequence
    -Use assembler.asm

    What I am having a problem here is that I cant understand how to use and what is interrupt , high priority, low priority, how to use rising and falling edge in a switch and I am still confuse how to use timer

    Can you at least explain or give an example how to use this ?

    below is the program our prof use to explain how to use a timer
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,377
    494
    74266 likes this.
  3. 74266

    Thread Starter Member

    Mar 20, 2016
    41
    0
    I think this is not for pic18f4550 and for a source file asm
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,500
    2,365
    The source code looks definitely Picmicro you can get more info by going to the Pic site for not only the manual for the Pic, but several app notes with assembly language.
    See the instruction set explanation also for each instruction.
    PIC - Programmable Integrated Circuits: Source Code for PIC
    Max.
     
    74266 likes this.
  5. 74266

    Thread Starter Member

    Mar 20, 2016
    41
    0
    I already get how to make rb0-rb1 a edge triggered but I still dont understand how will I PUT The 4 Sequences @ MAIN?

    and in the previous program I post I dont know why do you need to use RETFIE FAST
    and when you DECLARE RETURN where will it return?
     
  6. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,671
    899
    The datasheet describes interrupts in Chapter 9. Priorities, edges, and so forth are controlled by those registers discussed.

    John
     
  7. 74266

    Thread Starter Member

    Mar 20, 2016
    41
    0
    can you please check if this correct this is only for SEQUENCE SELECTOR
     
  8. 74266

    Thread Starter Member

    Mar 20, 2016
    41
    0
    I tried it in my board but it is not even blinking
     
Loading...