Time interrupt problem


Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    May 2005
    Posts
    70

    Default Time interrupt problem

    I got problem with time interrupt not work ....

    How have known rule of time interrupt function pls advise, due to we found probble after we add more code on interrut sub and program will not work after run, But can done complier with out error.

    here sample working :Portb.5 will flash after run.

    OPTION_REG = $57 '57 Set TMR0 configuration
    INTCON = $A0 ' Enable TMR0 interrupts

    ON INTERRUPT GOTO INT

    Main:
    TMR0 = 0
    Gosub check_Lstatus
    Strobe = 1'strobe off
    latch = 1'lactch off
    clock = 1'CLOCK OFF ACTIVE HIGH
    Sin3 = 0
    Sin2 = 0
    SIN1 = 0
    goto loop
    ...
    ....
    ...
    disable
    INT:
    INTCON.2 = 0
    TMR0 = 0
    'HSEROUT ["n1 ",dec n,13,10]
    TOGGLE PORTB.5

    resume
    enable

    But not work if we add some more code below to replace or below " toggle portb.5"

    =======

    disable
    INT:
    INTCON.2 = 0
    TMR0 = 0
    'HSEROUT ["n1 ",dec n,13,10]
    TOGGLE PORTB.5
    FOR K = 0 TO 2
    READ (FONT1+K),COLUM2
    READ (FONT2+K),COLUM0
    READ (SCANROW0+K),ROW0

    GOSUB SCANDATASIN8BITLOWBYTE

    READ (FONT0+K),COLUM3
    READ (FONT1+K),COLUM1
    READ (SCANROW1+K),ROW1

    GOSUB SCANDATASIN8BITHIGHBYTE

    LATCH = 0
    LATCH = 1
    STROBE = 0
    STROBE = 1

    next k

    FOR K = 8 TO 10
    READ (FONT1+K),COLUM2
    READ (FONT2+K),COLUM0
    READ (SCANROW0+K),ROW0

    GOSUB SCANDATASIN8BITLOWBYTE

    READ (FONT0+K),COLUM3
    READ (FONT1+K),COLUM1
    READ (SCANROW1+K),ROW1

    GOSUB SCANDATASIN8BITHIGHBYTE

    LATCH = 0
    LATCH = 1
    STROBE = 0
    STROBE = 1

    NEXT K
    resume
    enable
    ============


    Who have pls advise too .. thank you

    Pls see full code on attached file.
    Attached Files Attached Files

Similar Threads

  1. INT interrupt problem
    By netstranger.nz in forum General
    Replies: 5
    Last Post: - 13th October 2009, 07:52
  2. Instant interrupt problem (very strange)
    By yusoweird in forum General
    Replies: 2
    Last Post: - 31st October 2006, 16:15
  3. Time Interrupt problem
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th February 2006, 23:49
  4. Interrupt?? problem
    By scorpion in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th July 2005, 04:14
  5. Interrupt and Time Out
    By Tissy in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th March 2005, 01:10

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