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
Curious problem with PIC16F88 and PICF767 I/O signal
Moderator: Benj
Re: Curious problem with PIC16F88 and PICF767 I/O signal
Hello Chris
If you take a look in the datasheet, you will see that port A4 only work as a open-drain output.
Soren
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
-
- 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
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
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.
Reason: Removed same information as posts crossed.
Martin
-
- 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
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!
Cheers, Chris
P.S ...and many thanks to Soren who also posted the same advice too
Cheers, Chris
P.S ...and many thanks to Soren who also posted the same advice too
-
- 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
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?
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?
-
- 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
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)
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
-
- 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
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
Once again though, thanks for your help - its much appreciated
Cheers Chris
-
- 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
P.S Just for clarity - That is, both outputs on the receiving F767 of course!