Pic16f877


Closed Thread
Results 1 to 11 of 11

Thread: Pic16f877

  1. #1
    abood's Avatar
    abood Guest

    Default Pic16f877

    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

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    razman's Avatar
    razman Guest


    Did you find this post helpful? Yes | No

    Default Need help to program pic 16f877a with temperature sensor

    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

  4. #4
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by razman
    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" )
    Keith

    www.diyha.co.uk
    www.kat5.tv

  5. #5
    razman's Avatar
    razman Guest


    Did you find this post helpful? Yes | No

    Default

    Is it PIC16F877a about different with picbasic forums willing...

  6. #6
    razman's Avatar
    razman Guest


    Did you find this post helpful? Yes | No

    Default

    my problems is to use adc (analog input from LM34) in 16f877a.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  8. #8
    Join Date
    Oct 2006
    Posts
    4


    Did you find this post helpful? Yes | No

    Default pic16f877a

    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.

  9. #9
    razman's Avatar
    razman Guest


    Did you find this post helpful? Yes | No

    Default

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

  10. #10
    Join Date
    Oct 2006
    Posts
    4


    Did you find this post helpful? Yes | No

    Default pic16f877a

    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.
    Last edited by anu_kan2; - 8th November 2006 at 12:05. Reason: word missing

  11. #11
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    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.


    ----------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  2. PIC16F877 I2C programme
    By cooqo in forum mel PIC BASIC
    Replies: 3
    Last Post: - 21st April 2008, 10:02
  3. Replies: 8
    Last Post: - 17th January 2007, 19:18
  4. Ericsson T10 interface with PIC16F877
    By jam547 in forum GSM
    Replies: 0
    Last Post: - 25th March 2006, 22:27
  5. USB interface from PIC16F877 to PC
    By headshouter in forum USB
    Replies: 0
    Last Post: - 26th February 2006, 04:58

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts