/*
* File: newmain.c
* Author: ACER
*
* Created on March 31, 2024, 5:44 PM
*/
#pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
#pragma config WDTE = ON // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config CP = OFF // FLASH Program Memory Code Protection bits (Code protection off)
#pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP = ON // Low Voltage In-Circuit Serial Programming Enable bit (RB3/PGM pin has PGM function; low-voltage programming enabled)
#pragma config CPD = OFF // Data EE Memory Code Protection (Code Protection off)
#pragma config WRT = ALL // FLASH Program Memory Write Enable (Unprotected program memory may be written to by EECON control)
#include <xc.h>
#include<stdio.h>
void main() {
printf("hello,world!");
TRISD=0X01;
while(1);
}
提示:newmain.c:22: error: (192) undefined identifier "TRISD"是为什么?
本人是pic小白,望大神指点。
* File: newmain.c
* Author: ACER
*
* Created on March 31, 2024, 5:44 PM
*/
#pragma config FOSC = EXTRC // Oscillator Selection bits (RC oscillator)
#pragma config WDTE = ON // Watchdog Timer Enable bit (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config CP = OFF // FLASH Program Memory Code Protection bits (Code protection off)
#pragma config BOREN = ON // Brown-out Reset Enable bit (BOR enabled)
#pragma config LVP = ON // Low Voltage In-Circuit Serial Programming Enable bit (RB3/PGM pin has PGM function; low-voltage programming enabled)
#pragma config CPD = OFF // Data EE Memory Code Protection (Code Protection off)
#pragma config WRT = ALL // FLASH Program Memory Write Enable (Unprotected program memory may be written to by EECON control)
#include <xc.h>
#include<stdio.h>
void main() {
printf("hello,world!");
TRISD=0X01;
while(1);
}
提示:newmain.c:22: error: (192) undefined identifier "TRISD"是为什么?
本人是pic小白,望大神指点。