Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RA4 pin in PIC16F872

Status
Not open for further replies.
So, what you're saying is that i have to do sometnhig like that (see image)
putting RA4=1 my relay will turn on
putting RA4=0 my relay will turn off
 

Attachments

  • ra4_pin.jpg
    ra4_pin.jpg
    66 KB · Views: 318
leonel said:
So, what you're saying is that i have to do sometnhig like that (see image)
putting RA4=1 my relay will turn on
putting RA4=0 my relay will turn off

Yes, except I don't like the LED where it is - it will restrict the base current available for the transistor slightly.

What current does your relay take?, as it's 24V the current is probably low? - if it's only 20mA or so, you may be able to connect it directly to RA4?, but check the datasheet, and make sure RA4 will take 24V, this is the advantage of an open-collector output (don't forget the diode across the relay though!).
 
Yes, my relay current it's+-20mA.
I think i cannot put 24V on RA4 pin, because in datasheet says
"Voltage on RA4 with respect to Vss 0 to +8.5V"
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top