temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Mon Jan 01, 2024 8:31 am |
|
|
1) Buy the biggest PIC in a 'family' ! Yes, it'll be 'overkill' for 99.44% of your projects BUT you should never run out of memory or I/O pins. I settled on the then new, PIC18F46K22 in 40 pin DIP even though there's smaller version(22pin). I prefer LARGE PCB with room to grow.
2) Only use 'global' RAM if needed. That way RAM gets 'recycled' as required.
3) 'memory' comes in many types RAM, ROM, EEPROM each has tricks to using them.
4) one 'trick' I use. Seems every project has need for 'time',so I use an RTC/EEP module. The RTC has battery backed RAM( few bytes) which can be handy for when power fails.... the EEP can store tables or arrays of 'fixed data'( say text for screens, font tables or similar )
5) using a 'fprintf' subroutine / function can save a lot of space. a 'generic' print that prints all variables to LCD screen, with 'dummy data' as place holders. |
|