PDA

View Full Version : Pic 16 F628A not working



turkuaz
- 13th March 2009, 10:31
Hi.Frends.

I want to use F84 but in my Country ı can not find F84 SMD. So I decide F28 to use becouse ı can find F628 SMD easly.
But ı have a problem with f628 as follows:

I wrote the for F84 and I did necessery changing for F628 but code not working on F628.

Code sample for F628:

....
....
....
CMCON=7
VRCON=0

......
......
But it is not vorking. then:

CMCON =7

.....
.....

Not working.


Is there another way to need chamge or what Iam doing wronge.

If anybody helpme thanks alot!....

Pic2008
- 13th March 2009, 12:45
Can you explain what you meant by not working? is it cannot read the input, set the output, compilation error etc?

helloo
- 13th March 2009, 23:20
merhaba. Do you have a pullup resistor on pin a5/mclr?

That was often the reason why my progs didn't seem to work.

But beware: If you use ICSP you have to combine the resistor with a diode to prevent your circuits from the +12V of the programmer!

turkuaz
- 16th March 2009, 14:24
Thanks for your interest.
F628 REALLY not working .
I use f84 on same board but when ı put F628 NOTTİNG HAPPEN. I can not see any charecter on LCD. or any output from pic.
I think pic not recoc. Oscilator. Maybe ı do same mistake when ı write the code. Is there a way that ı declare to pic that use external xtal oscilator 20 MHz.
Thanks.

Acetronics2
- 16th March 2009, 14:36
Hi, Turkouaz

there's a major difference in the PortA inputs ...

TTL for 16F84a ...

Schmitt Trigger for 16F628a ...

soooo, I'd recommend you to check your input levels on PortA

THE solution for this problem is to use a 16F87/88 ...

Alain

PS: code lines are never too much to show : anything you have to hide ???

turkuaz
- 16th March 2009, 14:43
Thanks ACTRONICS.
But I do not use any A port.
But I want to use F628 because ı can use SMD F628 in my board.
Thanks

turkuaz
- 17th March 2009, 12:26
I fond the problem myself.
In defoult in f628 .inc files osc is XT osc. I changed it to HS_OSC the problem has gone.
Thanks everyone.