Buenas, queria decirles que acabo de crear un proyecto de cero solo con esto y funciona bien el portD como salida, vere porque no me funciona en el proyecto que usaba el 18f4620, pero me quedo tranquilo que si pueden funcionar como salidas, quizas siga consultando por el proyecto que no me funciona a ver porque es, uso timers y entrada AD pero estan deshabilitadas, desde que no me funciono deshabilite todo
Esto si funciono...
#include <18f45k80.h>
#include "def18f.h"
el def18.h :
//Puertos
#byte porta = 0xf80
#byte trisa = 0xf92
#byte portb = 0xf81
#byte trisb = 0xf93
#byte portc = 0xf82
#byte trisc = 0xf94
#byte portd = 0xf83
#byte trisd = 0xf95
#byte porte = 0xf84
#byte trise = 0xf96
#byte LatD = 0xf8c
#byte ANCON0 = 0xf5d
#byte ANCON1 = 0xf5c
hasta aca el def
Aca el .c :
#device ADC=8,HIGH_INTS=TRUE //Conversion AD de 8 bits, prioridad de ints habilitada
#FUSES PLLEN,INTRC_HP,INTRC_IO,NOIESO,CANC,NOWRTC,NOWRTB,NOEBTR,NOEBTRB
#FUSES NOWDT,NOFCMEN //2
#FUSES NOMCLR //3
//#FUSES NOSTVREN,BBSIZ2K,NODEBUG //4
#FUSES PROTECT//,NOCPB,NOCPD //5
//#FUSES NOWRT,NOWRTC,NOWRTB,NOWRTD, //6
//#FUSES NOEBTR,NOEBTRB //7
#use delay(clock=64000000)
void main(void){
setup_oscillator(OSC_16MHZ|OSC_PLL_ON);
set_tris_d(0x0) ;
do{
bit_set(LatD,0);
bit_set(LatD,1);
bit_set(LatD,2);
bit_set(LatD,3);
bit_set(LatD,4);
bit_set(LatD,5);
bit_set(LatD,6);
bit_set(LatD,7);
delay_ms(100);
bit_clear(LatD,0);
bit_clear(LatD,1);
bit_clear(LatD,2);
bit_clear(LatD,3);
bit_clear(LatD,4);
bit_clear(LatD,5);
bit_clear(LatD,6);
bit_clear(LatD,7);
delay_ms(100);
}while(1);