Multiple functions by a single switch - Page 4


Today 13:26
Forum: Proton Plus Compiler v3
Starter: gdesantis
Views: 0
Replies: 2
Today 11:23
Forum: The Lounge
Starter: Les
Views: 0
Replies: 12
+ Reply to Thread
Page 4 of 4 FirstFirst ... 234
Results 31 to 34 of 34

Thread: Multiple functions by a single switch33 days old

  1. #31
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    67
    Thumbs Up
    Received: 43
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Multiple functions by a single switch

    RELAY CONNECTED ON PORTA.6 IS NOT WORKING BUT USING SAME PROGRAM IN PICBASIC PRO IT IS WORKING.IS THERE ANY PROBLEM WITH FUSE SETTINGS.

    MY SETTINGS ARE

    ;-------------------------------------------------------------------------------
    ;**** Added by Fuse Configurator ****
    ; Use the Fuse Configurator plug-in to change these settings


    Device = 16F886


    Config1 FOSC_INTRC_NOCLKOUT, WDTE_OFF, PWRTE_OFF, MCLRE_OFF, CP_OFF, CPD_OFF, BOREN_OFF, IESO_ON, FCMEN_OFF, LVP_OFF, DEBUG_OFF
    Config2 BOR4V_BOR40V, WRT_OFF


    ;**** End of Fuse Configurator Settings ****
    ;-------------------------------------------------------------------------------

  2. #32
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,212
    Thumbs Up
    Received: 18
    Given: 0
    Total Downloaded
    614.99 MB

    0 Not allowed!

    Default Re: Multiple functions by a single switch

    Sorry Amod, I do not use 16F devices so I cannot help with device specific config as I have nothing to test with.

    The only thing that might help is if you can use your programmer to view the fuse values to see if they are different.
    My RAM is failing

  3. #33
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,374
    Thumbs Up
    Received: 86
    Given: 23
    Total Downloaded
    4.04 GB

    0 Not allowed!

    Default Re: Multiple functions by a single switch

    Quote Originally Posted by amod View Post
    RELAY CONNECTED ON PORTA.6 IS NOT WORKING BUT USING SAME PROGRAM IN PICBASIC PRO IT IS WORKING.IS THERE ANY PROBLEM WITH FUSE SETTINGS.

    MY SETTINGS ARE

    ;-------------------------------------------------------------------------------
    ;**** Added by Fuse Configurator ****
    ; Use the Fuse Configurator plug-in to change these settings


    Device = 16F886


    Config1 FOSC_INTRC_NOCLKOUT, WDTE_OFF, PWRTE_OFF, MCLRE_OFF, CP_OFF, CPD_OFF, BOREN_OFF, IESO_ON, FCMEN_OFF, LVP_OFF, DEBUG_OFF
    Config2 BOR4V_BOR40V, WRT_OFF


    ;**** End of Fuse Configurator Settings ****
    ;-------------------------------------------------------------------------------
    Try this one: -

    Code:
    Declare Reminders Off
    @ CONFIG_REQ = 0 ; Override Compiler's configuration settings
    Asm-
    __Config _Config1, 0x20D4 ;FOSC_INTRC_NOCLKOUT & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & CP_OFF & CPD_OFF & BOREN_OFF & IESO_OFF & FCMEN_OFF & LVP_OFF & DEBUG_OFF 
    __Config _Config2, 0x3EFF ;BOR4V_BOR21V & WRT_OFF 
    Endasm-
    Declare Reminders On
    Basically all I changed is the IESO to OFF.

    It is very strange. Have you looked at the hardware again maybe there is something wrong?

    Could you just drive an LED, disconnecting the relay and see if it works?

    I do not have an 886 at hand to try it in real world.

    Also make sure that all PORTA is set to digital if not using any analog. See page 40 of the datasheet, because a PORT set to analog seems that it can be used to digital, but input is analog, although PORTA.6 does not have analog.

    What are you using to turn ON PORTA.6?

    PORTA.6 = 1 or High PORTA.6?

    I would try using High PORTA.6.

    If not Dim a Temp as byte then: -

    Code:
    Dim Temp    As Byte = 0
    
    ' Turn ON PORTA.6
    Temp = PORTA
    Nop
    Nop
    Temp.6 = 1
    Nop
    Nop
    PORTA = Temp
    
    '------------------------------------------------
    
    ' Turn OFF PORTA.6
    Temp = PORTA
    Nop
    Nop
    Temp.6 = 0
    Nop
    Nop
    PORTA = Temp
    Regards

    Joseph

  4. #34
    Junior Member amod's Avatar
    Join Date
    Mar 2018
    Posts
    67
    Thumbs Up
    Received: 43
    Given: 4
    Total Downloaded
    5.95 MB

    0 Not allowed!

    Default Re: Multiple functions by a single switch

  5. There was a mistake in my relay code.
    Thanks all for support.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. TCK106AF, TCK107AF and TCK108AF single-chip load switch ICs
    By normnet in forum New devices and techniques
    Replies: 0
    Last Post: 31st March 2016, 23:19
  2. Multiple button on a single ADC port.
    By wirecut in forum Proton Plus Compiler v3
    Replies: 10
    Last Post: 14th July 2014, 19:52
  3. New ADG5419 single-pole/double-throw (SPDT) switch
    By normnet in forum New devices and techniques
    Replies: 0
    Last Post: 5th April 2014, 23:09
  4. Replies: 0
    Last Post: 5th April 2014, 23:09
  5. Multiple PIC's driven from a single reset
    By knight in forum The Lounge
    Replies: 8
    Last Post: 24th October 2010, 08:56

Posting Permissions

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