[prev in list] [next in list] [prev in thread] [next in thread]
List: tini
Subject: RE: [TINI] Serial Port problem
From: Hector Saint-Hilaire <hector.saint-hilaire () verizon ! com>
Date: 2001-08-29 15:25:59
[Download RAW message or body]
You could add a oneshot timer connected to the RX line, which will fire
after 3.5 character times have passed with it's input at logic 1 (very
simple with a 555 timer). This could drive the external interrupt of the
TINI to alert you about the frame separator arrived.
I know it's hardware, but I'm a hardware creature that just crossed over
the fence into software land... ;)
Santi
At 06:24 AM 8/29/2001 +0800, Proctor, Kelvin wrote:
>Georgios,
>
>I have also been trying to work out how to detect a the Modbus RTU frame
>separator, with no luck to date.
>
>I have launched the jModbus project on Sourceforge
>(http://jmodbus.sourceforge.net) which is / will be a master and slave
>implementation of Modbus RTU, ACSII and TCP. This might be of some benefit
>to you.
>
>If you find a way of detecting the frame separator using the javax.comm API
>I would be very interested to know as I have been unable to work out how to
>do this to date.
>
>Cheers,
>
>Kelvin
>
> > -----Original Message-----
> > From: Georgios Christou [SMTP:gchristou@acumentrics.com]
> > Sent: Wednesday, August 29, 2001 3:48
> > To: 'David MacMahon'
> > Cc: tini@dalsemi.com
> > Subject: RE: [TINI] Serial Port problem
> >
> > Well, the terminator is 3.5 char times (that's how it is defined in the
> > Modbus spec) which doesn't make too much sense to me... I write something
> > that will wait and figure out exactly the char time between the module and
> > the TINI by using an oscilloscope, but that sounds like too much work (I'm
> > just a lazy programmer...)
> > But I'll give it a shot if everything else doesn't work...
> >
> > Thank you Dave,
> > Georgios Christou
> > Network Programmer
> > Acumentrics Corporation
> > 14 Southwest Park,
> > Westwood, MA 02090
> >
> >
> > -----Original Message-----
> > From: David MacMahon [mailto:davidm@smartsc.com]
> > Sent: Tuesday, August 28, 2001 1:41 PM
> > To: gchristou@acumentrics.com
> > Cc: tini@dalsemi.com
> > Subject: RE: [TINI] Serial Port problem
> >
> >
> > At 8/28/01 01:16 PM -0400, Georgios Christou wrote:
> > >what
> > >I wanted was a way of getting everything in, in one fell swoop.
> > >Unfortunately that's not possible I guess, especially since I don't know
> > the
> > >length of the message that I'll receive in advance.
> >
> > It sounds like the messages are variable length with no length info, just
> > some kind of terminator, is that correct? I agree that if you don't know
> > the message length, then the technique I gave will not work. :-(
> >
> > > I'm working on building a solution with mark() and reset() and it
> > seems
> > >that it will work, but I thought I'd ask anyway :)
> >
> > You might be able to save yourself some byte copying if you subclass
> > BufferedInputStream and look for the terminators directly in the inherited
> > buffer (buf).
> >
> > Dave
> >
> > --
> > David MacMahon, President
> > Smart Software Consulting
> > 1688 Silverwood Court
> > Danville CA 94526-3079
> > USA
> >
> > www.smartsc.com
> >
> > +1-925-867-1088 Voice
> > +1-925-867-4683 Fax
> >
> >
> > _______________________________________________
> > TINI mailing list
> > TINI@dalsemi.com
> > To UNSUBSCRIBE, edit your profile, or see list archives:
> > http://lists.dalsemi.com/mailman/listinfo/tini
>
>Alcoa World Alumina Australia is a trading name of Alcoa of Australia
>Limited, ACN 004 879 298
>
>_______________________________________________
>TINI mailing list
>TINI@dalsemi.com
>To UNSUBSCRIBE, edit your profile, or see list archives:
>http://lists.dalsemi.com/mailman/listinfo/tini
Hector Saint-Hilaire
Office: 781-466-2541
Pager: 888-977-2106
AIM: hs00gte
_______________________________________________
TINI mailing list
TINI@dalsemi.com
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic