Micromedia PIC32 FAT32 External Resource Visual TFT

General discussion on Visual TFT Software.
Post Reply
Author
Message
isidur
Posts: 5
Joined: 25 Nov 2011 12:23

Micromedia PIC32 FAT32 External Resource Visual TFT

#1 Post by isidur » 10 Apr 2013 21:22

Hello,

I want to use FAT32 library (download libstock PIC32) but visual tft supported fat16 library.(not FAT32) What do I need to change? and or visual tft supports fat32
please help me?

how to use global definations (fat 16)

// MMC/SD Connections
sbit Mmc_Chip_Select at LATD12_bit;
sbit Mmc_Chip_Select_Direction at TRISD12_bit;
// end of MMC/SD
// TFT Get Data globals
char Ext_Data_Buffer[512];
unsigned long currentSector = -1, res_file_size;
// end of TFT Get Data

void Init_Ext_Mem() {
//--- set up SPI for the file read
PPS_Mapping(104, _OUTPUT, _SDO3);
PPS_Mapping(98, _INPUT, _SDI3);
PPS_Mapping(79, _OUTPUT, _SCK3OUT);
// Initialize SPI
SPI3_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, _SPI_PRESCALE_SEC_4, _SPI_PRESCALE_PRI_16,
_SPI_SS_DISABLE, _SPI_DATA_SAMPLE_END, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE);
Delay_ms(10);

// Initialize MMC
if (!Mmc_Fat_Init()) {
// Reinitialize SPI at higher speed
SPI3_Init_Advanced(_SPI_MASTER, _SPI_8_BIT, _SPI_PRESCALE_SEC_2, _SPI_PRESCALE_PRI_16,
_SPI_SS_DISABLE, _SPI_DATA_SAMPLE_END, _SPI_CLK_IDLE_HIGH, _SPI_ACTIVE_2_IDLE);

// Open resource file for read
Mmc_Fat_Assign("%FILE_NAME", 0);
Mmc_Fat_Reset(&res_file_size);
}
}


char* TFT_Get_Data(unsigned long offset, unsigned int count, unsigned int *num) {
unsigned long start_sector;
unsigned int pos;

start_sector = Mmc_Get_File_Write_Sector() + offset/512;
pos = (unsigned long)offset%512;

if(start_sector == currentSector+1) {
Mmc_Multi_Read_Sector(Ext_Data_Buffer);
currentSector = start_sector;
} else if (start_sector != currentSector) {
if(currentSector != -1)
Mmc_Multi_Read_Stop();
Mmc_Multi_Read_Start(start_sector);
Mmc_Multi_Read_Sector(Ext_Data_Buffer);
currentSector = start_sector;
}

if(count>512-pos)
*num = 512-pos;
else
*num = count;

return Ext_Data_Buffer+pos;
}





Thank you

isidur
Posts: 5
Joined: 25 Nov 2011 12:23

Re: Micromedia PIC32 FAT32 External Resource Visual TFT

#2 Post by isidur » 11 Apr 2013 09:54

does not help...

User avatar
dejan.odabasic
mikroElektronika team
Posts: 2649
Joined: 30 Apr 2012 14:20

Re: Micromedia PIC32 FAT32 External Resource Visual TFT

#3 Post by dejan.odabasic » 15 Apr 2013 17:01

Hello,

Currently, VisualTFT doesn't have support for External resources saved on FAT32 mmc.
Our developer are working on this and it should be available soon.

Best regards.

isidur
Posts: 5
Joined: 25 Nov 2011 12:23

Re: Micromedia PIC32 FAT32 External Resource Visual TFT

#4 Post by isidur » 21 Apr 2013 10:29

Thank you very much

tixmcprods
Posts: 103
Joined: 15 May 2012 12:30

Re: Micromedia PIC32 FAT32 External Resource Visual TFT

#5 Post by tixmcprods » 23 Oct 2014 18:49

Hello,

Need it too, when will appear on VTFT ?

Thanks !

FantasPic
Posts: 21
Joined: 12 Sep 2015 07:35
Contact:

Re: Micromedia PIC32 FAT32 External Resource Visual TFT

#6 Post by FantasPic » 09 Jan 2016 09:33

Hello,

in 2016 , I hope a solution has been find ?

I have got a 4Go microSD only, and i would like use it , with the PIC18FJ.
i have a license for Visual TFT, but it works only in Fat16 mod ?

Can you help me ?

Sorry for my english , i am french

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: Micromedia PIC32 FAT32 External Resource Visual TFT

#7 Post by Aleksandar.Mitrovic » 13 Jan 2016 17:12

Hi,

All settings for that you should set in the board def.

You will need to just add the FAT32 to the definition file and every time when you compile your code it will generate code for that external resources.

We have couple of examples for mikromedia boards that use FAT32 external resources.

Best regards,
Aleksandar

Post Reply

Return to “Visual TFT General”