Hi, I am trying to debug a simple LED program using MikroC with MicroProg debugger. I have connected 4 Mz crystal on pin#13 and 14. Can someone please help me if I need to change any default values on the programmer suit that writes to MCU based on the program I wrote to debug? it is set to 'checked' for 'Power target MCU 5v from programmer' and 'Oscillator to "HS"', everything else is default values.
Below is the program code;
void main() {
ADCON1 |= 0X0F; // ADC pins set as digital
TRISB.RB0 = 1; // RB0 as Input
PORTB.RB0 = 1;
TRISD = 0; // PORTD pins set as Output
PORTD = 0; // PORTD pins set LOW
while(1)
{
PORTD.RD0 = 1; // LED on
Delay_ms(400); // delay 400 ms
PORTD.RD0 = 0; // LED off
Delay_ms(400); // delay 400 ms
}
}
Can someone please help so I can debug this program line-by-line with MikroProg?
MikroProg debugger configuration issue trying to debug simple LED program for PIC18F4520
Re: MikroProg debugger configuration issue trying to debug simple LED program for PIC18F4520
Hi,
Can you program the board ?
What happens if you try debug, do you get any errors ?
Can you attach the connection schematics ?
Regards,
Filip.
Can you program the board ?
What happens if you try debug, do you get any errors ?
Can you attach the connection schematics ?
Regards,
Filip.
Re: MikroProg debugger configuration issue trying to debug simple LED program for PIC18F4520
Yes, the programming goes through showing programming progress but clicking 'Run debugger' was not doing anything, 'Step into' and other options were greyed out, regardless of what I did.
I found that my 4 Mhz crystal was not connected to MCU properly so I fixed it and now everything is working. Thank you.
I found that my 4 Mhz crystal was not connected to MCU properly so I fixed it and now everything is working. Thank you.
Re: MikroProg debugger configuration issue trying to debug simple LED program for PIC18F4520
Hi,
I'm glad that the issue is solved.
Regards,
Filip.
I'm glad that the issue is solved.
Regards,
Filip.