This is really the first time I've used this MPLAB software and the first time I've coded in C language. Normally I code in Ladder Logic, (Programming Logic Controllers), Visual Basic, or what ever proprietary language or mnemonic language of the week that might be in whatever servo controller I get my hands on. However I’ve notice a nice tool in MPLAB I'd like to know a bit more about.
When I program my C program offline, I see that I can use the MPLAB simulator much like a Visual Basic debugger. The problem is I can't see or figure out how to simulate variables to keep executing in my code. Example:
My offline debugging gets STUCK in a loop here:
PHP Code:
/*******************************************************************************
* FILE NAME: ifi_utilities.c
*
* DESCRIPTION:
snippppeddd a few lines of code…..........................................
/* Used when transmitting data serially. It waits for each byte to finish. */
void Wait4TXEmpty(void)
{
#ifndef _SIMULATOR
while (!TXINTF)
{
continue;
}
#endif
}
I need to be able to SIMULATE the variable !TXINTF so that I can get past this part of the code while performing a STEP function in the debugger. I am sure may other spots will be required to be simulated imputs also to get the loop area where the user code is executing. Is there anyway in MPLAB to setup this variables and many more to toggle or force values?