Olá pessoal, estou iniciando com o PIC18f452 no compilador CCS mesmo por enquanto, esse código funciona no PIC 16F877A com pequenas mudanças, gostaria de saber dos colegas oque há de errado ou oque falta nesse código abaixo:
#include <18f452.h> // microcontrolador utilizado
#fuses HS,NOWDT,PUT,NOLVP,NOPROTECT,BROWNOUT // configuração dos fusíveis
#use delay(clock=10000000, RESTART_WDT)
#use fast_io(a)
#use fast_io(b)
#use fast_io(c)
#use fast_io(d)
#use fast_io(e)
#byte porta=0x05
#byte portb=0x06
#byte portc=0x07
#byte portd=0x08
#byte porte=0x09
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* SAÍDAS *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#bit pinoB7 = portb.7
void main()
{
setup_counters(rtcc_internal,rtcc_8_BIT);
// configura os tris
set_tris_a(0b00000000);
set_tris_b(0b00000000);
set_tris_c(0b00000000);
set_tris_d(0b00000000);
set_tris_e(0b00000000);
// inicializa os ports
porta=0x00; // limpa porta
portb=0x00; // limpa portb
portc=0x00; // limpa portc
portd=0x00; // limpa portd
porte=0x00; // limpa porte
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Loop principal *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
while(TRUE) // rotina principal
{
pinoB7 = 1 ;
delay_ms(10);
pinoB7 = 0;
delay_ms(10);
}
}