Help with GOSUB


Results 1 to 17 of 17

Thread: Help with GOSUB

Threaded View

  1. #1
    Join Date
    Jul 2015
    Posts
    7

    Default Help with GOSUB

    Hi. First time post here. I'm using PIC Basic Pro, MPLAB ASSEM and a PIC16F870.
    Need some help with the GOSUB in my code.

    I'm telling a Compact Flash card that I want to read 256 sectors and then pulse
    RD low 65535 times to get the 16Bit data out. I do this 4 times because the whole
    file is 4 x 256 sectors.

    If I put the little REPEAT...UNTIL code after each call up of 256 sectors, the program
    works fine. I can push the start button as many time as I need for the whole file
    to be read from the compact flash card.

    If I use a GOSUB dat to go to the little dat: REPEAT...UNTIL RETURN pulse RD low routine,
    the program
    will only work about 4-5 times and then vapour locks. The RD pin keeps running
    (pulsing low) and doesn't stop after 65535 pluses. The code doesn't recover.

    Any ideas?

    Thanks
    Attached Files Attached Files

Similar Threads

  1. gosub - return
    By l_gaminde in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 11th August 2010, 10:21
  2. On...gosub
    By circuitpro in forum PBP Wish List
    Replies: 5
    Last Post: - 7th December 2009, 21:40
  3. If ... Then Gosub <> If ... Then Goto?
    By oldtoddler in forum General
    Replies: 6
    Last Post: - 27th February 2006, 11:52
  4. gosub and if-then working together?
    By bartman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd November 2005, 13:54
  5. GoSub Problem
    By ghoot in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th May 2004, 15:15

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