programming basicstamps II from realbasic(mac)
Archiver
Posts: 46,084
I am another Mac + stamp user. I'm trying to interface Macromedia director with
BSII using keyspan's twin serial adapter and Geoff Smith Serial Xtra.
I would like also to program the BSII from Mac G4.I am still trying to download
any program to it.I am afraid there is a trouble with the Mac serial to Stamp
RS-232 programing cable becauseI've already check out this link
http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Programming_Stam\
ps_on_a_Power_Mac.pdf
MAC BSII
5 RX
> 1 SOUT
3 TX
> 2 SIN
4 GND
> 4 VSS
1 HSKO
> 3 ATN
Have you ever done that before?
I will inform you if I get it.
Patricia.
>
> De: vrrv <rens.veltman@a...>
> Fecha: 13-Nov-2001 08:56
> Para: <basicstamps@yahoogroups.com>
> Asunto: Re: [noparse][[/noparse]basicstamps] Re: programming basicstamps II from realbasic
> (mac)
>
> am 10.11.2001 13:55 Uhr schrieb Jean No
BSII using keyspan's twin serial adapter and Geoff Smith Serial Xtra.
I would like also to program the BSII from Mac G4.I am still trying to download
any program to it.I am afraid there is a trouble with the Mac serial to Stamp
RS-232 programing cable becauseI've already check out this link
http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Programming_Stam\
ps_on_a_Power_Mac.pdf
MAC BSII
5 RX
> 1 SOUT
3 TX
> 2 SIN
4 GND
> 4 VSS
1 HSKO
> 3 ATN
Have you ever done that before?
I will inform you if I get it.
Patricia.
>
> De: vrrv <rens.veltman@a...>
> Fecha: 13-Nov-2001 08:56
> Para: <basicstamps@yahoogroups.com>
> Asunto: Re: [noparse][[/noparse]basicstamps] Re: programming basicstamps II from realbasic
> (mac)
>
> am 10.11.2001 13:55 Uhr schrieb Jean No
Comments
>...using keyspan's twin serial adapter and Geoff Smith Serial Xtra.
>I would like also to program the BSII from Mac G4.I am still trying
>to download any program to it.I am afraid there is a trouble with
>the Mac serial to Stamp RS-232 programing cable becauseI've already
>check out this link
>
>http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Progr
>amming_Stamps_on_a_Power_Mac.pdf
>
> MAC BSII
> 5 RX
> 1 SOUT
> 3 TX
> 2 SIN
> 4 GND
> 4 VSS
> 1 HSKO
> 3 ATN
Hi Patricia,
I do program Stamps using the G4/virtualPC/windows98 with the keyspan
PDA adapter.
I doubt if you will have any joy with the twin serial adapter,
because it does not emulate the real DB9 PC serial port. The PDA
adapter _does_ emulate the PC serial port, remarkably well.
-- Tracy
reference. Now I will have to figure out how to convert RS-422 into RS-232.
It is not enjoyable but there might be a way to do it. I will keep you
informed.
Thank You.
>
> De: Tracy Allen <tracy@e...>
> Fecha: 14-Nov-2001 15:04
> Para: basicstamps@yahoogroups.com
> Asunto: [noparse][[/noparse]basicstamps] Re: programming basicstamps II from realbasic (mac)
>
> At 2:02 PM -0500 11/13/01, <patricia_nino@s...> wrote:
> >...using keyspan's twin serial adapter and Geoff Smith Serial Xtra.
>
> >I would like also to program the BSII from Mac G4.I am still trying
> >to download any program to it.I am afraid there is a trouble with
> >the Mac serial to Stamp RS-232 programing cable becauseI've already
> >check out this link
> >
> >http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Progr
> >amming_Stamps_on_a_Power_Mac.pdf
> >
> > MAC BSII
> > 5 RX
> 1 SOUT
> > 3 TX
> 2 SIN
> > 4 GND
> 4 VSS
> > 1 HSKO
> 3 ATN
>
>
> Hi Patricia,
>
> I do program Stamps using the G4/virtualPC/windows98 with the keyspan
> PDA adapter.
>
> I doubt if you will have any joy with the twin serial adapter,
> because it does not emulate the real DB9 PC serial port. The PDA
> adapter _does_ emulate the PC serial port, remarkably well.
>
> -- Tracy
>
> 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/
>
>
>
Obt
> Hi Patricia,
>
> I do program Stamps using the G4/virtualPC/windows98 with the keyspan
> PDA adapter.
What version are you (or anyone) using - Virtual PC version 4?? Anyone
using it with built-in serial ports? It doesn't work for me.
>
> I doubt if you will have any joy with the twin serial adapter,
> because it does not emulate the real DB9 PC serial port. The PDA
> adapter _does_ emulate the PC serial port, remarkably well.
My mac has the built-in serial ports (no USB). Unfortunately I can't
seem to get Virtual PC to work with the Stamp editor. I've used (and
still do) the cable Patricia described (you need to ground pin 8 of the
Mac connector too) with the old SoftPC system from a long time ago - so
I know it's possible. It's not like there aren't enough lines on the
Mac port.
It only needs the TX and RX data lines, which seem to work (I can see
activity on them with my logic probe), plus the DTR/ATN line. This
should correspond to the HSKo line on the Mac serial port. I can
actually control this line using a DOS serial port analyser software in
VPC; turning on/off DTR in the software turns on/off the HSKo line. But
the Stamp editor software doesn't seem to be able to control it. It
stays low all the time.
As I said, I can still fire up the old SoftPC and it works fine using
the "special Mac version" of the DOS Stamp editor software from several
years ago. What did they know that Virtual PC doesn't I wonder? I think
this should also work fine with the Keyspan Twin Serial adapter.
<Jeff Mann
> > Hi Patricia,
> >
> > I do program Stamps using the G4/virtualPC/windows98 with the keyspan
> > PDA adapter.
>
>What version are you (or anyone) using - Virtual PC version 4??
Yes, Virtual PC version 4 on a G4. With the keyspan adapter
connected to a USB port. It is pretty much straight out of the
document on the Parallax web site:
http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Progr
amming_Stamps_on_a_Power_Mac.pdf
>Anyone
>using it with built-in serial ports? It doesn't work for me.
> >
> > I doubt if you will have any joy with the twin serial adapter,
> > because it does not emulate the real DB9 PC serial port. The PDA
> > adapter _does_ emulate the PC serial port, remarkably well.
>
>My mac has the built-in serial ports (no USB). Unfortunately I can't
>seem to get Virtual PC to work with the Stamp editor. I've used (and
>still do) the cable Patricia described (you need to ground pin 8 of the
>Mac connector too) with the old SoftPC system from a long time ago - so
>I know it's possible. It's not like there aren't enough lines on the
>Mac port.
>
>It only needs the TX and RX data lines, which seem to work (I can see
>activity on them with my logic probe), plus the DTR/ATN line. This
>should correspond to the HSKo line on the Mac serial port. I can
>actually control this line using a DOS serial port analyser software in
>VPC; turning on/off DTR in the software turns on/off the HSKo line. But
>the Stamp editor software doesn't seem to be able to control it. It
>stays low all the time.
AFAIK, there were two problems with programming the Stamp under PC
emulation on older RS485 Macs. One was hardware related--the
necessary BREAK signal did not appear on the tx line in conjunction
with the reset pulse on DTR (HSKo) line. That combination is
necessary to put the Stamp into programming mode. I found that a
runt pulse appeared on the tx line at the proper time, so in theory
it would be possible to work around the problem with a little
hardware adapter and pulse stretcher. But there was a more serious
problem having to do with timing. The PC emulator took too long a
time to deliver characters from the PC program to the serial port and
to return responses back from the serial port to the PC code. Serial
port buffering appeared to be keyed on a 50 millisecond task clock.
That was fatal with the stampw.exe, because it expected responses
within about 20 milliseconds, or else it would time out with the
dreaded, "hardware not found" error. I think they were working on
that when the Macs turned to USB exclusively, and it was discovered
(by a fellow down under I recall) that the Keyspan PDA adapter and
software would work. It is remarkable, because the Stampw.exe
software still has tight requirements for timing and return of
responses from the Stamp.
>
>As I said, I can still fire up the old SoftPC and it works fine using
>the "special Mac version" of the DOS Stamp editor software from several
>years ago. What did they know that Virtual PC doesn't I wonder?
DOS versus Windoze!
>I think
>this should also work fine with the Keyspan Twin Serial adapter.
>
><Jeff Mann
tracy, patricia et al
>> My mac has the built-in serial ports (no USB). Unfortunately I can't
>> seem to get Virtual PC to work with the Stamp editor. I've used (and
>> still do) the cable Patricia described (you need to ground pin 8 of the
>> Mac connector too) with the old SoftPC system from a long time ago - so
>> I know it's possible. It's not like there aren't enough lines on the
>> Mac port.
i've tried it with KeyspanUSA28X USB to serial adapter -> the BasicStamp
Editor software believes to see the stamps, but tells me there was no power
on the stamp. have not grounded pin 8 on the described cable (is this the
reason for the "no power" message?).
just booght the keyspan usb pda adapter -> follwing the instructions on ->
http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Programming_
Stamps_on_a_Power_Mac.pdf
-> this was it: both pocketbot with stamp2 and stamp2sx do ther work now.
following the obsession to talk to the stamps via realbasics built in serial
capabilities now (the pda adapters line monitor shows me the tokens...).
in case my parsing experiments show some results i'll make it public.
rens
> i've tried it with KeyspanUSA28X USB to serial adapter -> the BasicStamp
> Editor software believes to see the stamps, but tells me there was no power
> on the stamp.
That's the error I get. I think it means that the software thinks it
detects the "loopback" connection between DSR and RTS. Since these pins
don't exist on the Mac, I guess it must be something in the VirtualPC
serial driver. It "guesses" that there's no power, because it detects
the loopback connection but the Stamp isn't responding. However, the
Stamp isn't responding because it's not getting the right signals on
the ATN line etc.
> have not grounded pin 8 on the described cable (is this the
> reason for the "no power" message?).
No. Pin 8 is the RxD+ input and needs to be referenced to ground. The
Mac serial port is RS422 not RS232 but it is very easy to connect them.
The main difference is that RS422 is differential. There is a + and -
signal, while RS232 signal is single-ended, referenced to ground. So
when you connect to RS232, you put the signal in one side of the
differential input, and the ground to the other side. Otherwise, it
would be an unconnected input. It might work sometimes but it will pick
up noise.
You might think to put the RS232 TxD signal in the Mac's RxD+ pin, and
ground the RxD- pin, but that's not correct since RS232 uses a negative
voltage as logic 1. The RS232 TxD goes to the Mac's RxD- (pin 5) and
you ground the RxD+ (pin 8). For the output, you leave the Mac's TxD+
unconnected - if you grounded it, it would be a short-circuit and
probably cause the chip to overheat.
<Jeff Mann
P.S. thanks Tracy, for the info. I also have a PIC ICD that I've been
struggling to get working. Sounds like I definitely need the PDA
adapter and a USB card.
I could download my program to the BSII with the KeyspanUSA28X USB to serial
adapter:
MAC BSII
5 RX
> 1 SOUT
3 TX
> 2 SIN
4 GND
> 4 VSS
1 HSKO, 8 RDX+
> 3 ATN
[noparse]:)[/noparse]
I know that the PDA adapter must have been better, but it finally worked fine
with Virtual PC.
Thank you.
Patricia
>
> De: jefman@i...
> Fecha: 15-Nov-2001 18:34
> Para: basicstamps@yahoogroups.com
> Asunto: [noparse][[/noparse]basicstamps] Re: programming basicstamps II from realbasic(mac)
>
> --- In basicstamps@y..., vrrv <rens.veltman@a...> wrote:
> > i've tried it with KeyspanUSA28X USB to serial adapter -> the BasicStamp
> > Editor software believes to see the stamps, but tells me there was no power
> > on the stamp.
>
> That's the error I get. I think it means that the software thinks it
> detects the "loopback" connection between DSR and RTS. Since these pins
> don't exist on the Mac, I guess it must be something in the VirtualPC
> serial driver. It "guesses" that there's no power, because it detects
> the loopback connection but the Stamp isn't responding. However, the
> Stamp isn't responding because it's not getting the right signals on
> the ATN line etc.
>
> > have not grounded pin 8 on the described cable (is this the
> > reason for the "no power" message?).
>
> No. Pin 8 is the RxD+ input and needs to be referenced to ground. The
> Mac serial port is RS422 not RS232 but it is very easy to connect them.
> The main difference is that RS422 is differential. There is a + and -
> signal, while RS232 signal is single-ended, referenced to ground. So
> when you connect to RS232, you put the signal in one side of the
> differential input, and the ground to the other side. Otherwise, it
> would be an unconnected input. It might work sometimes but it will pick
> up noise.
>
> You might think to put the RS232 TxD signal in the Mac's RxD+ pin, and
> ground the RxD- pin, but that's not correct since RS232 uses a negative
> voltage as logic 1. The RS232 TxD goes to the Mac's RxD- (pin 5) and
> you ground the RxD+ (pin 8). For the output, you leave the Mac's TxD+
> unconnected - if you grounded it, it would be a short-circuit and
> probably cause the chip to overheat.
>
> <Jeff Mann
>
> P.S. thanks Tracy, for the info. I also have a PIC ICD that I've been
> struggling to get working. Sounds like I definitely need the PDA
> adapter and a USB card.
>
>
>
> 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/
>
>
>
Obt
> I could download my program to the BSII with the KeyspanUSA28X USB to serial
adapter:
> MAC BSII
> 5 RX
> 1 SOUT
> 3 TX
> 2 SIN
> 4 GND
> 4 VSS
> 1 HSKO, 8 RDX+
> 3 ATN
You should connect Mac pin 8 RxD+ to BSII pin 4 VSS, not pin 3 ATN as
shown above. The cable above might work anyways because ATN would
always be low when serial input is coming from the Stamp. But the
proper cable would be:
MAC BSII
5 RX
> 1 SOUT
3 TX
> 2 SIN
4 GND, 8 RDX+
> 4 VSS
1 HSKO
> 3 ATN
What I've done is make a Mac -> DB9 cable for general use:
8-pin DIN DB9
1 HSKo 4,7 DTR, RTS
2 HSKi 8 CTS
3 TxD- 3 TxD
4 GND 5 GND
5 RxD- 2 RxD
6 TxD+ not connected
7 GPin 1 CD
8 RxD+ 5 GND
And then made a normal BS2 cable as per the Stamp manual.
The fact that Patricia has been able to make this work with a Keyspan
8-pin serial adapter, while I can't get it to work with my built-in
serial ports would seem to confirm Tracy's suggestion that it is timing
problems that are solved with the Keyspan adapter, and not 8-pin vs. 9-
pin issues. I tested again, and found that the ATN line was actually
being pulsed. So I'm getting signals on all the lines, but it still
isn't recognizing the Stamp.
So it would seem that the simplest solution for those of us with built-
in ports is to stick with the "Mac-ified" version of the DOS Stamp
editor and an old copy of SoftPC. Unfortunately I can't get it to work
at all under Virtual PC, even in pure DOS mode. Strange, because other
DOS programs I have seem to have no problem accessing the serial port.
The other option (and the only option if you want to run the Windows
editor) is to buy a USB card and a Keyspan serial adapter - seems kind
of dumb when you already have serial ports built in!
A related question: could anyone using the Keyspan PDA adapter tell me
whether it fully emulates the 9-pin port - i.e. do you have independent
control over both DTR (pin 4) and RTS (pin 7)? (This could be tested
with the "com port settings and control window in the CTS Serial Port
utilities from http://www.comminfo.com/pages/download.htm ) I ask
because I have a Microchip MPLAB-ICD that requires both these lines,
which is impossible using the 8-pin port. I'm planning to buy the PDA
adapter and test it myself, but just thought that if someone knows
already that it doesn't work, I won't waste the money.
Thanks... <Jeff Mann
400 and a Powerbook G3 Firewire. But under OSX, serial support
ain't in vpc yet. Bummer since Keyspan has OSX drivers now.
-Chilton
On Friday, November 16, 2001, at 09:43 PM, jefman@i... wrote:
> So it would seem that the simplest solution for those of us with built-
> in ports is to stick with the "Mac-ified" version of the DOS Stamp
> editor and an old copy of SoftPC. Unfortunately I can't get it to work
> at all under Virtual PC, even in pure DOS mode. Strange, because other
> DOS programs I have seem to have no problem accessing the serial port.
> The other option (and the only option if you want to run the Windows
> editor) is to buy a USB card and a Keyspan serial adapter - seems kind
> of dumb when you already have serial ports built in!
>
port is just another device you read and write to, so if anyone
finds out what tokens to use, I'll gladly write a Cocoa-Native
version of the editor.
-Chilton
Original Message
From: <jefman@i...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, November 16, 2001 10:43 PM
Subject: [noparse][[/noparse]basicstamps] Re: programming basicstamps II from realbasic(mac)
> --- In basicstamps@y..., <patricia_nino@s...> wrote:
> > I could download my program to the BSII with the KeyspanUSA28X USB to
serial adapter:
> > MAC BSII
> > 5 RX
> 1 SOUT
> > 3 TX
> 2 SIN
> > 4 GND
> 4 VSS
> > 1 HSKO, 8 RDX+
> 3 ATN
>
> You should connect Mac pin 8 RxD+ to BSII pin 4 VSS, not pin 3 ATN as
> shown above. The cable above might work anyways because ATN would
> always be low when serial input is coming from the Stamp. But the
> proper cable would be:
>
> MAC BSII
> 5 RX
> 1 SOUT
> 3 TX
> 2 SIN
> 4 GND, 8 RDX+
> 4 VSS
> 1 HSKO
> 3 ATN
>
> What I've done is make a Mac -> DB9 cable for general use:
>
> 8-pin DIN DB9
> 1 HSKo 4,7 DTR, RTS
> 2 HSKi 8 CTS
> 3 TxD- 3 TxD
> 4 GND 5 GND
> 5 RxD- 2 RxD
> 6 TxD+ not connected
> 7 GPin 1 CD
> 8 RxD+ 5 GND
>
> And then made a normal BS2 cable as per the Stamp manual.
>
> The fact that Patricia has been able to make this work with a Keyspan
> 8-pin serial adapter, while I can't get it to work with my built-in
> serial ports would seem to confirm Tracy's suggestion that it is timing
> problems that are solved with the Keyspan adapter, and not 8-pin vs. 9-
> pin issues. I tested again, and found that the ATN line was actually
> being pulsed. So I'm getting signals on all the lines, but it still
> isn't recognizing the Stamp.
>
> So it would seem that the simplest solution for those of us with built-
> in ports is to stick with the "Mac-ified" version of the DOS Stamp
> editor and an old copy of SoftPC. Unfortunately I can't get it to work
> at all under Virtual PC, even in pure DOS mode. Strange, because other
> DOS programs I have seem to have no problem accessing the serial port.
> The other option (and the only option if you want to run the Windows
> editor) is to buy a USB card and a Keyspan serial adapter - seems kind
> of dumb when you already have serial ports built in!
>
> A related question: could anyone using the Keyspan PDA adapter tell me
> whether it fully emulates the 9-pin port - i.e. do you have independent
> control over both DTR (pin 4) and RTS (pin 7)? (This could be tested
> with the "com port settings and control window in the CTS Serial Port
> utilities from http://www.comminfo.com/pages/download.htm ) I ask
> because I have a Microchip MPLAB-ICD that requires both these lines,
> which is impossible using the 8-pin port. I'm planning to buy the PDA
> adapter and test it myself, but just thought that if someone knows
> already that it doesn't work, I won't waste the money.
>
> Thanks... <Jeff Mann
>
>
>
> 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/
>
>port is just another device you read and write to, so if anyone
>finds out what tokens to use, I'll gladly write a Cocoa-Native
>version of the editor.
>
>-Chilton
Hi Chilton,
The tokenizing scheme for the BS2 is described in great detail in
Brian Forbes' excellent book:
http://members.aol.com/stamp2book
Be forwarned though, the tokens are not a simple byte-boundary
affair. The Stamp makes use of every bit, and the tokens are all
packed efficiently into exactly as many bits as it takes to do the
job.
I have info about the programming protocol posted at
http://www.emesystems.com/BS2clone.htm
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
> Tracy your right. I bought the wrong and more expensive
Keyspan’s reference. Now I will have to figure out how to
convert RS-422 into RS-232.
>
> It is not enjoyable but there might be a way to do it. I will keep
you informed.
>
> Thank You.
>
> >
> > De: Tracy Allen <tracy@e...>
> > Fecha: 14-Nov-2001 15:04
> > Para: basicstamps@y...
> > Asunto: [noparse][[/noparse]basicstamps] Re: programming basicstamps II from
realbasic (mac)
> >
> > At 2:02 PM -0500 11/13/01, <patricia_nino@s...> wrote:
> > >...using keyspan's twin serial adapter and Geoff Smith Serial
Xtra.
> >
> > >I would like also to program the BSII from Mac G4.I am still
trying
> > >to download any program to it.I am afraid there is a trouble
with
> > >the Mac serial to Stamp RS-232 programing cable becauseI've
already
> > >check out this link
> > >
> >
>http://www.parallaxinc.com/downloads/Documentation/stamp_on_mac/Progr
> > >amming_Stamps_on_a_Power_Mac.pdf
> > >
> > > MAC BSII
> > > 5 RX
> 1 SOUT
> > > 3 TX
> 2 SIN
> > > 4 GND
> 4 VSS
> > > 1 HSKO
> 3 ATN
> >
> >
> > Hi Patricia,
> >
> > I do program Stamps using the G4/virtualPC/windows98 with the
keyspan
> > PDA adapter.
> >
> > I doubt if you will have any joy with the twin serial adapter,
> > because it does not emulate the real DB9 PC serial port. The PDA
> > adapter _does_ emulate the PC serial port, remarkably well.
> >
Hello
Your problem can be solved if you find a way to set the serial
parameters on your MAC.
The problem with serial comunication is that cabling is very easy
task, but the bauds, stop bits, etc. must match among the transmiter
and the receiver.
If you find a way to manipulate those parameters in the MAC you can
conect ANY serial device to it.