RA4 is open drain. Which means this o/p cannot source current , it can only sink current.
This means you will either need to connect load between +5V and output
When o/p is then high, FET is off so its effect is an open switch, o/p is pulled up to +5V via load
When o/p is low, FET is on so o/p is shorted to 0V, this sinks load current.
Or you need an external pull-up resistor to pull-up to +5V line. Value could be around 1K
If you're hardware is not working as expected, try looking here first:viewtopic.php?f=26&t=6936
If you find any posts that are useful, please click on the 'thumbs up' icon next to Quote button on that post.