Warning: mysql_connect(): No such file or directory in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 374

Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 379

Warning: mysql_get_server_info() expects parameter 1 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 387

Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411

Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 521

Notice: Undefined variable: country in /home/efkids/public_html/app/app_controller.php on line 268

Notice: Undefined variable: city in /home/efkids/public_html/app/app_controller.php on line 269

Warning: Cannot modify header information - headers already sent by (output started at /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php:374) in /home/efkids/public_html/app/app_controller.php on line 312

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411

Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 521

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411

Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 521

Warning: Cannot modify header information - headers already sent by (output started at /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php:374) in /home/efkids/public_html/app/app_controller.php on line 119

Warning: Cannot modify header information - headers already sent by (output started at /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php:374) in /home/efkids/public_html/app/app_controller.php on line 228

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411

Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 521

Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 510

Warning: mysql_query() expects parameter 2 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411

Warning: mysql_errno() expects parameter 1 to be resource, boolean given in /home/efkids/public_html/cake/libs/model/datasources/dbo/dbo_mysql.php on line 521
EFKids - Troubleshooting PIC Microcontroller Projects
  Welcome Guest !
Troubleshooting PIC programming and post programming related issues

Following is a check list to troubleshoot PIC programming and post programming related issues. These steps are applicable if you are using MPLAB IDE as the Programming software and one of the microchip programmers PICkit, ICD or ICE hardware for performing programming. If you are getting frustrated with a circuit it is recommended to start simple and once you have a working piece start adding or making changes one small step at a time. For some circuits even repositioning a bypass capacitor could break hell.

If you are not able to program you PIC using one of the microchip programmers, PICkit, ICD or ICE check the following.

  1. Ensure that the power supply lines are connected to the programmer. if you are using USB for powering the circuited for programming, this step may be omitted. But for debugging purpose, it is recommended to use external power supply to avoid a lot of frustration.
  2. Check if MCLR pin is pulled to VDD with a 10k resistor.
  3. Ensure PGD and PCG pins are not connected to any other components and are used only for programming. (Use an SPDT switch to if you are forced to use these pins for your application.
  4. Do a continuity check from the programmer pins to the PIC pins.
  5. Ensure that the correct PIC chip is selected in the programmer software in the Configure->Select Device option. if you have changed the chip/device in the software (MPLAB IDE) restart the application. It seems to cache the information some times.
  6. If MPLAB is not able to detect the programmer, when the USB is connected and the correct programmer is selected from the option Programmer->Select Programmer there is some issue with your USB or programmer. You may want to reinstall MPLAB IDE.
  7. If programmer is detected by MPLAB, but when connection from programmer to the circuit is made, target circuit is not getting detected, then the power supply to the programmer or MCLR line needs to be checked. Either power supply is not connected or MCLR line is not connected properly.
  8. IF the programmer is able to detect the target circuit but there is a device id mismatch error then the there is an issue with PGC, PGD pin connections. Ensure continuity and check if there are any components directly connected with these pins, if so remove/isolate them.

If you are able to program successfully, but nothing happens in the circuit.

  1. Write a LED blink program to do the testing.
  2. Ensure that all VSS and VDD pins on the PIC chip are connected ground and positive supply respectively.
  3. Ensure that the crystal/RC oscillator is connected as close to OSC1 and OSC2 pins as possible. Crystal frequency should be as recommended in the datasheet (generally 4-20 MHz is safe). Ensure appropriate capacitor is used with the crystal as specified in the datasheet (generally 12-33pF). Do a continuity check between the crystal and the IC pins. It is possible to use an RC oscillator or in some PIC chips internal oscillator as clock, for debugging purpose it is recommended to use external crystal oscillator with frequency 4 or 10 Mhz.
  4. Ensure that the MPLAB IDE configuration bits are configured appropriately. OSC should be correct one of the RC, LP, XT, HS correct one. Generally XT for 4-20 MHz.
  5. Ensure that other config bits such as WDT, PUT, CP etc. are turned off for debugging purpose.
  6. Bypass caps of 100nF may be connected across VDD and VSS as close to the chip as possible. This is essential when you have other oscillating circuitry on the same board.
  7. Perform a continuity check from all the sources/components to the PIC pins.
  8. Check the program and make sure that the LED is connected to the right pin. Check if LED works.
  9. Make sure TRISA/B/C is set to 0 TRISA=0; for output (for LED blink test)
  10. Set PORTA=0xFF to check if pins are turned high. Use a multi meter to check voltage on the PORTA pins. If these pins are (multiplexed) used for other analog operations ensure that they are configured for digital operations. As far as possible it is better to use a pin that is not multiplexed from same port or another port.
  11. Check power supply on VDD and VSS pins.
  12. Verify the all the connections again.
  13. Change the PIC and redo all the above checks.
Social Likes
Join EFKids Club


text image
* Enter the text above for captcha
Join EFKids Club to get notified when new projects are added.


Electronics For Kids Copyright 2010 - 18 .   EFKids
About EFKids