Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4922

How to debug embedded code from starting to find problem

$
0
0
I am trying to understand about the debugging process, how the problem can be detected by debugging the code.

For example, let me talk about the code below.

C:
#include <htc.h>
#define _XTAL_FREQ 8000000
void main()
{
  TRISB=0X00;
  PORTB=0X00;
  while(1)
  {
    PORTB=0XFF;
    __delay_ms(1000);
    PORTB=0X00;
    __delay_ms(1000);
  }
}
if the led is not blinking , on which line should I set the break point ?

Viewing all articles
Browse latest Browse all 4922

Trending Articles