Hello,
I'm new to the C programing language. Currently, I'm using the MPLAB IDE. During simulation of a simple program (shown below), the simulator kept repeating the program, and never actually stopped running. Would a
PIC16F684 also never stop?
Here's the code:
int i, j;
#define E RC4
#define RS RC5
const char Command[] = "0b00000001";
const char Text[] = "0x53, 0x65, 0x74, 0x68";
main()
{
PORTC = 0; // All ports = low state.
CMCON0 = 7; // Turn off Comparators.
ANSEL = 0; // Turn off ADC.
TRISC = 0; // PORTC = Outputs.
for (i = 0; i < 1; i++)
{
PORTC = 0b0010;
RS = 1;
E = 1; E = 0;
}
} // End cLCD2.c
I'm new to the C programing language. Currently, I'm using the MPLAB IDE. During simulation of a simple program (shown below), the simulator kept repeating the program, and never actually stopped running. Would a
PIC16F684 also never stop?
Here's the code:
int i, j;
#define E RC4
#define RS RC5
const char Command[] = "0b00000001";
const char Text[] = "0x53, 0x65, 0x74, 0x68";
main()
{
PORTC = 0; // All ports = low state.
CMCON0 = 7; // Turn off Comparators.
ANSEL = 0; // Turn off ADC.
TRISC = 0; // PORTC = Outputs.
for (i = 0; i < 1; i++)
{
PORTC = 0b0010;
RS = 1;
E = 1; E = 0;
}
} // End cLCD2.c