WhyWhy
Member level 4
- Joined
- Mar 18, 2013
- Messages
- 68
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,779
Error in execution.
How to solve this problem? i using MPLAB, Project -> PIC16F877A -> Hi TECH ANSI -> Finish.
When i execute the error is occur.
Error:
How to solve this problem? i using MPLAB, Project -> PIC16F877A -> Hi TECH ANSI -> Finish.
When i execute the error is occur.
Error:
Code:
Warning [162] C:\Program Files (x86)\HI-TECH Software\PICC\9.83\include\pic16f877a.h; 3.82 #warning: Header file pic16f877a.h included directly. Use #include <htc.h> instead.
Warning [107] C:\Users\WhyWhy\Desktop\test.c; 3.6 illegal # directive "fuses"
Warning [107] C:\Users\WhyWhy\Desktop\test.c; 4.4 illegal # directive "use"
Warning [107] C:\Users\WhyWhy\Desktop\test.c; 5.4 illegal # directive "use"
Warning [107] C:\Users\WhyWhy\Desktop\test.c; 9.8 illegal # directive "int_rda"
Warning [361] C:\Users\WhyWhy\Desktop\test.c; 12.4 function declared implicit int
Error [226] C:\Users\WhyWhy\Desktop\test.c; 14.9 char const too long
Warning [361] C:\Users\WhyWhy\Desktop\test.c; 15.1 function declared implicit int
Error [192] C:\Users\WhyWhy\Desktop\test.c; 15.13 undefined identifier "PIN_B0"
Error [226] C:\Users\WhyWhy\Desktop\test.c; 17.14 char const too long
Error [192] C:\Users\WhyWhy\Desktop\test.c; 18.13 undefined identifier "PIN_B1"
Error [226] C:\Users\WhyWhy\Desktop\test.c; 20.14 char const too long
Error [192] C:\Users\WhyWhy\Desktop\test.c; 21.13 undefined identifier "PIN_B2"
Error [226] C:\Users\WhyWhy\Desktop\test.c; 23.14 char const too long
Error [192] C:\Users\WhyWhy\Desktop\test.c; 24.13 undefined identifier "PIN_B3"
Error [226] C:\Users\WhyWhy\Desktop\test.c; 26.14 char const too long
Error [192] C:\Users\WhyWhy\Desktop\test.c; 27.13 undefined identifier "PIN_B4"
Error [226] C:\Users\WhyWhy\Desktop\test.c; 29.14 char const too long
Error [192] C:\Users\WhyWhy\Desktop\test.c; 30.13 undefined identifier "PIN_B5"
Warning [361] C:\Users\WhyWhy\Desktop\test.c; 34.1 function declared implicit int
Warning [361] C:\Users\WhyWhy\Desktop\test.c; 46.1 function declared implicit int
Warning [361] C:\Users\WhyWhy\Desktop\test.c; 48.1 function declared implicit int
Error [192] C:\Users\WhyWhy\Desktop\test.c; 48.19 undefined identifier "int_rda"
Error [192] C:\Users\WhyWhy\Desktop\test.c; 49.19 undefined identifier "global"
Code:
#include <pic16f877a.h>
#fuses HS, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=20000000)
#use rs232 (baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
char rx;
#int_rda
void serial_isr()
{
rx=getch();
if (rx=='AA')
output_high(PIN_B0);
else if (rx=='BB')
output_high(PIN_B1);
else if (rx=='CC')
output_high(PIN_B2);
else if (rx=='DD')
output_high(PIN_B3);
else if (rx=='EE')
output_high(PIN_B4);
else if (rx=='FF')
output_high(PIN_B5);
else
output_low(PIN_B0);
output_low(PIN_B1);
output_low(PIN_B2);
output_low(PIN_B3);
output_low(PIN_B4);
output_low(PIN_B5);
}
void main()
{
set_tris_c(0b10000000); // I do not know how you drive the LED on C0: output/input?
enable_interrupts(int_rda);
enable_interrupts(global);
while(1);
}
Last edited: