Quantcast
Channel: circuit | Battery Guide
Viewing all articles
Browse latest Browse all 239

Basic PIC circuit is not working

$
0
0

I have just begun in the world of micro-controllers, and the first micro-controller. I chose to work with was the PIC from Microchip. The PIC I am using is the PIC16F877A. I am using MPLAP IDE and HI-TECH C. I am trying to make an extremely simple program that turns on an LED. This is the code I am using:

Basic PIC circuit is not working#include<htc.h> #define _XTAL_FREQ 8000000 __CONFIG(UNPROTECT & PWRTDIS & WDTDIS & HS & LVPDIS); int main() { TRISB0 = 0; RB0 = 1; while(1);}

When I hookup the PIC to my circuit the LED does not turn on.

A few other notes about my circuit:

  • I am using a 9 volt battery hooked up to a 7805 regulator for the power supply
  • I have measured the voltage coming from pin RB0 with a multimeter and it measures 0.0V.

Basic PIC circuit is not working Schematic

  • If there is no problem with my circuit I could have programmed the chip wrong
  • My capacitors hooked up with my crystal are 22pf not 22uf
  • I have put 100uf capacitors between pins 11 and 12 and between 31 and 32

 

For more detail: Basic PIC circuit is not working

Current Project / Post can also be found using:

  • felix pic board project

The post Basic PIC circuit is not working appeared first on PIC Microcontroller.


Viewing all articles
Browse latest Browse all 239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>