PDA

View Full Version : Pic16f877



abood
- 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
TRISB=0
START:
PORTB.0=1
PAUSE 1000
PORTB.0=0
PAUSE 1000
PORTB.1=1
PAUSE 1000
PORTB.1=0
PAUSE 1000
GOTO START

mister_e
- 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
http://www.picbasic.co.uk/forum/showthread.php?t=543

razman
- 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

keithdoxey
- 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

MELabs PICBASIC

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" :) )

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

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

mister_e
- 29th September 2006, 04:57
have look to those
http://www.rentron.com/PicBasic/LM34.htm
http://www.picbasic.co.uk/forum/showthread.php?t=2786&highlight=lm34+sensor

anu_kan2
- 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.

razman
- 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])

anu_kan2
- 8th November 2006, 12:04
hi,
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.

sayzer
- 8th November 2006, 12:32
Hi ANU,

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.


----------------------------