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.

problem in configuring pins as inputs in 16F628A

Status
Not open for further replies.

hemnath

Advanced Member level 3
Joined
Jun 24, 2012
Messages
702
Helped
61
Reputation
120
Reaction score
57
Trophy points
1,308
Location
Chennai
Activity points
6,588
Hi,
I worked lots of projects using PIC18 microcontroller.
Now I am in need of using PIC16F628A for a project. Crystal used 6.144Mhz.
I have configured the B4-B7 pins as inputs using TRIS register.

TRISB = 0b11110000;

But when i measure the voltage at B7 pin, it shows +5V. I have left the pin open.

What could be the problem.

Thanks in advance:)
 

try pulling them down through 10 k resistor to ground if you want them to be initialized to be zero always .Also when a port is generally set as input it has a floating value so it is generally in the range of 3 to 5 v So this might be the case here . Also check POR values of the PORTB ,and OPTION_REG for RBPU . Also first thing to check would be board connections as mentioned above .
 

Please check the file. I have connected like this in my hardware.
when the switch is open, Voltage across R2-R3 is around 4V.
 

Attachments

  • file.bmp
    860.7 KB · Views: 89

yeah ok ..
But i don't think that those resistor value could cause the problem. They are used to limit the current.

Let me check it and get back to you soon. :)

Thank you:)
 

both resistors in series shd have 10k... if u didnt got output, post project file.....
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top