Where should I discuss SD/MMC FAT issues?


Results 1 to 40 of 93

Threaded View

  1. #32
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by JD123 View Post
    We'll, I've done my best and yes, about 84K Tcy is as fast as this thing is going to read 512 bytes from the MMC and write the 512 bytes to the FRAM. It's 83,968 Tcy to be exact. Last night I thought I'd give it one more go.
    Add
    DEFINE NO_CLRWDT 1 'no extra clear watchdog timer instructions
    to the top of your program.
    Will probably save a few more cycles there.

    Also, in your 'big' loop, this might help somewhat. Remove the 2 for/next loops, replace with this:
    loop1:
    x1 = 2 : x = 0
    loop2:
    gosub get_byte : gosub write_i2c : x = x - 1 : if x = 0 then loop2
    x1 = x1 - 1 : if x1 = 0 then loop1

    Rewriting the 2 gosubs as inline code would save you about 2K cycles at most, might get you down below 20ms, but would use up code space. No real savings there.
    Also, go back and try to BANK0 as much as you can, the commonly used variables first, until something doesn't end up in BANK0 (check the .lst file).
    Last edited by skimask; - 29th March 2008 at 08:09.

Similar Threads

  1. Reading and Writing from SD/MMC cards as FAT filesystem?
    By charliez in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd June 2006, 22:26

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