16F84 Port A

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
BedfordCollege
Posts: 10
Joined: Thu Nov 27, 2008 10:23 am
Contact:

16F84 Port A

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16F84 Port A

Post 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.

BedfordCollege
Posts: 10
Joined: Thu Nov 27, 2008 10:23 am
Contact:

Re: 16F84 Port A

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 16F84 Port A

Post 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.

Post Reply