Pic16f84a

Discussion in 'Programmer's Corner' started by ching fong kee, Jul 28, 2010.

  1. ching fong kee

    Thread Starter Member

    Jun 23, 2010
    42
    0
    hi,for the PIC16F84, if i need to reset and clear all
    how will the coding in MikroC look like?
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I think that would be a goto to the reset vector adress 0x0000h.
    Edit: In order to have full reset you must use the reset pin. But depending on how you write your software a goto to 0x0000 may be very close to a full reset
     
    Last edited: Jul 28, 2010
  3. ching fong kee

    Thread Starter Member

    Jun 23, 2010
    42
    0
    if i have a reset button on reset pin MCLR
    i just need to press the button and will be full reset?
    no code is need for reset?
     
  4. tom66

    Senior Member

    May 9, 2009
    2,613
    214
    Wire one of your pins to MCLR, and pull it low. Remember to normally pull it high with a weak 1k resistor. That should do the job. I know the higher end PIC chips have an actual RESET instruction which resets all file registers to their default state, unfortunately yours is not one of them.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
Loading...