Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pic16f877a port voltage

Status
Not open for further replies.

aswathymohan

Member level 4
Member level 4
Joined
Nov 11, 2012
Messages
68
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,288
Visit site
Activity points
1,727
Hi


I am using pic16f877a for relay driver interfacing program.To make the relay on,i need 5 v,what m getting from the pic is 2.25 v when i make the respective port as high .how to fix this issue


Regards
 

At what voltage you are running your PIC mcu Board ??

How you have checked the voltage coming out of the Pin??
 

At what voltage you are running your PIC mcu Board ??

How you have checked the voltage coming out of the Pin??

PIC MCU board operationg voltage :5V

Ya I have checked the voltage from the pin,its still 2.25-2.45V

- - - Updated - - -

Are you sure you aren't using a pin with an open collector output? Have you configured that pin to be an output?

I have configured the pin as output.This is ma code

Code:
void main()
{
  TRISB.F7 = 1; //Configure 1st bit of PORTD as input
  TRISB.F6 = 0; //Configure 1st bit of PORTB as output
  PORTB.F6 = 0; //LED OFF
while(1)
{
    if(PORTB.F7 == 1)   //If the switch is pressed
    {

         PORTB.F6 = 0; //LED ON

    }
    else if(PORTB.F7==0)
    {
        PORTB.F6 = 1;
    }
 }
}
 

Hi,

Are you using a transistor between the pics pin and the relay, I suspect not.

A relay connected directly to the pics pin will have a current need greater than the pics pin can supply so the voltage will drop when the relay tries to energise.

You can see from this link how to interface devices that need more current than a pics pin can supply.

Its generally better to use a 12v relay than 5v.

http://www.winpicprog.co.uk/pic_tutorial_extras.htm
 

that means relay is not working right. u have also try with any opt-coupler ic to operate relay using pic.
 

that means relay is not working right. u have also try with any opt-coupler ic to operate relay using pic.

if i gave 5v supply,relay on and works perfectly,but when the port is making high and connected to the same,it wont work
 

Hi,

Given that your relay drive / hardware is ok I would suspect that the fault is in your code and / or input switch.

Possibly what is happening is that the whole circuit / program code is switching on and off very fast, so producing the 2.25v.

To prove the point add a 2 second delay after you turn the relay on, if the relay now comes on for 2 seconds that proves the point.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top