Something is wrong with my Tcy counter. It must be rolling over. I didn't make provisions for it rolling over because I couldn't imagin it taking more than 65K Tcy to move the data off the MMC and onto the F-RAM. I guess I was wrong... very wrong.
Best condition Tcy's to move data:
gosub to MMC read - 2Tcy
get byte - 24Tcy (3Tcy per bit)
return - 2Tcy
gosub to write F-RAM - 2Tcy
write F-RAM - 117Tcy (13Tcy per bit (min. clock delay 5Tcy), 9 bits w/ack)
Ack overhead - 9Tcy if tested, 3Tcy if blind read
return - 2Tcy
total for single byte loops - 158Tcy
repeat 512 times - 80,896Tcy
I must be moving data WAY slower than I thought. Time to detect TMR1 rollover and see what it really is.
Last edited by JD123; - 22nd March 2008 at 17:01.
Reason: corrected F-RAM Tcy
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
Bookmarks