slow return from subrutine


Closed Thread
Results 1 to 22 of 22

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    what about
    Code:
    setup: ; entra en la configuracion de la circunferencia
         INTCON.7=0 'disable all interrupt
         WHILE portb.2 
    
              x = circunferencia
              for demora = 1 to 20
                   gosub display
              next
    
    
              if portb.3 = 0 then
                   circunferencia = circunferencia + 1
                   if circunferencia > 215 then 'lets say its=216
                        circunferencia = 0
                   endif
              endif
    
         WEND
         INTCON.2=0
         INTCON.1=0
         INTCON.7=1 'enable all interrupt
    
         return
    and what about if you rename setup to Mysetup? timer to MyTimer?

    Redefine all your math variable to WORD size can also do something. Case not, i'll try it on-board. Looks weird.

    Could you axplain, brief, how your hardware/software is suppose to work? And if you can provide some schematic too it can be handy.
    Last edited by mister_e; - 25th January 2005 at 03:35.
    Steve

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

Similar Threads

  1. Multi Slow speed PWM and Instant Interrupts
    By DaveC3 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd November 2010, 12:50
  2. Making a menu
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 12th November 2008, 19:54
  3. Stack over flow with IF THEN RETURN ENDIF???
    By kdoske in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th December 2007, 17:20
  4. IC2 pic 18f452 program problems
    By MrSafe in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 20th September 2007, 18:55
  5. Can RESUME replace RETURN in a GOSUB?
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 9th October 2005, 09:03

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