Shop OBEX P1 Docs P2 Docs Learn Events
Strange serial problems - Maxim 3100 — Parallax Forums

Strange serial problems - Maxim 3100

ArchiverArchiver Posts: 46,084
edited 2003-03-18 01:46 in General Discussion
Thanks for the info folks, much appreciated!

I have taken a look at the Basic ATOM and i have one ordered, it looks like
the ideal solution to me. However i wouldn't mind having a go at using an
external UART with the BS2 and the Maxim 3100 looks perfect for the job, as
i need one with a TTL interface (the 3110 won't do). Any suggestions on
other UART's would be welcome, but the Max3100 seems rather unique.

Can anyone list a supplier for the Max 3110 in the UK - i can't seem to find
one anywhere?

Thanks again,

>
Original Message
> From: brent5377 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9STt9LQB67JVJugvB5xrbULTya-Qm8o0Rzgjg7PajKkB9T1saxIjkI-D9MbzpcHmk0vZ1oa6wmhl7yQZbmLIPw]broyles@i...[/url
> Sent: 16 March 2003 12:04 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: Strange serial problems
>
>
> Mark,
>
> I am a few months in front of you with various serial problems. Two
> great sources of info have been
>
> www.phanderson.com/stamp/tutorial 10.html
>
> www.emesystems.com/BS2rs232.htm
>
> http://www.wd5gnr.com/suart.htm
>
> The second link has a lot of info concerning wait timing between
> tx of a command and when the stamp is ready to receive (rx).
>
> The third is a note about a serial buffer. I can only buffer about 8
> bits at a time which is too few for my application.
>
> The upshot is the stamp won't be able to receive a command after a tx
> command for over 1/2 a second!!
>
>
> One helpful command only available to the faster chips (I am using
> a 2p24 stamp) is the SPSER command. It is an unpublished command that
> takes a serin command and places the data in the scratch pad memory
> area.
>
> Email me offline and I can give you some of my code and an email from
> Jon Williams, who helped me greatly, if you would like.
>
> What I am ending up doing is strapping two stamps together to send a
> tx command from one chip and have the other stamp in rx mode waiting
> for the reply. It is a bit of a pain. I am just getting into it.
>
> One of the other tricks is keeping the baud rates down. I am stuck
> because my external devices are only 9600.
>
> If you need any ttl to rs232 level converters Al Williams one is
> fairly cheap, works well and goes directly into proto board.
>
> http://www.al-williams.com/rs1.htm
>
> I am using 4 of them.
>
>
>
>
>
> --- In basicstamps@yahoogroups.com, "Mark Lamond" <lists@m...> wrote:
> >
> > Hi, thanks for the info Phillip
> >
> > The problem is that i am stuck with the one baud rate, i can't
> change it [noparse]:([/noparse]
> >
> > The only way i can think round it is to have a routine seperate
> from the
> > main program constantly monitoring for serial data on my input pin
> and if it
> > sees data it stores it in a variable. However i'm not aware of any
> way to do
> > this on the Stamp (i have a BS2SX).
> >
> > Has anyone got any ideas (i am a bit of a Stamp newbie)?
> >
> > >
> > > I have had similar problems and reducing the speed was the only
> solution I
> > > found! Try 2400 or 4800, It if it works try 9600. I have not been
> able to
> > > get about the 9600 mark reliably...
> > >
> > > Good Luck,
> > > Phillip Kocmoud
> > >
> > >
Original Message
> > > From: Mark Lamond [noparse][[/noparse]mailto:lists@m...]
> > > Sent: Saturday, March 15, 2003 11:23 AM
> > > To: basicstamps@yahoogroups.com
> > > Subject: [noparse][[/noparse]basicstamps] Strange serial problems
> > >
> > >
> > >
> > > Hi there,
> > >
> > > I have a BS2 set up to send and recieve serial data from a
> > > microcontroller.
> > > The BS2 sends a single byte to the device, then listens for a
> single byte
> > > reply. For instance if i send $FF to the device it should return
> $FF. For
> > > the moment i am displaying the recived data via the debug output.
> > > Comms are
> > > running at 19200bps, and both devices are talking TTL levels with
> the
> > > Stamp's I/O lines directly connected to the serial port of the
> target
> > > device's microcontroller.
> > >
> > > Pin 0 is connected to the target's RX
> > > Pin 5 is connected to the target's TX
> > >
> > > Here is my code:
> > >
> > > Byte VAR BYTE
> > > Byte = 0
> > >
> > > DEBUG "Sending Data", CR
> > > SEROUT 0, 110, [noparse][[/noparse]$FF]
> > > SERIN 5, 110, [noparse][[/noparse]Byte]
> > > DEBUG "Recieved Data", CR
> > > DEBUG Byte, CR
> > >
> > > I am using a PC to sniff both serial lines between the target
> device and
> > > Stamp so i can see in real time what is happening. When the
> program is
> > > started running it sends $FF to the device as expected, and the
> device
> > > replies with $FF - however the stamp seems not to have noticed
> > > this and sits
> > > waiting for a serial input.
> > >
> > > If i use my PC to "inject" an $FF into the line connecting to Pin
> 5 while
> > > the Stamp is waiting for input, the stamp correctly recieves the
> byte,
> > > displays it via the debug output and the program stops.
> > >
> > > This makes me think that the Stamp isn't quick enough to catch
> the data on
> > > Pin 5 after it has processed the SEROUT command and misses the
> > > data from the
> > > target device? Can anyone throw any light on what i might be
> > > doing wrong, or
> > > how to get round the problem? Perhaps i need a faster Stamp?
> > >
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-03-18 01:46
    All,

    Here is an rs232 32 byte buffer chip... RSB509B $7.95 US.
    http://www.protean-logic.com/tickit/rsb509B_HTML_Cutsheet.htm

    John

    --- In basicstamps@yahoogroups.com, "Mark Lamond" <lists@m...> wrote:
    >
    > Thanks for the info folks, much appreciated!
    >
    > I have taken a look at the Basic ATOM and i have one ordered, it
    looks like
    > the ideal solution to me. However i wouldn't mind having a go at
    using an
    > external UART with the BS2 and the Maxim 3100 looks perfect for the
    job, as
    > i need one with a TTL interface (the 3110 won't do). Any
    suggestions on
    > other UART's would be welcome, but the Max3100 seems rather unique.
    >
    > Can anyone list a supplier for the Max 3110 in the UK - i can't
    seem to find
    > one anywhere?
    >
    > Thanks again,
    >
    > >
    Original Message
    > > From: brent5377 [noparse][[/noparse]mailto:broyles@i...]
    > > Sent: 16 March 2003 12:04 AM
    > > To: basicstamps@yahoogroups.com
    > > Subject: [noparse][[/noparse]basicstamps] Re: Strange serial problems
    > >
    > >
    > > Mark,
    > >
    > > I am a few months in front of you with various serial problems.
    Two
    > > great sources of info have been
    > >
    > > www.phanderson.com/stamp/tutorial 10.html
    > >
    > > www.emesystems.com/BS2rs232.htm
    > >
    > > http://www.wd5gnr.com/suart.htm
    > >
    > > The second link has a lot of info concerning wait timing between
    > > tx of a command and when the stamp is ready to receive (rx).
    > >
    > > The third is a note about a serial buffer. I can only buffer
    about 8
    > > bits at a time which is too few for my application.
    > >
    > > The upshot is the stamp won't be able to receive a command after
    a tx
    > > command for over 1/2 a second!!
    > >
    > >
    > > One helpful command only available to the faster chips (I am using
    > > a 2p24 stamp) is the SPSER command. It is an unpublished command
    that
    > > takes a serin command and places the data in the scratch pad
    memory
    > > area.
    > >
    > > Email me offline and I can give you some of my code and an email
    from
    > > Jon Williams, who helped me greatly, if you would like.
    > >
    > > What I am ending up doing is strapping two stamps together to
    send a
    > > tx command from one chip and have the other stamp in rx mode
    waiting
    > > for the reply. It is a bit of a pain. I am just getting into it.
    > >
    > > One of the other tricks is keeping the baud rates down. I am stuck
    > > because my external devices are only 9600.
    > >
    > > If you need any ttl to rs232 level converters Al Williams one is
    > > fairly cheap, works well and goes directly into proto board.
    > >
    > > http://www.al-williams.com/rs1.htm
    > >
    > > I am using 4 of them.
    > >
    > >
    > >
    > >
    > >
    > > --- In basicstamps@yahoogroups.com, "Mark Lamond" <lists@m...>
    wrote:
    > > >
    > > > Hi, thanks for the info Phillip
    > > >
    > > > The problem is that i am stuck with the one baud rate, i can't
    > > change it [noparse]:([/noparse]
    > > >
    > > > The only way i can think round it is to have a routine seperate
    > > from the
    > > > main program constantly monitoring for serial data on my input
    pin
    > > and if it
    > > > sees data it stores it in a variable. However i'm not aware of
    any
    > > way to do
    > > > this on the Stamp (i have a BS2SX).
    > > >
    > > > Has anyone got any ideas (i am a bit of a Stamp newbie)?
    > > >
    > > > >
    > > > > I have had similar problems and reducing the speed was the
    only
    > > solution I
    > > > > found! Try 2400 or 4800, It if it works try 9600. I have not
    been
    > > able to
    > > > > get about the 9600 mark reliably...
    > > > >
    > > > > Good Luck,
    > > > > Phillip Kocmoud
    > > > >
    > > > >
    Original Message
    > > > > From: Mark Lamond [noparse][[/noparse]mailto:lists@m...]
    > > > > Sent: Saturday, March 15, 2003 11:23 AM
    > > > > To: basicstamps@yahoogroups.com
    > > > > Subject: [noparse][[/noparse]basicstamps] Strange serial problems
    > > > >
    > > > >
    > > > >
    > > > > Hi there,
    > > > >
    > > > > I have a BS2 set up to send and recieve serial data from a
    > > > > microcontroller.
    > > > > The BS2 sends a single byte to the device, then listens for a
    > > single byte
    > > > > reply. For instance if i send $FF to the device it should
    return
    > > $FF. For
    > > > > the moment i am displaying the recived data via the debug
    output.
    > > > > Comms are
    > > > > running at 19200bps, and both devices are talking TTL levels
    with
    > > the
    > > > > Stamp's I/O lines directly connected to the serial port of the
    > > target
    > > > > device's microcontroller.
    > > > >
    > > > > Pin 0 is connected to the target's RX
    > > > > Pin 5 is connected to the target's TX
    > > > >
    > > > > Here is my code:
    > > > >
    > > > > Byte VAR BYTE
    > > > > Byte = 0
    > > > >
    > > > > DEBUG "Sending Data", CR
    > > > > SEROUT 0, 110, [noparse][[/noparse]$FF]
    > > > > SERIN 5, 110, [noparse][[/noparse]Byte]
    > > > > DEBUG "Recieved Data", CR
    > > > > DEBUG Byte, CR
    > > > >
    > > > > I am using a PC to sniff both serial lines between the target
    > > device and
    > > > > Stamp so i can see in real time what is happening. When the
    > > program is
    > > > > started running it sends $FF to the device as expected, and
    the
    > > device
    > > > > replies with $FF - however the stamp seems not to have noticed
    > > > > this and sits
    > > > > waiting for a serial input.
    > > > >
    > > > > If i use my PC to "inject" an $FF into the line connecting to
    Pin
    > > 5 while
    > > > > the Stamp is waiting for input, the stamp correctly recieves
    the
    > > byte,
    > > > > displays it via the debug output and the program stops.
    > > > >
    > > > > This makes me think that the Stamp isn't quick enough to catch
    > > the data on
    > > > > Pin 5 after it has processed the SEROUT command and misses the
    > > > > data from the
    > > > > target device? Can anyone throw any light on what i might be
    > > > > doing wrong, or
    > > > > how to get round the problem? Perhaps i need a faster Stamp?
    > > > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    > > Subject and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
Sign In or Register to comment.