Leaves the mainloop???


Results 1 to 40 of 46

Threaded View

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


    Did you find this post helpful? Yes | No

    Default Re: Leaves the mainloop???

    Quote Originally Posted by richard View Post
    try again with a red led and no resistor, i'm talking overloaded pin
    yout lat code worked but...

    I used this

    WDTE_OFF and it didnt come out of mainloop - worked

    I also tried this

    PWRTE_OFF - and I was able to write to my fet which had a load connected to it - didnt work right before I changed PWRTE_ON. (NOT SURE WHY)

    Also - I know trisa = % 11101101 makes the inputs and outputs - but what does your code indicate? (why 8?)

    I have this:

    A0 - Led1 output
    A1 - led2 output
    A2 - Analog in
    A3 - CLR
    A4 - TTL Output to turn on FET
    A5 - Input (TTL)

    Ports C are all ttl inputs

    can you help me set these registers up richard? -

    VERY MESSY

    OSCCON1=%00000011
    OSCCON2=%00000011

    INLVLA = %00000
    INLVLC = %00000
    TRISC = %11111 ' MAKE INPUTS

    DEFINE OSC 4
    OSCFRQ_4MHZ

    ANSELA = PORTA.2 ' MAKE ANALOG INPUT
    ANSELC = %00000 ' MAKE DIPSWITCH INPUTS DIGITAL
    Last edited by pescador; - 1st June 2023 at 00:05.
    My dad never liked you...

Similar Threads

  1. Time taken to do mainloop
    By Gerald in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th March 2023, 15:16
  2. Outside the Mainloop
    By pescador in forum General
    Replies: 10
    Last Post: - 26th April 2016, 18:34

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