Windows 8.1 Effect on FAT12
Posted: Fri Jun 20, 2014 9:58 am
hoosier_timmer wrote:
We have a USB application with a PIC18F47J53 micro and the code is based on the USB Mass Storage - Internal Device application. We use Excel and some custom visual basic to write a configuration file to the micro. This file contains a time update for the RTCC and some configuration values. The Excel VBA first erases the TXT file on the micro then writes a new file. We had some customers that would erase the TXT file or format the internal drive so some code was added to check several of the file & internal drive memory locations. If these memory locations didn't match or were zeroed, the micro would restore the TXT file back to factory defaults. Up until now everything has worked fine.
Last week we had a customer use our board for the first time with Windows 8.1. After they did, the memory check routine failed. After locating a Win8.1 laptop, I was able re-create the problem. Win7 and Win8.0 do not cause this problem. The version of Excel does not seem to matter either but I wouldn't guarantee that. Reading the memory back from the micro before and after the Excel VBA download, I see 2 bytes that I was checking for an erased file are set to zero. From the Files.c file, there is a section defining the FAT0 locations.
[code]
ROM BYTE FAT0[MEDIA_SECTOR_SIZE] ={ 0xF8,0x0F, // Copy of the media descriptor 0xFF8 0x00, // FAT12 system! 0xFF,0x0F, //};
[code]
After the Excel download using Win8.1, the last 0x0FFF is missing. Here are the uploaded memory locations.
Before: 0FF8 FF00 000F
After: 0FF8 0000 0000
This is actually the same results I get if I erase the TXT file, no matter version of Windows I use. But that makes sense. I've heard Win8.1 is quite a bit different than Win8.0 but I thought that was just the way it looked. I don't see the FF00 000F combination anywhere else in the memory so I don't think it's written to a different location.
Has anyone else seen similar issues with Win8.1? If I ignore those 2 memory locations being zeroed, everything else seems to work ok. Is this just a Win8.1 issue I'll have to live with?