View Full Version : Pic16f877

- 30th April 2006, 16:15
I am using PIC16f877A for the first time. I tried a simple program to light two led in portb which is working for PIC16f84A (with 4 MHz crystal), but it doesn't work for 16f877A (with 20 MHz) ………what's wrong ?

This is the program

'40 MHz OSC
PAUSE 1000
PAUSE 1000
PAUSE 1000
PAUSE 1000

- 30th April 2006, 17:43
at least there's a missing DEFINE OSC 20 line but it's suppose to work anyway... but faster than you expect. I suspect a bad config fuse setting and/or bad hardware

- 28th September 2006, 10:14
i am using 16f877a, Please help me to make a program (C or Asm never mind) for my project:

- port a0 as a input from LM34 sensor (small voltage output where 10mV/degree Farrenhiet- i want use 0.95V to activate port a0)
-port a1 as input from mini switch
-port c0 as a output to relay circuit.

The senario is if any input high, output (to relay and fan) will be on.

Hopely u all can help me, please.. thanks.

ps; i am blur to use adc

- 28th September 2006, 10:42
i am using 16f877a, Please help me to make a program (C or Asm never mind) for my project:

Sorry to disappoint but you will notice that the name of this forum is


whilst some snippets of ASM are used from time to time I think you will find a distinct lack of "C".

We are a freindly bunch here so if you would like some help in writing your program in PICBASIC than I am sure you will get some useful tips.

(I was going to say "pointers" but we dont do "C" :) )

- 29th September 2006, 01:23
Is it PIC16F877a about different with picbasic forums willing...

- 29th September 2006, 01:26
my problems is to use adc (analog input from LM34) in 16f877a.

- 29th September 2006, 04:57
have look to those

- 27th October 2006, 09:08
hi all,
I am doing a project using PIC and CAN controller.iam also using temperature sensor as my input to PIC and transmitting to other node through bus. i like to get some help in interfacing CAN with PIC through SPI interface in PIC and like to display a simple message in LCD connected to PIC. PLZ help me writing the code in Embedded C and iam using PIC16F877A microcontroller.

- 7th November 2006, 02:29
i just finished my project using LM34 temperature sensor as a input and 16F877A microcontroller. 2 input (1 as a ADC for lm34 input) and 1 output. If u want my c program, please write personally to me ([email protected])

- 8th November 2006, 12:04
iam using micro C for programming my pic.i need to know the hardware interfacing or communication of 2 pic microcontrollers.i need to whether i need to connect 2 pic boards for making them communicate.i like to tranmit a simply msg to a pic and display it in a lcd or seven segment.i tried to do it by making an led to toggle if the msg is tranmitted .the led is toggling but i cudnt find whether the msg is transmitted or not.
plz reply me.it would be more helpful if i get the embedded C coding too.

- 8th November 2006, 12:32

As you know this is a PBP forum.

Also, the forum includes so many examples for PIC to PIC communcations in several ways.

Search them through.