PIC32 FLASH memory requirements

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
Today I made a PIC32 output graphics on a small TFT.

1/2 of the FLASH used up.

Then I adapted a C source for FAT32 (SD card).

It was not able to find free sections anymore.

Have to remove the chip + solder in one with double memory.

210MX-16D
120MX-32D

Only had the idea to use SD card today, saw a few SD card readers around, and I was thinking that could be easier than to use the USB stack and write a Windows software as well.

So far it compiles successfully. All bitbanged same like the small TFT, can change later to use hardware serial port.

I did not know the memory gets used up so fast (apparently each instruction needs 4 bytes, so 16K is just like 4K instructions).

Configuration is much more effort, but got it working.

If I use 128K version of that chip, costs 5 dollars, but guess, in the end it is not really cutting it.
 

Attachments

ErnieM

Joined Apr 24, 2011
8,377
If you shift up to a 64 pin device you could get 512 bytes of flash.

Wait for the 32MZ products and you get 4 times that.
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
yes I know. But it needs more space to label the pins on the PCB.

32K is not so bad, and 64K/128K chips are pin compatible.

I am now considering to prepare the PCB for Nokia monochrome (84 pixel), 1.44" TFT, and monochrome OLED.

16K PIC is possible but not when using SD card.

For monochrome Nokia display it is enough and you don't need so much memory for bitmaps.

64pin PIC - think of a 2.5" TFT. And parallel interface/USB.

Wondering how it would be possible to use USB with a 16K PIC32? It is 4K words.

That's why I made the post- I did not know properly about the FLASH memory requirements.

It is a big step from using primitive 16F PICs.
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
Got it working today to display file entries from the SD card.

Very memory hungry, that PIC32. About 70% from the 32K are used up by TFT support, and FAT32 file system.

Have to change again to 64K or 128K.

I did not know they need so much FLASH. 16K or 32K are only good for monochrome without SD support.

Having a webpage now: http://aranna.altervista.org/dragonsnest/microcontroller-projects/pic32-oled-pcb/

The OLEDs still have not arrived.

I will release a PCB some day, in a month or two- pricing can be competitive especially with monochrome option (OLED or Nokia 5110).

i think a number of buttons is required, as well support to add a compass sensor + SD card slot + serial FLASH.

For color TFT at least 64K version of the PIC is required.
 

Attachments

THE_RB

Joined Feb 11, 2008
5,438
Very memory hungry, that PIC32. ...
I did not know they need so much FLASH. 16K or 32K are only good for monochrome without SD support.
...
Instead of thinking of it as "32kb", start thinking of it as "only 8k words".

And yeah, that 8k is tiny for doing colour TFT and FAT filesystems. :)
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
I have done a circuit with 18F PIC and similar TFT a year ago. It was slow until I changed it to use hardware SPI, and optimized it.

Now it's reasonably fast even with bitbang SPI.

This morning I had the idea, instead of adding a lot of buttons, I want to try a playstation joytstick XY pot assembly. Have one here, ordered some weeks ago.
 

Thread Starter

takao21203

Joined Apr 28, 2012
3,702
no it does not and this is why I attach pictures. It can be seen it's a small 1.44" TFT.

But I want to try playstation XY encoder, soldered one today to the board. Like a mouse! Dont need so many buttons then, maybe just one or two.

Much finer control than touchscreen I guess- I only need +- 64 pixels, AD is 10bits. 10K pots.

Sure I have larger displays here with touch, but they are not so good with small memory and serial interface.
 
Top