e. Advantages of PIC18F24J50 and PIC18F26J50

The size of flash RAM is very important if you are building custom projects. One may think that the biggest obstacle to embed more complex functions in a microcontroller is static RAM, but it turns out that the real culprit for limited programming abilities of PIC18F24J50 is the lack of flash RAM program memory. PIC18FxxJ50 predecessors (like PIC18F2550 or PIC18F4550) have at most half as much static RAM, but they can still support USB framework. A good (human) programmer may be able to optimize the source code for multiple reuse of the same physical data memory (static RAM) even without compiler optimizations, but it is almost impossible to overcome the lack of program memory.

USB framework occupies most of PIC18F24J50’s program memory and if you add too much of your own programming the microcontroller simply starts to behave unpredictably. To keep the basic I/O functionality and to add more complex functions, especially those that enable independent operation and support for more complex USB functions like entering and exiting low power modes. A half a euro or a half a dollar more for PIC18F26J50 (compared to PIC18F24J50) is certainly a good investment.

Most of the projects that is going be published soon on this website will be based in PIC18F26J50 microcontroller. It would make no sense to keep trying to squeeze a program code into PIC18F24J50 16 kB program memory and to spend a month or two debugging it. Microchip C18 compiler would also not generate adequate warning if you are running low on program memory. However, the operating system would refuse to connect to the microcontroller via USB at plugin time. Windows 7 would generate error code 10 or 43.

The easiest way to avoid all the problems menitoned above is to use PIC18F26J50 with 64 kB of program memory (flash RAM) for custom projects!