Back to www.micro-examples.com

PIC FAQs

LIST OF Most common errors with PICs

You are lost with your PIC, because you can't get it work, or it works... sometimes ?

This page will help you to solve the problem.

The first common error with PIC is to not read its datasheet. So for once, find your PIC in this list and open its datasheet : you will need it.
Then, read this carefully :

 

Q : my PIC does not work, or works partially, some modules or PORTs do not work, oscillator does not start or is not stable.

A : The PIC is not correctly POWERED.

 

Q : my PIC works partially, does not start, or stops at any time, works only if I approach my hand or a screwdriver, or resets at any time.

A: the CONFIGURATION FLAGS are not fitted to your hardware.

 

Q : I can't get the expected PWM frequency I want, I can't get the expected timer period I want, my delays do not work.

A: Check if your PIC is correctly clocked :

 

Q : my PIC does not start, or hangs, or resets.

A : the CONFIGURATION FLAGS are not fitted to your software.

 

Q : PORTA is not working, PORTE is not working, GPIO is not working

A : Most PICs have PORTA (GPIO) and PORTE digital I/O multiplexed with analog I/O. Check registers related to :

 

Q : PORTA is not working, GPIO is not working

A : Most PICs have /MCLR reset pin multiplexed with a PORTA (GPIO) pin : if you want to use this pin as I/O, the MASTER CLEAR configuration must not be set. In this case the corresponding PORTA (GPIO) pin can be use as digital INPUT only.

 

Q : RA4 is not working

A : Some PICs have RA4 with open drain output instead of CMOS output ! Connect a pull-up resistor to the output and reverse RA4 logic control.

  

Q : PORTB is not working

A : Some PICs have PORTB digital I/O multiplexed with analog I/O.

 

Q : PORTD is not working

A : most PICs can turn PORTD into a parallel port.

 

You can try to test your hardware with a very simple ready-made LED blinking example.

If you can't solve your problem with these advices, you can try to get more help in my forums.