thivanka321
Newbie level 5
i wrote a ccs c code to switch on some led's. that programme work with proteous simulator. but when i put this programme in to pic 18f452, it is not working.
i'm sure that it's not a problem with pic control board, because, other programmes written in mikroc software, is working.
but only the programmes written in ccs c , are not working.
tell me the reason why this is happening.any problem with ccs c ,hex files. or what?
i'm sure that it's not a problem with pic control board, because, other programmes written in mikroc software, is working.
but only the programmes written in ccs c , are not working.
tell me the reason why this is happening.any problem with ccs c ,hex files. or what?
Code:
#include "G:\ccsfiles\ledblinking.h"
#int_RB
RB_isr()
{
//printf("hello ");
}
#int_TIMER0
TIMER0_isr()
{
}
#int_EXT
EXT_isr()
{
}
#int_AD
AD_isr()
{
}
#int_RDA
RDA_isr()
{
}
void main()
{
setup_adc_ports(AN0_AN1_AN3);
setup_adc(ADC_CLOCK_DIV_4);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
enable_interrupts(INT_TIMER0);
enable_interrupts(INT_EXT);
enable_interrupts(INT_AD);
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);
setup_oscillator(False);
enable_interrupts(INT_RB);
enable_interrupts(GLOBAL);
//SET_TRIS_B(0xFF ); // TODO: USER CODE!!
//Output_B(0X00);
SET_TRIS_D(0);
output_D(0);
while(1)
{
output_D(255);
//printf("hello");
Delay_ms(500);
output_D(0);
Delay_ms(500);
}
}
please ,reply me soon enogh.