Curious problem with PIC16F88 and PICF767 I/O signal

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Has thanked: 196 times
Been thanked: 26 times
Contact:

Curious problem with PIC16F88 and PICF767 I/O signal

Post by christoph »

I am sending 12 outputs from the F88 Ports A and B to the to their matching Port A and B inputs on the F767. Eleven signals work perfectly without fail but A4 will not work under any circumstances. I have no problem with the transmission (I have used successfully with UART and directly wired). I have changed chips, re-wired, changed boards, breadboarded separately checked wiring for theory/continuity/resistance etc and even replicated the set-up on three transmitter and three receiver boards and any combination performs exactly as it should but not A4. During all this it transpired that I could send and receive A4 successfully if the receiving chip was also an F88, however, I need the additional Ports provided on the F767 and unfortunately I have no physical space or time for re-design in the transmitter unit to change to a 767. In any case I cant see anything in the Data Sheets that would preclude this. Flowcode also simulates without a problem. Note that I have also tried to use the 'spare' outputs of A2 and even B2 on the F88 (as they should also be available on the F767 but again, they do not respond).

Would very much appreciate advice to understand what could be the problem - I REALLY need to have 12 signals!!

Many thanks in advance....!
Chris

Soren
Posts: 12
Joined: Tue Jun 09, 2009 4:17 pm
Has thanked: 1 time
Been thanked: 3 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by Soren »

Hello Chris

If you take a look in the datasheet, you will see that port A4 only work as a open-drain output.

Soren
Attachments
open-drain.jpg
(205.55 KiB) Downloaded 2636 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by medelec35 »

Hi Chris,
In addition to Soren's post (thanks for posting) :) :
Open drain That means that the output can be pulled down but can't be pulled up by the microcontroller. In other words can only sink current and unable to source.
What you will need to do is pace a pull-up resistor e.g 2k2 to 10K between RA4 and +5V. then all should work as expected.

Martin
Last edited by medelec35 on Thu Nov 21, 2013 8:41 am, edited 1 time in total.
Reason: Removed same information as posts crossed.
Martin

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Has thanked: 196 times
Been thanked: 26 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by christoph »

Hi Martin - very many thanks - I was just about to come back on the forum to say I had literally JUST read that in the 'hardware not working' section and was getting the data sheets out again to check!! Cant believe I missed that! I will sort it out right away. Many thanks for immediate reply. Have a good evening - you've made mine! :D

Cheers, Chris

P.S ...and many thanks to Soren who also posted the same advice too :D

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Has thanked: 196 times
Been thanked: 26 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by christoph »

Hi fellas,
Just one further point - I have tried a variety of resistors and using two F767's but the LED is ON to some degree all the time. Is this something I need to configure etc? Also now wondering why A2 and B2 dont work, as THEY are NOT open drain?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by medelec35 »

Can you post a circuit diagram and flowchart please so I can have a further look for you.

If your using open drain pin to power LED, then LED anode via the correct current limiting resistor has to be connected to a positive supply.
LED cathode has to be connected to the open drain pin.
To light LED the output has to be LOW.
To switch LED off, open drain o/p has to be HIGH.

LED is probably on all the time since you could if set output low expecting LED to go off.

When I mentioned values of LED, I did nor realize you wanted to drive LED's

Just use the resistor you would for normally driving LEDs and not 2K2 to 10K (unless 2K2 is low enough to drive LED of course)
Martin

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Has thanked: 196 times
Been thanked: 26 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by christoph »

Hi Martin, many thanks for sparing the time to come back re my last post - sorry not replied earlier but out all day and just been re-addressing the problem but I cant really alter the way I signal A4 to operate differently to the other signals on the port as I need transmitting and receiving devices to have their ports behaving in the same way. The two devices are tightly packed in a very small package and I have no time to modify them but whilst toying with how I could get round the problem before coming back to you, I was 're-visiting' the question of A2 and B2 not working and substituted a rather grubby looking F88 for a recently purchased one, and unbelievably both outputs worked fine so I am able to use the A2 with a wire link to provide the 12th output now. Tried the original F88 and neither worked. That is the first time ever, I think, that I have had what appears to be a malfuctioning chip. I have had a couple of chips go where I knew they had been 'overstretched' of course but they are pretty tough these days
Once again though, thanks for your help - its much appreciated

Cheers Chris :D

christoph
Flowcode V4 User
Posts: 382
Joined: Tue Nov 01, 2011 4:28 pm
Has thanked: 196 times
Been thanked: 26 times
Contact:

Re: Curious problem with PIC16F88 and PICF767 I/O signal

Post by christoph »

P.S Just for clarity - That is, both outputs on the receiving F767 of course!

Post Reply