hi , i am trying to learn pic programming and basic circuit. So i am unexperienced. I am using pic16f84a with 4 mhz crystal osillator with 22 pf capacitors. Circuit runs on 5 V with 7805 regulator. and this is the code:
#include <16F84A.h>
#define pir input(PIN_A2) // Switch on RA0
void main (void)
{
set_tris_a(0x11);
set_tris_b(0x00);
output_b(0x00);
I import this file with pickit2.
There voltage supply on pic , i can read it with voltameter but somehow there is no output. It isnt work.
Anyone , any idea how to solve the problem ?
The biggest thing I see is that you set your portb pins high, then nothing else, posrtb,1 and ,2 will be high all the time.
If you want to 'see' something happening try:
The biggest thing I see is that you set your portb pins high, then nothing else, posrtb,1 and ,2 will be high all the time.
If you want to 'see' something happening try:
Thanks for answer. But i am unexperienced in electornics. So how should i check the fuses in pickit 2. i only know how read write or delete a hex file. Its like there is notthing other to do in pickit2
OK i did it. And now it is worked but partially. The new problem is leds are light up. But the light is too weak.
I checked on voltage with multimeter on pins and the output voltage is very unstable.
It goes like 4.00 , 0.10 , 2.12, 3.45 in a second .
Why is this happening ? How can i make it stable ?