• AVR Freaks

Hot!PIC16f1936 get reset while running

Author
prasanth R
Starting Member
  • Total Posts : 57
  • Reward points : 0
  • Joined: 2017/01/10 04:46:37
  • Location: 0
  • Status: offline
2019/04/10 03:14:38 (permalink)
0

PIC16f1936 get reset while running

Dear all,
        I'm using pic16f1936 Controller MPLAB c18 IDE version 8.90 and high tech compiler. I'm using this controller for touch key sensing purpose(8 touch input and 8 corresponding Outputs). I was used the source code which was given by microchip.
        I have three problems in this controller. One is while running its automatically gets reset.
        Second one is sometime i tried to touch one key and corresponding output gets ON but at the same time some other key output also turns ON. then some time some inputs keys are not sensed and they gets works after resetting the controller.
       Third one is sometime some touch inputs never gets works(respective outputs never turn ON/OFF). I debugged the controller and corresponding key oscillator count gives 0.
      I don't know why its happening. Please help me to solve this issue.
 
Thanks & Regards,
Prasanth. 
 
 
#1

6 Replies Related Threads

    pcbbc
    Super Member
    • Total Posts : 891
    • Reward points : 0
    • Joined: 2014/03/27 07:04:41
    • Location: 0
    • Status: offline
    Re: PIC16f1936 get reset while running 2019/04/10 03:32:47 (permalink)
    +1 (1)
    Sorry, I can't quite see your screen from here.
    Is it perhaps possible you could post code?  Otherwise the error is on line 42.
     
    Most likely reason for spontaneous reset is that you have watchdog timer (WDT) enabled in your configuration.  Disable it if you are not using it.
    #2
    prasanth R
    Starting Member
    • Total Posts : 57
    • Reward points : 0
    • Joined: 2017/01/10 04:46:37
    • Location: 0
    • Status: offline
    Re: PIC16f1936 get reset while running 2019/04/10 04:14:20 (permalink)
    0
    okay. But i'm not using WDT and i disabled it in configuration. I attached the code for your reference.
    #3
    qhb
    Superb Member
    • Total Posts : 9919
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC16f1936 get reset while running 2019/04/10 06:40:18 (permalink)
    +1 (1)
    That code is writing to PORT registers rather than LAT registers for all the output pin manipulation.
    Stop doing that!
    Change everywhere that you write to pin with code like:
    RA0 = input_buffer1[9];
    to
    LATA0 = input_buffer1[9];
     
    #4
    prasanth R
    Starting Member
    • Total Posts : 57
    • Reward points : 0
    • Joined: 2017/01/10 04:46:37
    • Location: 0
    • Status: offline
    Re: PIC16f1936 get reset while running 2019/04/12 05:24:49 (permalink)
    0
    Ok. I will try it and get back to you.
    #5
    DeutcheN
    Senior Member
    • Total Posts : 93
    • Reward points : 0
    • Joined: 2010/09/01 12:35:40
    • Location: DM43BH
    • Status: offline
    Re: PIC16f1936 get reset while running 2019/04/18 14:20:01 (permalink)
    0
    Also check you power supply.  Make sure your Vdd does not drop below 2.6V since you have BOR enabled.
     
    As for the buttons not being detected or very sensitive, you wil need to play with the settings of the CPS. It may benefit you if you switch to a device that has a CVD module instead.  The CVD is much more stable and reliable than the CPS for cap sensing.
     
    #6
    prasanth R
    Starting Member
    • Total Posts : 57
    • Reward points : 0
    • Joined: 2017/01/10 04:46:37
    • Location: 0
    • Status: offline
    Re: PIC16f1936 get reset while running 2019/04/18 21:17:44 (permalink)
    0
    okay. Now i face that problem of sensing issue in this controller. Some keys cap sensing frequency is not stable. They gets detected even i didn't touch that.
    #7
    Jump to:
    © 2019 APG vNext Commercial Version 4.5