Page 1 of 1

16F84 Port A

Posted: Fri Jan 23, 2009 12:59 am
by BedfordCollege
Hi
Can I just ask you to clear something up ...

I am teaching PIc programming for the 16F84 using your E-blocks mutliprogrammer development board, and associated e-block led and switch modules.

I realise that PortA RA4 on the 16F84 is dual purpose and can be used as an output of used with an external oscillator.
I wish to use it as an output to drive an led. I can't see anywhere if flowcode where I can set the relevant config bits to select this function.
Will I be able to use it if I set the relevant config bit in the assembler code instead of trying it in flowcode?

As I am using this for software teaching purposes, we won't be building our own circuits so I was hoping to use the development board 100% of the time. It will be disappointing if I can never let students use the full output capability of PortA.

Is RA4 actually connected to the corresponding led on the led module?
Is there a hardware modification which can be made to route RA4 to the fifth led on the led module?

Thanks in advance

Re: 16F84 Port A

Posted: Fri Jan 23, 2009 10:47 am
by Benj
Hello

The PortA Pin RA4 is an open drain pin only. Therefore it can only sink current rather then the usual sourcing and sinking of current. So to make the LED light up you could place a pull up resistor of say around 1K between 5V and RA4. This would allow the LED to light up when writing a 1 to the pin and allow the LED to switch off when writing a 0 to the pin.

Using this conguration when the pin is set to an input the LED will also light.

Hope this helps.

Re: 16F84 Port A

Posted: Wed Feb 04, 2009 12:57 pm
by BedfordCollege
I am a little uncomfortable making solder connections onto the multiprogrammer board.

Is there a good location to do this on the board which would be easiest.
Also, would it invalidate the warranty?

Cheers

Re: 16F84 Port A

Posted: Wed Feb 04, 2009 1:39 pm
by Benj
Hello

With your 16F84 in place simply add a 1K-10K resistor between pin 6 and pin 11 of U40. The resistor will fit into the turned pin sockets so no soldering required :) Pin 1 of U40 is marked at the top left so simply count down the number of holes starting from 1.

Let me know how you get on.