Strange issue in 16F877

Microcontroller Topics
Post Reply
Leo
Corporal
Corporal
Posts: 8
Joined: Fri Jul 17, 2009 7:28 pm

Strange issue in 16F877

Post by Leo » Fri Jul 17, 2009 7:45 pm

Hi,

I have developed a door control system using a PIC16F877 microcontroller.
It mostly get stuck but sometimes work nicely. I'm quite clear that it is a problem of the microcontroller since I was able to operate the other parts separately.
The oscillator I used is a 40 MHz one and I used Power MOSFET for switching.

Do you have any idea?

Leo
User avatar
Magneto
Major
Major
Posts: 430
Joined: Wed Jul 15, 2009 1:52 pm
Location: London

Re: Strange issue in 16F877

Post by Magneto » Sat Jul 18, 2009 11:21 pm

Hi ,
Can you try with some bit low frequency oscilator like 4 MHz . As your application is not very much speed critical ,
there is no need to go for high frequency oscilator. 4 MHz is very much sufficient for you application.

When you choose an oscilator , you must check the maximum speed , that your microcontroller could clock.
you can see this in the data sheet. if you clock the microcontroller more than this threshold frequency ,
It will not work correctly
NTSH1996
Sergeant
Sergeant
Posts: 19
Joined: Sat Jan 02, 2010 12:57 am

Re: Strange issue in 16F877

Post by NTSH1996 » Sat Jan 02, 2010 7:20 am

16f877 isn't working with 40 MHz oscillators. Max 20 Mhz try data sheet
Kavee
Corporal
Corporal
Posts: 3
Joined: Tue Jan 12, 2010 11:48 am
Location: Colombo

Re: Strange issue in 16F877

Post by Kavee » Tue Jan 12, 2010 2:45 pm

Working with microcontrollers needs bit of reading, planning and proper circuit design, even for a simple project. These devices are extremely susceptible to electrical noise, min/max voltages, signal thresholds, and not least the usage of proper and matching interconnecting devices.

As an example, your project wont need higher clock frequencies to operate in the first place. So going on slower makes life easier. High frequency means more demanding interconnecting devices. Meaning all signals going into external devices at higher frequencies also should be within responsive regions.

All this attributes to reading of the specifications first ;)
Post Reply

Return to “Microcontrollers”