Search the web
Sign In
New User? Sign Up
nsbasic-palm · NS Basic/Palm Web Board
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Fwd: Re: Help!   Message List  
Reply | Forward Message #8625 of 57162 |
Here's a great note on IR that Tracy Allen has given me permission to
pass on to the board. It seems a lot of the struggles with IR may trace
back to how it is implemented within the Palm device...

---------------- Begin Forwarded Message ----------------

I've seen your questions about the IR interface on the nsBasic
formum. I am kind of a newbie there myself, so I too was
disappointed that no one came back with a definitive answer. I too
have a lot of impetus to get it working to offload my data loggers
and other applications with the BASIC Stamp.

I have a Palm 105.

I have been able to receive IR serial data with no major problems
into the Palm/nsBasic, both from an HP200 handheld and from a BASIC
stamp (via a MAX3100 uart/IrDA endec). I have not tried it yet with
a second Palm, but it should work, right?!

On the flip side, however, when I have tried in the past to transmit
IR data from the Palm to the HP or to the Stamp, I have only seen
garbage. Today after I received your message, I decided to have
another whack at it.

I still am not quite sure what is going on, but I have made progress.
I hooked up an oscilloscope to a photodetector module, so that I
could visualize the raw IR signal transmitted by the Palm/nsBasic.

Here is a sketch of how I got the Palm to transmit IR successfully to
the HP200:
serialopen at 2400 baud
serialset to ir
enter a loop that repeatedly sends a short string

At this point, garbage appears on the HP200 screen. Something is
being transmitted via IR, but what? After a minute, the power
automatically goes off on the palm. I turn it back on. Violà!! Now
the correct data appears on the HP200 screen. I try it again.
serialclose. go through the above steps again to open the ir port
and enter the loop. Again garbage. I turn off the palm. Turn on
the palm. Now the correct data is coming through. That power
cycling trick works every time. Go figure. hmmm

On the oscilloscope it looks as though the baud rate is too low at
first. Then after the power cycles, it comes up to the correct value.
Very strange. I will do some more tests tomorrow. It looks like the
baud rate might be a factor of 4 low.

Furthermore, the IR pulses sent out from the Palm are narrower than
is acceptable for some IrDA devices. The IrDA standard _suggests_
that the pulse duration be 3/16 of the bit duration. For a 2400 baud
signal, the bit duration should be 417 microseconds, and 3/16 of that
is 78 microseconds. But what I see is that the Palm is transmitting
pulses of about 15 microseconds duration at the 2400 baud rate. That
would certainly conserve power. The HP200 is in fact able to receive
those narrower pulses correctly (when the baud rate was correct--see
above). On the other hand, the MAX3100 connected to the BASIC Stamp
was never able to receive those correctly, because the MAX3100 does
in fact reject pulses if they are less than 1/16 of the bit duration.
(I guess it could be made to work with a little pulse stretcher
circuit--that should be a quick hack).

The IrDA spec does not _demand_ that the pulse be 3/16 of the bit
duration. The pulse duration is allowed to be as low as 1.41
microseconds, which is the shortest pulse allowed for the 115kbaud
rate. The purpose is to conserve power.

I also checked out the PalmOS oasis to find documents on IrDA
compliance. There is quite a bit there, and the answer is, sort of.
They claim in one document that the pulse width of a transmitted bit
is 1.63us at all bps rates, but I found it to be longer than that.
They say that various models in the evolution of the Palm had
different implementations, and are evolving toward closer compliance.

Any thoughts on the above? I will keep you posted if I learn more.


----------------- End Forwarded Message -----------------

George Henne
NS BASIC Corporation
http://www.nsbasic.com




Wed May 30, 2001 4:33 pm

gh@...
Send Email Send Email

Forward
Message #8625 of 57162 |
Expand Messages Author Sort by Date

Here's a great note on IR that Tracy Allen has given me permission to pass on to the board. It seems a lot of the struggles with IR may trace back to how it is...
George Henne
gh@...
Send Email
May 30, 2001
4:35 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help