[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owfs-developers
Subject:    Re: [Owfs-developers] ds2480b
From:       Roberto Spadim <roberto () spadim ! com ! br>
Date:       2011-11-30 6:49:33
Message-ID: CABYL=Trk+==8AMsxV+sLf5L7xKe5c6V3cJstCe9rr33pHr=iSA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


reading a bit ser2net source code...

LINE 745, file: dataxfer.c
    tcsendbreak(port->devfd, 0);


*tcsendbreak*() transmits a continuous stream of zero-valued bits for a
specific duration, if the terminal is using asynchronous serial data
transmission. If *duration* is zero, it transmits zero-valued bits for at
least 0.25 seconds, and not more that 0.5 seconds. If *duration* is not
zero, it sends zero-valued bits for some implementation-defined length of
time.

If the terminal is not using asynchronous serial data transmission, *
tcsendbreak*() returns without taking any action.


in other words.... BREAK should set 0 for at least 0.25 seconds = 2400 bits
(at 9600 bauds), 2400bits = +- 240 bytes (10bits per byte)

it´s a very big break right? no problem about it with ds2480b?




2011/11/30 Roberto Spadim <roberto@spadim.com.br>

> hummm
> i was reading some posts... well check if i understood and if it will
> work...
>
> BREAK = 10 bits of '0' in other words..
> i´m using 9600 bauds
> if i send two NULL (0x00) character it will send a stop bit that can by
> '1' instead of '0'
> the first solution is changed speed to 1/4 or 1/2 of default speed (4800
> or 2400) and send one 0x00 byte
> the problem is.. if i´m receiving some byte from serial port it will not
> be detected since my speed is diferent from 9600 (that´s why some unix
> implement baud rate for tx and baudrate for rx..)
>
> the second solution is...
> since i´m using microcontroller, i can set port pin to 0 externally in a
> deterministic time something like
> setpinX=0
> sleep(x milisseconds)
> continue normal uart
>
> ----
> ok i understood now... the idea is my cable is not connect in a uart
> device, so please ds2480b reset...
>
> now my doubt...
> ds2480b send some data while i´m 'breaking'? or it wait break and reset
> after break end?
>
>
>
> --
> Roberto Spadim
> Spadim Technology / SPAEmpresarial
>



-- 
Roberto Spadim
Spadim Technology / SPAEmpresarial

[Attachment #5 (text/html)]

reading a bit ser2net source code...<br><br>LINE 745, file: dataxfer.c<br>    \
tcsendbreak(port-&gt;devfd, 0);<br><br><br><b><span \
class="highlight">tcsendbreak</span></b>() transmits a continuous stream of \
zero-valued bits for a specific duration, if the terminal is using asynchronous \
serial data transmission. If <i>duration</i> is zero, it transmits zero-valued bits \
for at least 0.25 seconds, and not more that 0.5 seconds. If <i>duration</i> is not \
zero, it sends zero-valued bits for some implementation-defined length of time. <p>If \
the terminal is not using asynchronous serial data transmission, <b><span \
class="highlight">tcsendbreak</span></b>() returns without taking any action. \
<br></p><p><br></p><p>in other words.... BREAK should set 0 for at least 0.25 seconds \
= 2400 bits (at 9600 bauds), 2400bits = +- 240 bytes (10bits per byte)</p> <p>it´s a \
very big break right? no problem about it with \
ds2480b?<br></p><p><br></p><br><br><div class="gmail_quote">2011/11/30 Roberto Spadim \
<span dir="ltr">&lt;<a \
href="mailto:roberto@spadim.com.br">roberto@spadim.com.br</a>&gt;</span><br> \
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;">hummm<br>i was reading some posts... well check if i \
understood and if it will work...<br><br>BREAK = 10 bits of &#39;0&#39; in other \
words..<br> i´m using 9600 bauds<br>if i send two NULL (0x00) character it will send \
a stop bit that can by &#39;1&#39; instead of &#39;0&#39;<br> the first solution is \
changed speed to 1/4 or 1/2 of default speed (4800 or 2400) and send one 0x00 \
byte<br>the problem is.. if i´m receiving some byte from serial port it will not be \
detected since my speed is diferent from 9600 (that´s why some unix implement baud \
rate for tx and baudrate for rx..)<br>

<br>the second solution is...<br>since i´m using microcontroller, i can set port pin \
to 0 externally in a deterministic time something like<br>setpinX=0<br>sleep(x \
milisseconds)<br>continue normal uart<br><br>----<br>ok i understood now... the idea \
is my cable is not connect in a uart device, so please ds2480b reset...<br>

<br>now my doubt...<br>ds2480b send some data while i´m &#39;breaking&#39;? or it \
wait break and reset after break end?<div class="HOEnZb"><div class="h5"><br><br \
clear="all"><br>-- <br>Roberto Spadim<br>Spadim Technology / SPAEmpresarial<br>

</div></div></blockquote></div><br><br clear="all"><br>-- <br>Roberto \
Spadim<br>Spadim Technology / SPAEmpresarial<br>



------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic