Re: A Byte out of USB
Re: A Byte out of USB
- Subject: Re: A Byte out of USB
- From: "Hank Heijink (Mailinglists)" <email@hidden>
- Date: Wed, 12 Mar 2008 17:09:01 -0400
On Mar 12, 2008, at 4:51 PM, Dave Camp wrote:
On Mar 12, 2008, at 1:35 PM, R T wrote:
This may be the wrong list to ask this question, if so
maybe you can guide me.
Back in the days of OS 9 I wrote a block of code that
sent a byte of information out the serial port. The
byte went to a microcontroller of a machine. At the
time I wrote it in Hypercard.
I want to use Xcode/Applescript to send this same
byte of information out the USB port from my new
MacBook running 10.5.2.
Is there a sample block of code somewhere that shows
how to accomplish sending 1 byte out a USB Port?
USB doesn't work like that. You can learn more about USB at <http://www.usb.org
>.
If what you really need is a serial connection to a external RS232
device you should purchase a USB to RS232 adaptor (KeySpan makes
some nice devices - <http://www.keyspan.com> ). Then the question
becomes: how do I communicate with a serial port? I think there is
some sample code on the Apple dev site or pretty much any Unix
example will probably work. KeySpan also has sample code on their
Support page.
Apple's sample code (I think it's just called SerialPort) works
beautifully with the Keyspan adaptors with a little tweak here and
there. I used it as a starting point to port some old Hypercard code
to MacOS 10.4 at the time through a Keyspan adaptor attached to the
USB port.
That said, the usb-dev list is where you'll get more helpful answers
if this isn't what you need.
Good luck,
Hank
Hank
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden