MP LAB
MPLAB X Integrated Development Environment (IDE) is an expandable, highly configurable software program that incorporates powerful tools to help you discover, configure, develop, debug and qualify embedded designs for most of our microcontrollers and digital signal controllers. MPLAB X IDE works seamlessly with the MPLAB development ecosystem of software and tools, many of which are completely free.
Shortcut of MP LAB
- Search word in whole project (SHIFT + Ctrl + F)
- Search word in current file (Ctrl + F)
- Change Font size Increase/Decrease in file (Alt + Mouse scroll ball)
TIME and Date
- __DATE__
- __TIME__
using __TIME__ and __DATE__ with the xc8 compiler I’m able to get the time and date as strings. As I don’t have a RTCC and only limited program and data memory, I want to implement the time & date functionality as efficiently as possible. So I’ve tried to use macros and thought this would save some memory, but unfortunately it does not.
- For example: this is the code I use to get the starting hour as an int:
#define BUILD_HOUR ((__TIME__[0] - '0') * 10 + __TIME__[1] - '0') int hour = BUILD_HOUR;// start value
I assumed that the preprocessor and compiler would optimize this, so I would not get a lot of addidtional memory usage. But the whole cumputation is done by the pic 12F1572 I use. Is there a better solution for this problem or any workaround ?
- Reference for MP LAB : https://www.microchip.com/forums/m1028043.aspx