Interrupt problem ?


Closed Thread
Results 1 to 5 of 5
  1. #1

    Exclamation Interrupt problem ?

    Hi all,
    I have a strange problem and if any one have the solution or the idea to solve it
    first I interface the barcode reader with PIC16f877a which when anyone pass its ID card it will display the number on the LCD without any problems and it's working alright.
    second I interface my HP laseject printer with pic16f877a so I can print some information on printer and it's working alright without any problems.

    Now I want to mix two steps since when anyone pass its ID card , the printer will automatically print the ID number.

    I did first step and second step individual without any problems, but when i mix the two steps together in one file , the printer worked but the interrupt doesn't work since the number is not true.

    I don't know why the interrupt is not woking properly

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iugmoh View Post
    I don't know why the interrupt is not woking properly
    Neither will we unless some code starts magically appearing...

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Oky it's now woking since I replace gosub with the code itself , but i don't know what is the reason

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Don't post you code just in case we could help
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iugmoh View Post
    Oky it's now woking since I replace gosub with the code itself , but i don't know what is the reason
    You're using a 16F877A...
    If you check the PBP manual, you might see where it says that you can only nest a GOSUB so many levels deep. Maybe that was your problem...
    You 'overnested' your GOSUBs and caused a stack overflow, which caused the program to either crash or reset.

Similar Threads

  1. problem using GOSUB under interrupt
    By fobya71 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 5th March 2010, 19:52
  2. Problem with Interrupt on PIC18F4620 PORTB
    By rookie in forum Off Topic
    Replies: 1
    Last Post: - 22nd March 2007, 01:34
  3. Interrupt Problem
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th November 2005, 20:58
  4. Interrupt stack overflow problem with Resume {label}
    By Yuantu Huang in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd May 2005, 01:17
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

Members who have read this thread : 1

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