pic16f15223 ra3/mclre/vpp configuration

Thread Starter

matang008

Joined Aug 2, 2024
1
hello,
i am using pic micro controller 16f15223 for one of my project in which i have used all other pins and only one left is pin no 4 i.e mclre/vpp/ra3
i have added config for mclre=intmclre to use mclre function at the time of programming and then i can use as i/o pin for adding function on it

i have made ra3 as input pin and made it high by weak pull up command in assembly language but as far as i undersatnd weak pull up will pull the voltage up to 5v(i.eVDD) but when i measure voltage on that pin it shows around )0.6v-0.7v then i added external resistor of 10k ohms resistance from vdd it pulled up

i wanted to attach an switch from ground so that it can give me function like when the pin is high(i.e switch is not connected to ground )it will turn on led on other pin and when the pin is grounded via switch the pin sense low voltage around 0 it will turn off the led

but its not working as intended

can anyone help me by posting assembly code for that so that i can get better idea
 

BobTPH

Joined Jun 5, 2013
11,546
The weak pullup is just as advertised — weak. Your meter was probably overloading it and pulling it down. It is probably equivalent to a several Meg resistor. The datasheet will show how much current it can source. Multiply that by your meter input resistance to get the voltage drop when measuring it.
 
Top