PDA

View Full Version : Help on PIC16F767



Rony
- 23rd August 2010, 20:13
Dear all,

i am facing a problem when using the PIC16F767: when i touch the oscillator pin and remove my finger, it stops running !! usualy when touching this pin the PIC stops runing (any other pic number) and when removing the finger it resumes. (i know it is not necessary to touch it but sometimes it is happening alone, and touching it is instead of waiting few minutes to happen alone), any help for that ??

Acetronics2
- 23rd August 2010, 20:41
Hi, Rony ...

Could you, please, :o provide your program header ??? ( ALL configs + pins assigned )

Alain

Rony
- 23rd August 2010, 21:02
DEFINE OSC 20

PORTA = %00000000
PORTB = %00000000
PORTC = %00000000

TRISA = %10111111
TRISB = %00000000
TRISC = %10100010

OPTION_REG = %00000111
INTCON = %00000000
ADCON0 = %00000000
ADCON1 = %00001111
ADCON2 = %00000000
CMCON = %00000111
T1CON = %00000000

TMR2 = 0
PR2 = 0
CCPR1L = 0
CCPR2L = 0
CCPR3L = 0
CCP1CON = 0
CCP2CON = 0
CCP3CON = 0
T2CON = 0

PIR1 = 0
PIR2 = 0
PIE1 = 0
PIE2 = 0
PCON = %00000011


Main:
....
goto main

Rony
- 23rd August 2010, 21:04
i think it is not stoping, but it is going very very very slow.....

gadelhas
- 23rd August 2010, 21:07
HI;


Try put this on the header, before the oscilator Define, and them test!
@ __config _HS_OSC & _LVP_OFF

Rony
- 23rd August 2010, 21:09
i forget to say:

i changed the Oscillator, i tried with a resonator, i put a 100nF on the + and - very near to the PIC, i tried with 8MHz ... without sucess :confused: :confused:

Rony
- 23rd August 2010, 21:12
i am using the following:

@ device pic16F767, hs_osc, wdt_off, pwrt_on, protect_on, mclr_off

lvp_off is not applicable with this PIC

=> same problem

gadelhas
- 23rd August 2010, 21:18
i am using the following:

lvp_off is not applicable with this PIC

=> same problem

You're right, confused with 16F876.

Rony
- 23rd August 2010, 21:22
Finally i found it,

"gadelhas" remark lets me think about the configuration ... thank you :cool:

there is a check box called "FCMEM" in the WinPIC800 programmer, when turning it OFF, it works, and all the rest will not affect this problem.

anyone knows what is this "FCMEM" that it must be off ??

thank you for all.
Rony

gadelhas
- 23rd August 2010, 21:24
Well Done!..... :) :)

Rony
- 23rd August 2010, 21:38
i searched for the FCMEM, it is described as follows :

FCMEN: Fail-Safe Clock Monitor Enable bit
1 = Fail-Safe Clock Monitor enabled
0 = Fail-Safe Clock Monitor disabled

Now everything is clear :D:D:D

Regards
Rony