capacitor in wire DQ ?

frank10

Member
I made a circuit with a DS2413 to look for external switch on/off.
Is it necessary to add a capacitor on the DQ line to avoid 5V loss when the master sends reset?
Which uF and how should I connect it? Should I put also a diode?
I put my circuit, could you modify it with the capacitor? Thank you.
 

Attachments

  • DS2413_switch copia.gif
    DS2413_switch copia.gif
    5.3 KB · Views: 6
No capacitor is needed and if one is used then the 1-Wire network will probably stop working due to the waveform being modified by the extra capacitance. The DS2413 can store enough energy internally to stay powered on through a normal master reset sequence.

Eric
 
Ok, thank you.
Reading the DS2413 using external switch works well, it detects the change, but if I try to change the pin status through SW (as I would do with a relè or a led) I have some problems:

I tried with TMEX function to read the DS2413 and it works fine, this is the reading with all off: 11110000 where the two couple of 00 are the latch and pin state of PIO B and A (from left).

The problem is in writing, for example sending a PIO output state of 253 (0xFD) it works well reading the state just after the writing (11000011), so it works, BUT when I make a second read it returns to 11110000.

So I thought of a loss of power that resets the chip. But if you tell me it isn't, what could this problem be?

EDIT:
Should I put a pullup resistor in the circuit? Or the pullup is inside the master?
 
This is my C with driver Tmex code for the writing func:
Code:
short Scrivi_DS2413(long session_handle,unsigned char ch)
{
   short flag, i=0
  
   //access and verify it is there
   flag = TMAccess(session_handle,state_buffer);
   if (flag == 1)
   {
	  // channel access write
	  TMTouchByte(session_handle,0x5A);	 
	 
	  // I send number to change the pin (es. 252 o 253)
	  TMTouchByte(session_handle,ch);	 
	  //send inverted data
	  TMTouchByte(session_handle,~ch);	 
	  // check result code
	  unsigned char retcode = (BYTE) TMTouchByte(session_handle,0xFF);		
	  // check result
	  if (retcode == 0xAA)
	 {
			 // 0xAA means writing was ok, so
			 // I can just read the pin status:
		   for (i=1 ; i<9  ; i++)
		 {	 
		    PIOoutput[i] = TMTouchBit(session_handle,0x01) ;
		    printf("%d", PIOoutput[i] );
		 }
	  return 1;
	 }
	 else
	 {
	  printf("----- ERR  check REsult 0xAA fine SCRIVI");
	  return -1;	  
	 }
   }
}  //fine ScriviDS2413

If you download the datasheet here:
http://datasheets.maxim-ic.com/en/ds/DS2413.pdf
you find the summary of writing steps at pag.17
 
I have bought a DS9097U serial adapter, it has 0.2V when the 1-wire net is in sleep state and when it communicate with some chips, it raises at 4,88V.

This is the problem I think, because the DS2413 lacks tension and resets itself.

Is it normal? Shouldn't be always at 4,88V and going 0V at the beginning of communication?
 
Back
Top