how to use the internal comparator in pic16f877a??


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    @ DEVICE pic16F877a, INTRC_OSC_NOCLKOUT
    ' System Clock Options
    @ DEVICE pic16F877a, WDT_ON
    ' Watchdog Timer
    @ DEVICE pic16F877a, PWRT_ON
    ' Power-On Timer
    @ DEVICE pic16F877a, MCLR_OFF
    ' Master Clear Options (Internal)
    @ DEVICE pic16F877a, BOD_ON
    ' Brown-Out Detect
    @ DEVICE pic16F877a, LVP_OFF
    ' Low-Voltage Programming
    @ DEVICE pic16F877a, CPD_OFF
    ' Data Memory Code Protect
    @ DEVICE pic16F877a, PROTECT_OFF
    ' Program Code Protection

    BatVal var CMCON.7

    BatLoLED var PORTB.7

    CMCON=%00100101


    VRCON=%11101100

    Pauseus 10

    TRISA=%11111111
    TRISB=%00000000

    BatLoLoop:
    BatLoLED=BatVal

    Goto BatLoLoop

    End

    my vref=4v, vin=3.6 and my vout=9v.can someone help me which part of the coding need to be edit.please...

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    my vref=4v, vin=3.6 and my vout=9v.can someone help me which part of the coding need to be edit.please...
    Vref = 4v - what is Vref connected to?
    Vin = 3.6v - what is Vin connected to?
    Vout = 9v - what is Vout connected to?

    Read the datasheet for the 16F877A!
    Can MCLR be turned off?
    How many oscillator modes does the 16F877A have? What are they?
    Last edited by skimask; - 17th September 2008 at 18:58.

Similar Threads

  1. Internal vs. external osc for comms
    By mtripoli in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th January 2010, 14:58
  2. 12F683 internal pull up
    By hvacrtech in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th July 2008, 02:35
  3. communicating pic18f452 with pic16f877a
    By tamersoss in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 13th July 2007, 19:54
  4. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38
  5. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41

Members who have read this thread : 0

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