Shop OBEX P1 Docs P2 Docs Learn Events
BS2SX program download via phoneline — Parallax Forums

BS2SX program download via phoneline

ArchiverArchiver Posts: 46,084
edited 2001-05-26 23:25 in General Discussion
Peter-

I think you would ultimately regret attempting to crack this nut by
driving the remote location directly from the Stamp editor program
via modem (too many things going on simultaneously with critical
timing requirements). However, this ought to be do-able today if
you're willing to break the task up into a sequence of sub-tasks:

- write the program update at location 'A'

- save the program's token image to a disk file at 'A'

- transmit the image file via modem to remote location 'B'

- invoke program at 'B' to load revised tokens into Stamp

There are a few programs floating around now (search archives for
"token") that can save BS2* programs in their tokenized form and
later program a Stamp from that token image.

Alternatively, a customized version of these PC programs could be
created to handle the modem communications, the PC-Stamp programming
protocol and relay the tokens in real time. This could even be
implemented as a customized Stache chipset so that no PC (or
operator) is needed at the remote site.


Regards,

Steve

On 25 May 01 at 9:53, Peter Verkaik wrote:

> ...I would like to be able to reprogram s Stamp
> from a remote location for software updates.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 04:23
    On 25 May 01 at 16:27, Peter Verkaik wrote:

    > Do I understand correctly this customized stache would just receive
    > the tokens from the modem and relays them, using the proper
    > protocol, to the stamp?

    Essentially, yes, with a little error detection and recovery to
    minimize comm link problems.

    > This stache would require 2 serial ports then.

    Agreed. That's one of the "customized" features I envisioned,
    although the "serial port" from the chipset to the Stamp would look a
    lot like four wires/traces from a DIP chip to your Stamp.


    Regards,

    Steve
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 08:53
    Hi everyone,

    Has anyone ever tried and succeeded in
    programming a BS2SX via an external modem
    without the aid of a PC running PCAnywhere
    ur sortlike software?
    I would like to be able to reprogram s Stamp
    from a remote location for software updates.

    Any suggestions welcome.

    Greetings peter.
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 12:48
    It depends on how remote you are taking about. I am using some radio modems
    which is like having a serial cable between your PC and the stamp. You can
    get Radio modems to work over long ranges (50km) but you cannot have any
    flow control.



    Original Message
    From: Bruce Bates [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=lGRUKXyWXp4tekPkg7DBWEt2GpyvUozMBBlj_qvj8HYVME__toiNyPsVUJsafAZPVjqiHFaT21ehIhVRB335_g]bvbates@u...[/url
    Sent: 25 May 2001 12:51
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] BS2SX program download via phoneline


    At 5/25/2001 Friday 03:53 AM, Peter Verkaik promulgated:
    >Hi everyone,
    >
    >Has anyone ever tried and succeeded in
    >programming a BS2SX via an external modem
    >without the aid of a PC running PCAnywhere
    >ur sortlike software?

    PC-Anywhere and other similar programs require the PC software to
    running at the HOST and REMOTE sites. Thus, the STAMP can't run the
    software.

    >I would like to be able to reprogram s Stamp
    >from a remote location for software updates.
    You may want to take a look at Tracy Allen's STACHE. It can be found on the
    Parallax website [noparse][[/noparse] http://www.parallaxinc.com ] and on Tracy's web site at
    [noparse][[/noparse] http://www.emesystems.com/stachedat.htm ].

    >Any suggestions welcome.
    >Hope that helps.

    >Greetings peter.
    >
    >Regards,

    Bruce Bates




    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 12:50
    At 5/25/2001 Friday 03:53 AM, Peter Verkaik promulgated:
    >Hi everyone,
    >
    >Has anyone ever tried and succeeded in
    >programming a BS2SX via an external modem
    >without the aid of a PC running PCAnywhere
    >ur sortlike software?

    PC-Anywhere and other similar programs require the PC software to
    running at the HOST and REMOTE sites. Thus, the STAMP can't run the software.

    >I would like to be able to reprogram s Stamp
    >from a remote location for software updates.
    You may want to take a look at Tracy Allen's STACHE. It can be found on the
    Parallax website [noparse][[/noparse] http://www.parallaxinc.com ] and on Tracy's web site at
    [noparse][[/noparse] http://www.emesystems.com/stachedat.htm ].

    >Any suggestions welcome.
    >Hope that helps.

    >Greetings peter.
    >
    >Regards,

    Bruce Bates
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 13:18
    Hi Okkie and Bruce,

    >It depends on how remote you are taking about. I am using some radio modems
    >which is like having a serial cable between your PC and the stamp. You can
    >get Radio modems to work over long ranges (50km) but you cannot have any
    >flow control.

    Distance is (or should be) not an issue as I want to call in on a regular
    phoneline.
    So I have a modem in autoanswer mode at the Stamp site, and a PC with modem
    at my location. I do not just want to receive and send data: I want to
    reprogram
    the Stamp, i.e the ATN (=DTR) line must be remotely controlled also.
    Can this be done?

    >PC-Anywhere and other similar programs require the PC software to
    >running at the HOST and REMOTE sites. Thus, the STAMP can't run the
    >software.

    Obviously, but the PC at the stamp site is connected to the phoneline, while
    the
    Stamp is connected to a serial port. Using 'Remote Control' mode I can run
    any
    software on the remote PC, including the Stamp editor, as if I were working
    at
    the stamp site PC. Program download to the Stamp is then no problem, but it
    requires a PC.

    >You may want to take a look at Tracy Allen's STACHE. It can be found on the
    >Parallax website [noparse][[/noparse] http://www.parallaxinc.com ] and on Tracy's web site at
    >[noparse][[/noparse] http://www.emesystems.com/stachedat.htm ].

    The STACHE is no option as it still requires my (or someone else) physical
    presence at the
    stamp site. This I hope to eliminate.


    Any more suggestions welcome.
    Greetings peter.
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 13:58
    At 5/25/2001 Friday 08:18 AM, Peter Verkaik promulgated:
    >Hi Okkie and Bruce,
    >
    > >It depends on how remote you are taking about. I am using some radio modems
    > >which is like having a serial cable between your PC and the stamp. You can
    > >get Radio modems to work over long ranges (50km) but you cannot have any
    > >flow control.
    >
    >Distance is (or should be) not an issue as I want to call in on a regular
    >phoneline. So I have a modem in autoanswer mode at the Stamp site, and a
    >PC with modem at my location. I do not just want to receive and send data:
    >I want to
    >reprogram the Stamp, i.e the ATN (=DTR) line must be remotely controlled also.
    >Can this be done?
    I'm doing this from past memories of how PC-Anywhere works, but I think it
    may work. I'd have to look it up to be sure, but I THINK you can control at
    least
    some of the hardware from the "far" end.

    > >PC-Anywhere and other similar programs require the PC software to
    > >running at the HOST and REMOTE sites. Thus, the STAMP can't run the
    > >software.
    >
    >Obviously, but the PC at the stamp site is connected to the phoneline, while
    >the Stamp is connected to a serial port. Using 'Remote Control' mode I can run
    >any software on the remote PC, including the Stamp editor, as if I were
    >working
    >at the stamp site PC. Program download to the Stamp is then no problem, but it
    >requires a PC.
    There MAY be timing issues here. It's hard to tell without actually trying it,
    but I think I could make a case either way. If the ports DON'T conflict
    time-wise
    ergo, the "far" PC is dormant during the Stamp programming process, it
    seems as though it may work. The problem is - I'm not sure that's possible.
    As I recall
    the screen data automatically comes back, and may cause problems. Let's think
    this out a bit ....

    If this were a batch process - all data is sent to the far end first, and
    then a .BAT file were fired off to FEED the Stamp Editor. and the screen
    data was SPOOLED (which I believe can be done). you may well be able to
    accomplish it.

    > >You may want to take a look at Tracy Allen's STACHE. It can be found on the
    > >Parallax website [noparse][[/noparse] http://www.parallaxinc.com ] and on Tracy's web site at
    > >[noparse][[/noparse] http://www.emesystems.com/stachedat.htm ].
    >
    >The STACHE is no option as it still requires my (or someone else) physical
    >presence at the stamp site. This I hope to eliminate.
    >
    >Initially I didn't realize there was an available port.

    >Any more suggestions welcome.

    I'll see if I can find my PC-Anywhere dox to investigate further.

    >Greetings peter.
    >
    >Regards,

    Bruce
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 14:14
    Hi, Peter

    While you get the remote control (e.g. PCAnywhere) software issues worked
    out, you might want to review the message from Klaus Zahnert a little
    earlier in the month, quoted next.

    Regards,
    Daniel McGlothin

    --<Start of Quoted Message>--
    From: Klaus Zahnert [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=QTf_NxNUD_g2UyAcwocRwZPs_lgGtnOi3_df2NEHuvrCyqw6ZfQnz43gHKfb3dlZRKoJw9mW2glJrA]kzahnert@d...[/url
    Sent: Wednesday, 16 May 2001 12:01
    To: basicstamps@yahoogroups.com
    Cc: ckuehnel@i...
    Subject: [noparse][[/noparse]basicstamps] portable tokens for BS2SX-IC


    Dear Stampers,
    to update programs in remoted BASIC Stamps without giving the
    PBASIC-sourcecode to others, often wanted to avoid manipulation and keeping
    hidden the programming ideas. Solutions given last time are from Tracy
    Allen: "STACHE" and Steve Parkis : "GETOKEN/ PUTOKEN".

    Now we offer for test and evaluation the "TOKEN-CATCHER" and
    "TOKEN-PUSHER", we made
    to use with the VB6-Library on WIN9x. ..WIN2000. Free download from the
    website of
    Claus Kuehnel with http://www.ckuehnel.ch. Call his nice website, then go
    to Microcontroller - Support | BASIC Stamp | TOK_CP08.ZIP. (179.286 kByte).
    Yes, It's free up to now to get your experience with it. Any response
    (actual problems also) with mail to kzahnert@d..., please.

    I don't like unwanted long attachments to mails, but with a attached picture
    of 25 (!) kByte you see a global scheme. Never will be without patience for
    this,
    I hope.-

    Have fun and success ! Regards Klaus Zahnert
    --<Start of Quoted Message>--



    Original Message
    From: Peter Verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=8nku0Jirm6-Ge3cHcFVa-_P9DYRBJ7n8iwfiEGJRUEWrh01gfaTDqTnT85EhylYej4ZvJhF5p2jnCFv028Fy2aJcqg]peterverkaik@b...[/url
    Sent: Friday, 25 May 2001 03:53
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] BS2SX program download via phoneline


    Hi everyone,

    Has anyone ever tried and succeeded in
    programming a BS2SX via an external modem
    without the aid of a PC running PCAnywhere
    ur sortlike software?
    I would like to be able to reprogram s Stamp
    from a remote location for software updates.

    Any suggestions welcome.

    Greetings peter.





    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


    _________________________________________________________
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 15:08
    Hi Bruce,

    >I'm doing this from past memories of how PC-Anywhere works, but I think it
    >may work. I'd have to look it up to be sure, but I THINK you can control at
    >least
    >some of the hardware from the "far" end.

    I do not want to use PCAnywhere. I merely wanted to mention the easy way.
    Are the modem's handshake lines RTS and DTR controlled exclusively
    by the modem? Or can they be set from 'the phone side' so to speak?

    >There MAY be timing issues here. It's hard to tell without actually trying
    it,
    >but I think I could make a case either way. If the ports DON'T conflict
    >time-wise
    >ergo, the "far" PC is dormant during the Stamp programming process, it
    >seems as though it may work. The problem is - I'm not sure that's possible.
    >As I recall
    >the screen data automatically comes back, and may cause problems. Let's
    think
    >this out a bit ....

    >If this were a batch process - all data is sent to the far end first, and
    >then a .BAT file were fired off to FEED the Stamp Editor. and the screen
    >data was SPOOLED (which I believe can be done). you may well be able to
    >accomplish it.

    I know it works. I must send the new stamp source file using file transfer
    mode.
    Then open the stamp editor with the new file and execute the run command (on
    the remote PC).
    The run command gives hardly any screen changes so there is hardly any data
    sent
    back to me. I used the same technique to control a RS232 motorcontrolled
    camera
    from a remote site.

    But the question still stands; can it be done WITHOUT THE PC, i.e just
    a modem connected to the stamp program port?
    Or is the only possibility to write some bootloader, exchanging data, and
    let the stamp
    reprogram itself by overwriting its eeprom locations. The data could be
    generated using
    TOKEN-CATCHER from Klaus Zahndert.


    Any more suggestions welcome.
    Greetings peter.
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 15:27
    Hi S,

    >I think you would ultimately regret attempting to crack this nut by
    >driving the remote location directly from the Stamp editor program
    >via modem (too many things going on simultaneously with critical
    >timing requirements). However, this ought to be do-able today if
    >you're willing to break the task up into a sequence of sub-tasks:

    > - write the program update at location 'A'

    > - save the program's token image to a disk file at 'A'

    > - transmit the image file via modem to remote location 'B'

    > - invoke program at 'B' to load revised tokens into Stamp

    This would still require a PC at the remote site!

    >There are a few programs floating around now (search archives for
    >"token") that can save BS2* programs in their tokenized form and
    >later program a Stamp from that token image.

    These I wanted to use to tokenize the data.

    >Alternatively, a customized version of these PC programs could be
    >created to handle the modem communications, the PC-Stamp programming
    >protocol and relay the tokens in real time. This could even be
    >implemented as a customized Stache chipset so that no PC (or
    >operator) is needed at the remote site.

    Do I understand correctly this customized stache would just receive the
    tokens from
    the modem and relays them, using the proper protocol, to the stamp?
    This stache would require 2 serial ports then.

    Anymore suggestions welcome.
    Greetings peter.
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 15:46
    Hi all,

    If I remember correctly, the Stamp will place itself into 'download' mode if
    rebooted while a serial connection is on (I suppose that means taking ATN
    high, but I'm not too sure).
    So, it should be simple to get the Stamp to answer the phone call, establish
    the data connection, and while the connection stays on, reset itself, thus
    placing it in 'download' mode.
    Then, via the data connection established, you just have to upload the new
    code.

    Cheers,

    Mike

    >
    Mensaje original
    > De: Peter Verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Lrc7YwtFNf0RZEy1fo0-94jVS3nX-1WKXa1MuZk7PQ_os9aDK83xxFwvQeVe_8TSjhOyaf6sXLuqHq7-2BeFjAif1Q]peterverkaik@b...[/url
    > Enviado el: viernes, 25 de mayo de 2001 16:09
    > Para: basicstamps@yahoogroups.com
    > Asunto: [noparse][[/noparse]basicstamps] RE:BS2SX program download via phoneline
    >
    >
    > Hi Bruce,
    >
    > >I'm doing this from past memories of how PC-Anywhere works, but
    > I think it
    > >may work. I'd have to look it up to be sure, but I THINK you can
    > control at
    > >least
    > >some of the hardware from the "far" end.
    >
    > I do not want to use PCAnywhere. I merely wanted to mention the easy way.
    > Are the modem's handshake lines RTS and DTR controlled exclusively
    > by the modem? Or can they be set from 'the phone side' so to speak?
    >
    > >There MAY be timing issues here. It's hard to tell without
    > actually trying
    > it,
    > >but I think I could make a case either way. If the ports DON'T conflict
    > >time-wise
    > >ergo, the "far" PC is dormant during the Stamp programming process, it
    > >seems as though it may work. The problem is - I'm not sure
    > that's possible.
    > >As I recall
    > >the screen data automatically comes back, and may cause problems. Let's
    > think
    > >this out a bit ....
    >
    > >If this were a batch process - all data is sent to the far end first, and
    > >then a .BAT file were fired off to FEED the Stamp Editor. and the screen
    > >data was SPOOLED (which I believe can be done). you may well be able to
    > >accomplish it.
    >
    > I know it works. I must send the new stamp source file using file transfer
    > mode.
    > Then open the stamp editor with the new file and execute the run
    > command (on
    > the remote PC).
    > The run command gives hardly any screen changes so there is
    > hardly any data
    > sent
    > back to me. I used the same technique to control a RS232 motorcontrolled
    > camera
    > from a remote site.
    >
    > But the question still stands; can it be done WITHOUT THE PC, i.e just
    > a modem connected to the stamp program port?
    > Or is the only possibility to write some bootloader, exchanging data, and
    > let the stamp
    > reprogram itself by overwriting its eeprom locations. The data could be
    > generated using
    > TOKEN-CATCHER from Klaus Zahndert.
    >
    >
    > Any more suggestions welcome.
    > Greetings peter.
    >
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 15:56
    At 10:46 05/25/01, Miguel Puchol wrote:
    >Hi all,
    >
    >If I remember correctly, the Stamp will place itself into 'download' mode if
    >rebooted while a serial connection is on (I suppose that means taking ATN
    >high, but I'm not too sure).
    >So, it should be simple to get the Stamp to answer the phone call, establish
    >the data connection, and while the connection stays on, reset itself, thus
    >placing it in 'download' mode.
    >Then, via the data connection established, you just have to upload the new
    >code.

    The Stamp doesn't need to answer and establish a connection; the modem
    alone does that. And you can tap into the CD light (or equivalent) on the
    modem to trigger a Stamp reset. This light comes on when a connection is
    established. I'm not sure the modem will satisfy all the Stamp's needs,
    but it should be able to satisfy the ones above with a tiny bit of added
    circuitry - a one-shot fired off the CD light to reset the Stamp.

    Jim H
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:05
    Hi mike,

    >If I remember correctly, the Stamp will place itself into 'download' mode
    if
    >rebooted while a serial connection is on (I suppose that means taking ATN
    >high, but I'm not too sure).
    >So, it should be simple to get the Stamp to answer the phone call,
    establish
    >the data connection, and while the connection stays on, reset itself, thus
    >placing it in 'download' mode.
    >Then, via the data connection established, you just have to upload the new
    >code.

    Could it be that simple? Just connecting a stamp I/O pin to the stamp reset
    and, after accepting the call, outputting a low on that pin would place
    the stamp in download mode (this makes the I/O pin an input). Then all I
    require
    is a modified TOKEN-PUSHER program that would allow me to call out via a
    modem?

    Anyone any comments on this?

    Greetings peter
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:06
    At 5/25/2001 Friday 10:08 AM, Peter Verkaik promulgated:
    >Hi Bruce,
    >
    > >I'm doing this from past memories of how PC-Anywhere works, but I think it
    > >may work. I'd have to look it up to be sure, but I THINK you can control at
    > >least
    > >some of the hardware from the "far" end.
    >
    >I do not want to use PCAnywhere. I merely wanted to mention the easy way.
    >Are the modem's handshake lines RTS and DTR controlled exclusively
    >by the modem? Or can they be set from 'the phone side' so to speak?
    That depends on the software and the application. Flow control can be done
    in software or hardware. X-ON and X-OFF is an example of software control.
    There are other methods as well.

    > >There MAY be timing issues here. It's hard to tell without actually trying
    >it, >but I think I could make a case either way. If the ports DON'T conflict
    > >time-wise
    > >ergo, the "far" PC is dormant during the Stamp programming process, it
    > >seems as though it may work. The problem is - I'm not sure that's possible.
    > >As I recall
    > >the screen data automatically comes back, and may cause problems. Let's
    >think
    > >this out a bit ....
    >
    > >If this were a batch process - all data is sent to the far end first, and
    > >then a .BAT file were fired off to FEED the Stamp Editor. and the screen
    > >data was SPOOLED (which I believe can be done). you may well be able to
    > >accomplish it.
    >
    >I know it works. I must send the new stamp source file using file transfer
    >mode. Then open the stamp editor with the new file and execute the run
    >command (on the remote PC).
    >The run command gives hardly any screen changes so there is hardly any data
    >sent back to me. I used the same technique to control a RS232 motorcontrolled
    >camera from a remote site.
    >
    >But the question still stands; can it be done WITHOUT THE PC, i.e just
    >a modem connected to the stamp program port?
    >Or is the only possibility to write some bootloader, exchanging data, and
    >let the stamp reprogram itself by overwriting its eeprom locations. The
    >data could be generated using TOKEN-CATCHER from Klaus Zahndert.
    I'm not familiar with the TOKEN-CATCHER, but it would surely be worth a look.
    Without a PC the only way I can think to do it is with more than two wires
    (RX, TX) and I don't believe that's your goal.

    Other than that, I can't think of any way to do it - sorry.

    >Any more suggestions welcome.
    >Greetings peter.
    >
    >Regards,

    Bruce
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:10
    >Hi everyone,
    >
    >Has anyone ever tried and succeeded in
    >programming a BS2SX via an external modem
    >without the aid of a PC running PCAnywhere
    >ur sortlike software?
    >I would like to be able to reprogram s Stamp
    >from a remote location for software updates.
    >
    >Any suggestions welcome.
    >
    >Greetings peter.

    This would be quite easy if you are using a BS2P, instead of a BS2sx.
    The reason is the new STORE command. You can have a program running
    in bank 0, say, receive the tokens and WRITE them into another
    program bank. Then RUN that other bank. You could bootstrap that
    process to reprogram the entire BS2p.

    It is possible to program a stamp with a "self-replacing" program.
    Have you looked at Stamp I application note 16 (Keeping programs
    private/self replacing programs)? The same trick can work in the
    BS2, but it requires careful attention to the number of subroutine
    calls in the program, so that the self-replacing part of the code can
    be identical in both stamps.

    As to invoking the stamp's built-in programming algorithm, the trick
    is to generate the pulse on the ATN line while the RCV line is in the
    BREAK state. You will need just a little bit of hardware to do
    that--one half-monostable to detect the BREAK condition and from that
    to trigger another half-monostable to generate an ATN pulse. It can
    be done with a CD4093 chip. Then your PC program needs only generate
    the long BREAK before sending tokens according to the protocol that I
    have outlined on my web site.
    <http://www.emesystems.com/BS2clone.htm>
    For that you could use an adaptation of the DOS program by Steve
    Parkis, or the Windows progam by Klaus Zahnert.

    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:22
    Hi Jum,

    >The Stamp doesn't need to answer and establish a connection; the modem
    >alone does that. And you can tap into the CD light (or equivalent) on the
    >modem to trigger a Stamp reset. This light comes on when a connection is
    >established. I'm not sure the modem will satisfy all the Stamp's needs,
    >but it should be able to satisfy the ones above with a tiny bit of added
    >circuitry - a one-shot fired off the CD light to reset the Stamp.

    I would like the stamp to answer. I don't want any sudden resets because of
    data storage structures in eeprom. I could connect the CD output to a I/O
    pin.

    Greetings peter
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:30
    To my knowledge -- and I haven't played with this for awhile -- the ATN line
    simply resets the Stamp with a pulse (that's why you can put a cap in the
    line to stop "ordinary" terminal programs from resetting the Stamp). The
    pulse has to be followed immediately by some line condition or characters,
    but I don't know which.

    You know Tracy's site has an example of one Stamp programming another. Maybe
    you could modify that so you'd have a modem and one Stamp on the far end
    who's sole purpose was to program the other Stamp (kind of a remote
    Stache -- maybe Tracy would even make one of these).

    Al Williams
    AWC
    * Connect a PS/2 keyboard to your next project:
    http://www.al-williams.com/awce/pak6.htm


    >
    Original Message
    > From: Peter Verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=dMVebUuujBaSq4PwJX7QJiZ1ujec6LnFVUi5HRKpF_pKzJiFlrX3oFAnUH0bu5Qvo0BOeH4gibMTLSmC6ZSaT97wDg]peterverkaik@b...[/url
    > Sent: Friday, May 25, 2001 10:06 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] RE: BS2SX program download via phoneline
    >
    >
    > Hi mike,
    >
    > >If I remember correctly, the Stamp will place itself into 'download' mode
    > if
    > >rebooted while a serial connection is on (I suppose that means taking ATN
    > >high, but I'm not too sure).
    > >So, it should be simple to get the Stamp to answer the phone call,
    > establish
    > >the data connection, and while the connection stays on, reset
    > itself, thus
    > >placing it in 'download' mode.
    > >Then, via the data connection established, you just have to
    > upload the new
    > >code.
    >
    > Could it be that simple? Just connecting a stamp I/O pin to the
    > stamp reset
    > and, after accepting the call, outputting a low on that pin would place
    > the stamp in download mode (this makes the I/O pin an input). Then all I
    > require
    > is a modified TOKEN-PUSHER program that would allow me to call out via a
    > modem?
    >
    > Anyone any comments on this?
    >
    > Greetings peter
    >
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:34
    > Could it be that simple? Just connecting a stamp I/O pin to the stamp
    reset
    > and, after accepting the call, outputting a low on that pin would place
    > the stamp in download mode (this makes the I/O pin an input). Then all I
    > require
    > is a modified TOKEN-PUSHER program that would allow me to call out via a
    > modem?
    >
    > Anyone any comments on this?


    If the modem is truly unattended, you might wish to deal in some fashion
    with "wrong number" phone calls to the remote stamp. Caller ID and
    Call-back modems come to mind.

    It goes without saying, of course, with remote (and presumably un-attended)
    resetting of the controller, that all of the relevant human and machine
    safety issues should be considered.


    Regards,
    Daniel McGlothin



    _________________________________________________________
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 16:42
    At 11:22 05/25/01, Peter Verkaik wrote:
    >Hi Jum,
    >
    > >The Stamp doesn't need to answer and establish a connection; the modem
    > >alone does that. And you can tap into the CD light (or equivalent) on the
    > >modem to trigger a Stamp reset. This light comes on when a connection is
    > >established. I'm not sure the modem will satisfy all the Stamp's needs,
    > >but it should be able to satisfy the ones above with a tiny bit of added
    > >circuitry - a one-shot fired off the CD light to reset the Stamp.
    >
    >I would like the stamp to answer. I don't want any sudden resets because of
    >data storage structures in eeprom. I could connect the CD output to a I/O
    >pin.

    Or you can AND the CD light with the output of an I/O pin so the Stamp is
    never reset unless that pin is in a state inviting reset. You can trigger
    only on a rising CD line but not a sustained one. You can do all sorts of
    things with gates and latches external to the Stamp and Modem to get the
    safety you want. I wasn't offering the complete and final solution. I'm
    not even sure it is really workable, but it's an idea to play with at least
    in your head.

    Jim H
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 19:46
    > I would like the stamp to answer. I don't want any sudden resets
    > because of data storage structures in eeprom. I could connect the
    > CD output to a I/O pin.

    OK, wacky idea: Use 2 PICs as a sort of serial-line relay. PIC 1
    is at the transmission end and sits between the PC and the modem
    (external modem). It passes all serial data through and also sends
    commands based on the state of DTR. Pic 2 is at the receiving end
    and sits between the modem and the actual Stamp. It receives all
    data from the modem and responds to the commands by setting DTR.

    For example:
    - PC sets DTR high, sends 'abc', sets DTR low
    - PIC 1 sends Esc 1, 'abc', Esc 0
    - PIC 2 sets pin0 high, sends 'abc', sets pin0 low
    - Stamp sees DTR go high, gets 'abc', sees DTR go low
    Note: Esc characters would have to be sent as Esc Esc

    It'd look something like this:
    __ Tx ____ _____ _____ ____ 2 _____
    |PC|----|PIC1|-|Modem| |Modem|-|PIC2|---|Stamp|
    | |DTR | | | | | | | | 3| |
    | |----| | | | | | | |---| |
    | |Rx |____| | |-//-| | |____| 1| |
    | |
    | | | |
    | |
    |__| |_____| |_____| |_____|

    You'd need to set up PICs that could simultaneously send
    and receive serial data (i.e. pass-through and filter).

    SD
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 19:52
    Steve,
    I have been using the IIe also. The Memory map shows only the memory in use
    for the file( 2k ) you are viewing at the top level( the tab on top ). Also,
    if you want to use several files in a project, you need to make sure that all
    of the default com port settings are specified to the one you are using. I
    can't remember the exact menus these are under but there are at least two
    places to make changes. My project kept trying to look for some of the files
    via another port. After I fixed it, it is working fine.

    Patty
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 21:20
    > > I would like the stamp to answer. I don't want any sudden resets
    >> because of data storage structures in eeprom. I could connect the
    >> CD output to a I/O pin.
    >
    >OK, wacky idea: Use 2 PICs as a sort of serial-line relay. PIC 1
    >is at the transmission end and sits between the PC and the modem
    >(external modem). It passes all serial data through and also sends
    >commands based on the state of DTR. Pic 2 is at the receiving end
    >and sits between the modem and the actual Stamp. It receives all
    >data from the modem and responds to the commands by setting DTR.
    >
    >For example:
    >- PC sets DTR high, sends 'abc', sets DTR low
    >- PIC 1 sends Esc 1, 'abc', Esc 0
    >- PIC 2 sets pin0 high, sends 'abc', sets pin0 low
    >- Stamp sees DTR go high, gets 'abc', sees DTR go low
    >Note: Esc characters would have to be sent as Esc Esc
    >
    >It'd look something like this:
    > __ Tx ____ _____ _____ ____ 2 _____
    >|PC|----|PIC1|-|Modem| |Modem|-|PIC2|---|Stamp|
    >| |DTR | | | | | | | | 3| |
    >| |----| | | | | | | |---| |
    >| |Rx |____| | |-//-| | |____| 1| |
    >| |
    | | | |
    | |
    >|__| |_____| |_____| |_____|
    >
    >You'd need to set up PICs that could simultaneously send
    >and receive serial data (i.e. pass-through and filter).
    >
    >SD



    Not too wacky! I use a similar setup in my modem access data
    loggers. Except the extra PIC is only on the Stamp end, not on the
    PC end. The PIC monitors the data lines, but the data itself passes
    through directly to the stamp lines (not through the PIC chip).
    power;--<---;
    __ Tx _____ ___|_ _|__ _____
    |PC|
    |Modem| | CD|--|PIC |-3|atn |
    | | | | | | --- | |
    | | | | |Modem| | | |Stamp|
    | |Rx | |-//-| |---o-|---2| |
    | |
    | | | |
    o---1| |
    |__| |_____| |_____| |_____|

    It was originally a Stamp1 circuit for modem & autoanswer at a site
    with only solar power. Normally, the modem is turned completely off.
    The PIC (originally a BASIC Stamp I) detects the incoming ring, and
    turns on the operating power to a Cermetek modem. The PIC then
    monitors the CD line and waits for the carrier. When it detects
    carrier, it resets the stamp, which wakes up, sees the flag from the
    PIC and proceeds to await data. The PIC then monitors the data line,
    and among other things, it detects a BREAK signal that can be sent if
    necessary from the PC. (BREAK is when the transmit line is held in
    an active state much longer than normal data framed by start and stop
    bits. 0.3 second is a typical BREAK) When the PIC detects a BREAK,
    it resets the stamp, to regain its attention if it is off busy in
    some loop. The PIC also implements hardware reset of the modem,
    which is much more reliable than software reset (+++ ATH). The
    original BS1 code is on my web site.

    This circuit would also work for Peter's application, for remote
    reprogramming. The BS1 program, when it detects the BREAK, normally
    delays until the BREAK goes away before it resets the Stamp. But if
    it were to generate the reset immediately, that would put the Stamp
    into programming mode. (Given that the PC went on to send the right
    preamble, tokens and checksums.)

    -- best regards
    Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
    mailto:tracy@e...
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-25 23:03
    Peter,

    Better still, take an output from the RING line, that every modem I know
    has. This line changes state when an inbound call is detected. If the modem
    supports standard Hayes commands (which most do) then sending ATA<CR> via
    the modem's RX line should answer the call.

    Cheers,

    Mike

    >
    Mensaje original
    > De: Peter Verkaik [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=tzDZOuePYoArTDpOm0XOg_Tf1nG6GHEwJ-474ZhtsuaF0p8U868P-3bnRORk-Acsl5JsFT0iRWxOKbUFurY-Uta3]peterverkaik@b...[/url
    > Enviado el: viernes, 25 de mayo de 2001 17:23
    > Para: basicstamps@yahoogroups.com
    > Asunto: [noparse][[/noparse]basicstamps] RE:BS2SX program download via phoneline
    >
    >
    > Hi Jum,
    >
    > >The Stamp doesn't need to answer and establish a connection; the modem
    > >alone does that. And you can tap into the CD light (or
    > equivalent) on the
    > >modem to trigger a Stamp reset. This light comes on when a connection is
    > >established. I'm not sure the modem will satisfy all the Stamp's needs,
    > >but it should be able to satisfy the ones above with a tiny bit of added
    > >circuitry - a one-shot fired off the CD light to reset the Stamp.
    >
    > I would like the stamp to answer. I don't want any sudden resets
    > because of
    > data storage structures in eeprom. I could connect the CD output to a I/O
    > pin.
    >
    > Greetings peter
    >
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-26 23:25
    I think parallax has a program that can handle these operations,
    mondo mini, but i am not sure. Look in parallax web catalog. I hope
    this helps.
Sign In or Register to comment.