Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 28, 2024, 05:45:52 05:45


Login with username, password and session length


Pages: [1]
Print
Author Topic: Need urgent help for interfacing 89c51 and pic16f877  (Read 4846 times)
0 Members and 1 Guest are viewing this topic.
aamir
Hero Member
*****
Offline Offline

Posts: 505

Thank You
-Given: 37
-Receive: 229


« on: January 28, 2010, 07:44:02 07:44 »

I am using pic16f877A microcomputer  in same circuit board pin 33 of PIC16F877A (configured as input)  is connected with  pin 13 of 89c51 (configured as output ) . pin no 13 of at89c51 microcontroller is connected with intr of pic 16f877a pin 33. when logic 1 is applied to 877a voltage on pin is 5 V but when logic 0 is applied, voltage is somewhere between 1.2v to 1.4 volts therefore some times 877a does not recognize interrupt.
« Last Edit: January 28, 2010, 10:54:57 10:54 by SONSiVRi » Logged
SONSiVRi
Administrator
Hero Member
*****
 Warned
Offline Offline

Posts: 1621

Thank You
-Given: 75
-Receive: 405



WWW
« Reply #1 on: January 28, 2010, 08:27:37 08:27 »

I'd prefer better topic subject, so to let people know about your situation. This is stated in rules also.

Did you tried pull-down R?
Logged

- Houston, we have a problem.
aamir
Hero Member
*****
Offline Offline

Posts: 505

Thank You
-Given: 37
-Receive: 229


« Reply #2 on: January 28, 2010, 08:39:45 08:39 »

Yes i HAVE PULL DOWN R
Logged
SONSiVRi
Administrator
Hero Member
*****
 Warned
Offline Offline

Posts: 1621

Thank You
-Given: 75
-Receive: 405



WWW
« Reply #3 on: January 28, 2010, 10:52:42 10:52 »

You might have enabled internal pull-ups?
Code:
RBPU (OPTION_REG<7>)
Logged

- Houston, we have a problem.
zuisti
Senior Member
****
Offline Offline

Posts: 409

Thank You
-Given: 242
-Receive: 780


« Reply #4 on: January 28, 2010, 11:53:26 11:53 »

Hi;
I think it's a program error. Check again the pin directions!
Seems the measured voltage (1.2-1.4 V) is a "floating" value: all both pins are inputs.
An other possible case: all pins are outputs and the 89c51 pin is too weak to pull down
the PIC's pin (emits logical 1) to zero.
zuisti
Logged
oldvan
Senior Member
****
Offline Offline

Posts: 372

Thank You
-Given: 154
-Receive: 107


If the van is a Rockin'...


WWW
« Reply #5 on: January 28, 2010, 12:17:50 12:17 »

...pin 33 of PIC16F877A (configured as input)  is connected with  pin 13 of 89c51 (configured as output )...

Assuming you are working with DIP40 packages, that would be RB0/INT of the 16F877 and P3.3 of the 89C51.

TRISB0 on the PIC needs to be set to 1 so that RB0 is an input,
and the equivelant needs set on the 89C51 so that P3.3 is an output.

Quote from: aamir
...when logic 1 is applied to 877a voltage on pin is 5 V
but when logic 0 is applied, voltage is somewhere between 1.2v to 1.4 volts therefore some times 877a does not recognize interrupt.

Is this measured with a voltmeter, or with an oscilloscope?

Something maybe not so obvious but possibly causing the symptomsis the watchdog
timer on the PIC.  If it is enabled and not being cleared regularly, the PIC will
be resetting about every 18 mS, reverting the RB0 pin to an oputput until the code
changes it back to an input.  This could account for the measured voltage and be
the cause of erratic behavior.

Does the VDD rail have adequate decoupling capacitors to the VSS rail?
Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC