我使用 MPLAB X IDE(一种用于微控制器的软件)来编译我的代码,但出于某种原因,它一直说至少有两个错误(特别是在粗体区域)。我试着寻找,但我仍然不确定为什么会这样,所以任何帮助将不胜感激。
#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
#include <math.h>
#include <p18f4620.h>
#pragma config OSC = INTIO67
#pragma config WDT = OFF
#pragma config LVP = OFF
#pragma config BOREN = OFF
#define delay 5
// Prototype Area to place all the references to the routines used in the program
void Init_ADC(void);
unsigned char Get_Full_ADC(void);
void Flash_LED(unsigned char);
void main(void)
{
unsigned int ADC_Result; // local variable to store the result
Init_ADC(); // initialize the A2D converter
TRISB …Run Code Online (Sandbox Code Playgroud)