• AVR Freaks

Hot!CPU is reseting from RA0 and RA1

Author
kiymik
Junior Member
  • Total Posts : 94
  • Reward points : 0
  • Joined: 2005/02/05 01:30:10
  • Status: offline
2020/07/13 09:17:26 (permalink)
2 (1)

CPU is reseting from RA0 and RA1

Hi, I want to share an annoying behaviour of RA0 and RA1 pins of 16f1507 and 16f15354.
In two projects one using 1507 other 15354, pins RA0 and RA1 are connected to buzzer which has several nf capacitance. Each pin is connected to gnd by 100pf capacitors. They are multiplexed to buzz and to read button (for 15354 one of them is used as analog input).
For 1507 RA1 ıs used to lit a led (active low) then read an optocoupler output from RA0. But whenever I complete reading and turning RA1 high chip is resetting. If I short circuit RA0 to gnd it does not reset. If appears that a pulse from RA1 to RA0 through buzzer capacitance is causing it. There is no reason for this reset, LVP is disabled, MCLR is input. I solved it by setting both pins as output low then turning both high simultaneously. By chance my hardvare was allowing it.
For 15354 when buzzer is activated I was setting these pins alternatingly 01 and 10, but at the first change attempt chip was resetting. That is solved by first setting both pins low then applying desired bit pattern.
This may be a common behaviour of pic16f1xxx chips that should be investigated.
Sabri
 
#1

3 Replies Related Threads

    ric
    Super Member
    • Total Posts : 27977
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: CPU is reseting from RA0 and RA1 2020/07/13 13:42:55 (permalink)
    +1 (3)
    It could be a hardware fault.
    Opening a support ticket at Microchip is the most effective way of telling them
    www.microchip.com/support
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    Antipodean
    Super Member
    • Total Posts : 1874
    • Reward points : 0
    • Joined: 2008/12/09 10:19:08
    • Location: Didcot, United Kingdom
    • Status: offline
    Re: CPU is reseting from RA0 and RA1 2020/07/13 14:12:38 (permalink)
    +3 (3)
    Sounds to me more like spikes from the buzzer are getting into the pins. he seems to have connected the buzzer direct to the pins without any driver.
    it won't matter if it is a piezo or inductive buzzer, it will still generate voltages at the pins that will go outside the maximum ratings for the chip.
     

    Do not use my alias in your message body when replying, your message will disappear ...

    Alan
    #3
    PStechPaul
    Super Member
    • Total Posts : 2811
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: CPU is reseting from RA0 and RA1 2020/07/13 14:50:03 (permalink)
    +3 (3)
    Show the complete schematic and your source code. It could be improper bypass capacitors on the Vss and Vdd pins, or a floating MCLR, or noise from a ground or power supply connection.

     
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5