I/O pin default low.


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Apr 2016
    Location
    Plainfield, Illinois
    Posts
    73


    Did you find this post helpful? Yes | No

    Default Re: I/O pin default low.

    ok - no insults please... - if someone wants to clean my code up for $ I'm all ears... - seriously...

    16f15324PIC-SCHEM.pdf

    schematic says it s 16f616 - its not - its a 16f15324 ********************

    #CONFIG
    __config _CONFIG1, _FEXTOSC_OFF & _RSTOSC_HFINT32 & _CLKOUTEN_OFF & _CSWEN_ON & _FCMEN_OFF
    __config _CONFIG2, _MCLRE_ON & _PWRTE_ON & _LPBOREN_OFF & _BOREN_ON & _BORV_LO & _ZCD_OFF & _PPS1WAY_OFF & _STVREN_ON
    __config _CONFIG3, _WDTCPS_WDTCPS_11 & _WDTE_ON & _WDTCWS_WDTCWS_6 & _WDTCCS_SC
    __config _CONFIG4, _BBSIZE_BB512 & _BBEN_OFF & _SAFEN_OFF & _WRTAPP_OFF & _WRTB_OFF & _WRTC_OFF & _WRTSAF_OFF & _LVP_OFF
    __config _CONFIG5, _CP_ON
    #ENDCONFIG


    OSCCON1=%00000011
    OSCCON2=%00000011
    INLVLA = %11111
    INLVLC = %1111111
    TRISC = %11111111


    DEFINE OSC 4
    OSCFRQ_4MHZ

    ANSELA = PORTA.2
    ANSELC = %00000

    OUTPUT PORTA.1 ' FAULT LED
    OUTPUT PORTA.0 ' TIMING LED
    OUTPUT PORTA.4 ' FET
    INPUT PORTA.5 ' IGNITION
    INPUT PORTC.5 ' V UNDER TRIP POINT - 11 OR 11.75
    input PORTC.4 ' CHOICE BIT OF HOW THIS TURNS ON


    SW1 - SW6 are inputs
    green and red - outputs to leds
    "Battery sense" is an analog in
    "I sense" is a 12V in (broken down to <5v)
    FET - output


    whats happeing is when IG comes on the program resets when there is a load on FET - with no load it works. (I'm trying more filtering on IG AND FET output and make sure C3 is .1)

    btw - insult it all you want...

    Again - I'm all ears on someone helping me - lmk I'll giv emy email and set it up.
    Last edited by pescador; - 31st May 2023 at 13:55.
    My dad never liked you...

Similar Threads

  1. How to set pin to digital by default? PIC18F24J50
    By picmilan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 29th May 2016, 22:27
  2. Replies: 10
    Last Post: - 14th April 2014, 21:47
  3. Can't keep a pin low
    By bartman in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 6th January 2006, 15:04
  4. Trouble pulling pin Low
    By pdegior in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th August 2005, 21:49
  5. Reading if Pin is High or Low?
    By Spindle in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 1st August 2005, 18:39

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