#include <p18f4455.h>
#pragma config WDT = OFF
#define B0 0;
void delay (void)
{
int i;
for (i = 0; i < 10000; i++);
}
void main(void)
{
while (1)
{
output_high(PORTB_RB0);
delay();
output_low(PORTB_RB0);
delay();
}
}
// All I want to do s toggle RB0 with a small delay. keep getting the following error.
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4455 /i"C:\MCC18\h" "main.c" -fo="main.o" -mL -Oa -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v3.02 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 58
C:\Pics\main.c:16:Error [1105] symbol 'PORTB_RB0' has not been defined
C:\Pics\main.c:16:Warning [2058] call of function without prototype
C:\Pics\main.c:18:Error [1105] symbol 'PORTB_RB0' has not been defined
C:\Pics\main.c:18:Warning [2058] call of function without prototype
Halting build on first failure as requested.
BUILD FAILED: Sat Aug 05 21:48:11 2006
// I have checked and made sure that PORTB & RB0 are definded but still get the error. I'm new to C programming. Any ideas would be great.
#pragma config WDT = OFF
#define B0 0;
void delay (void)
{
int i;
for (i = 0; i < 10000; i++);
}
void main(void)
{
while (1)
{
output_high(PORTB_RB0);
delay();
output_low(PORTB_RB0);
delay();
}
}
// All I want to do s toggle RB0 with a small delay. keep getting the following error.
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\MCC18\bin\mcc18.exe" -p=18F4455 /i"C:\MCC18\h" "main.c" -fo="main.o" -mL -Oa -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
MPLAB C18 v3.02 (demo)
Copyright 1999-2005 Microchip Technology Inc.
Days remaining until demo becomes feature limited: 58
C:\Pics\main.c:16:Error [1105] symbol 'PORTB_RB0' has not been defined
C:\Pics\main.c:16:Warning [2058] call of function without prototype
C:\Pics\main.c:18:Error [1105] symbol 'PORTB_RB0' has not been defined
C:\Pics\main.c:18:Warning [2058] call of function without prototype
Halting build on first failure as requested.
BUILD FAILED: Sat Aug 05 21:48:11 2006
// I have checked and made sure that PORTB & RB0 are definded but still get the error. I'm new to C programming. Any ideas would be great.