What would cause this anomaly?


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics
    Hi, Rhino

    Has a little smell of debouncing ... no ???

    Alain
    I agree... if this is truely the probem, peterdeco1, you might want to search through the forums for different techniques on debouncing your switches. There should be a wealth of information on it here somewhere.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Post

    For the lack of PortB.3 ... I'm not sure, but I read somewhere here about a bug or twisting in the pins and more generally modifyers ...

    you could verify that by naming your inputs and outputs pins as

    LedB3 var PortB.3

    etc

    and using no more modyfiers ...

    Alain

  3. #3
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    See if this helps.

    Add TRISB = %00000000 to the initialization section of your code to set RB pins up as outputs.

    Change each HIGH or LOW PORTB.? to PORTB.? = 1 or 0.

    Does it work as expected?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  4. #4
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    I'm not sure if you have already done in a part of your code that has not been posted,

    PortA 4:0 are analog inputs by default, set them to digital!
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  5. #5


    Did you find this post helpful? Yes | No

    Default

    I'm sorry I didn't post the complete code. I tried to shorten my post. At the top of my program I have:
    OSCCON = $60 'set int osc to 4mhz
    adcon1 = 7 ' set inputs to digital
    @ DEVICE MCLR_OFF, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_ON
    TRISA = %11111111
    TRISB = %00000000

    Again - the anomaly is ONLY when PORTA.5 is the LAST to close, the LED on PORTB.3 does NOT light. But the program DOES jump to "REWARD" and the MOSFETS will turn on, but PORTB.3 stays low. If you close the switch on PORTA.5 first or second, PORTB.3 goes high the way it's supposed to. Thank you.

Similar Threads

  1. INT2 anomaly in DT_INTS-18??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th February 2010, 20:07

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