Forums

[?] PIC16F628A - are all I/O ports tri-stated when chip is reset.

Started by David Chapman March 22, 2012
Greetings,

   I wish to use two PIC16F628A processors in a particular circuit I'm 
putting together. They will each have a different clock oscillator 
frequency, and only one PIC will ever need to operate at any particular 
time.

  Some of the I/O lines in the circuit are common to both processors so 
I'd like to ask the PIC experts in this NG if, when held in the Reset 
condition, it is definite that all of the 16F628A processor's I/O lines 
will be tri-stated.

   I'd like to keep the Vcc supply on both devices and simply switch 
between them by holding the UNwanted processor in the Reset state. Is 
this approach acceptable?

  Before anyone rushes to point out that this is not an elegant solution 
and one single processor is the correct way to go, I have to agree but 
say in my defence that since I already have code written for the 16F628A 
PICs and only need a couple of these dual-processor units, any rewrite 
of the code for a different device would not be cost effective.

   TIA   -   Dave.


-- 
David C.Chapman - (dcchapman@minda.co.uk)
--------------------------------------------------------------------------
On 3/22/2012 5:28 AM, David Chapman wrote:
> > Greetings, > > I wish to use two PIC16F628A processors in a particular circuit I'm > putting together. They will each have a different clock oscillator > frequency, and only one PIC will ever need to operate at any particular > time. > > Some of the I/O lines in the circuit are common to both processors so > I'd like to ask the PIC experts in this NG if, when held in the Reset > condition, it is definite that all of the 16F628A processor's I/O lines > will be tri-stated. > > I'd like to keep the Vcc supply on both devices and simply switch > between them by holding the UNwanted processor in the Reset state. Is > this approach acceptable? > > Before anyone rushes to point out that this is not an elegant solution > and one single processor is the correct way to go, I have to agree but > say in my defence that since I already have code written for the 16F628A > PICs and only need a couple of these dual-processor units, any rewrite > of the code for a different device would not be cost effective. > > TIA - Dave. > >
The data sheet says that all I/O pins are held in tri-state during RESET. On each pin there is a diode to Vcc and Vdd. With one device in RESET, these diodes will be seen by the other chip. If you not using the A/D converter, these diode should not bother digital I/O. Good Luck, let us know how it goes. hamilton
On 3/22/2012 8:42 AM, hamilton wrote:
> On 3/22/2012 5:28 AM, David Chapman wrote: >> >> Greetings, >> >> I wish to use two PIC16F628A processors in a particular circuit I'm >> putting together. They will each have a different clock oscillator >> frequency, and only one PIC will ever need to operate at any particular >> time. >> >> Some of the I/O lines in the circuit are common to both processors so >> I'd like to ask the PIC experts in this NG if, when held in the Reset >> condition, it is definite that all of the 16F628A processor's I/O lines >> will be tri-stated. >> >> I'd like to keep the Vcc supply on both devices and simply switch >> between them by holding the UNwanted processor in the Reset state. Is >> this approach acceptable? >> >> Before anyone rushes to point out that this is not an elegant solution >> and one single processor is the correct way to go, I have to agree but >> say in my defence that since I already have code written for the 16F628A >> PICs and only need a couple of these dual-processor units, any rewrite >> of the code for a different device would not be cost effective. >> >> TIA - Dave. >> >> > The data sheet says that all I/O pins are held in tri-state during RESET. > > On each pin there is a diode to Vcc and Vdd. > > With one device in RESET, these diodes will be seen by the other chip. > > If you not using the A/D converter, these diode should not bother > digital I/O.
Sorry, this part only has comparator inputs. And these inputs do have the diodes. So
> > Good Luck, let us know how it goes. > > hamilton
David Chapman <dave@minda.co.uk> wrote:

> >Greetings, > > > Before anyone rushes to point out that this is not an elegant solution >and one single processor is the correct way to go, I have to agree but >say in my defence that since I already have code written for the 16F628A >PICs and only need a couple of these dual-processor units, any rewrite >of the code for a different device would not be cost effective.
Switching to a different architecture will be more cost effective in the long run. Using 2 (or more) PICs is the beginning of life in a world of pain. For starters: How do you make sure that one is completely stopped before the other starts? How do you syncrhonise both processes? -- Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico@nctdevpuntnl (punt=.) --------------------------------------------------------------
On 22 Mar., 15:42, hamilton <hamil...@nothere.com> wrote:
> On 3/22/2012 5:28 AM, David Chapman wrote: > > > > > > > > > > > Greetings, > > > I wish to use two PIC16F628A processors in a particular circuit I'm > > putting together. They will each have a different clock oscillator > > frequency, and only one PIC will ever need to operate at any particular > > time. > > > Some of the I/O lines in the circuit are common to both processors so > > I'd like to ask the PIC experts in this NG if, when held in the Reset > > condition, it is definite that all of the 16F628A processor's I/O lines > > will be tri-stated. > > > I'd like to keep the Vcc supply on both devices and simply switch > > between them by holding the UNwanted processor in the Reset state. Is > > this approach acceptable? > > > Before anyone rushes to point out that this is not an elegant solution > > and one single processor is the correct way to go, I have to agree but > > say in my defence that since I already have code written for the 16F628A > > PICs and only need a couple of these dual-processor units, any rewrite > > of the code for a different device would not be cost effective. > > > TIA - Dave. > > The data sheet says that all I/O pins are held in tri-state during RESET. > > On each pin there is a diode to Vcc and Vdd. > > With one device in RESET, these diodes will be seen by the other chip. > > If you not using the A/D converter, these diode should not bother > digital I/O. > > Good Luck, let us know how it goes. > > hamilton
as long as the supply for the two are the same the adc shouldn't care about the diodes either, they will just be parallel with the diodes on the other chip -Lasse
  Very many thanks to those who took the time and trouble to answer my
posting.  Much appreciated.

  ATB -  Dave.

-- 
David C.Chapman - (dcchapman@minda.co.uk)
--------------------------------------------------------------------------