Stamp Identify Sequence & documentation....
I have code that can successfully identify a BS2 Stamp using the "identify sequence" documented on page 6 of the "Basic Stamp Programming Protocol" manual. I am now attempting to identify the various other available stamps (BS2p24, BS2p40, BS2e, BS2sx, BS2pe & BS2px24).
In examining the documentation, it appears that the method of identifying the BS2e (the second stamp I'm attempting to identify) is a quite a bit more simple than the method of identifying the BS2. Where the BS2 requires sending/discard echo/receiving 2's-complement of each letter of it's name ('B', then 'S', then '2') before confirmation, the BS2e *only requires* sending/discard echo/receiving of the character 'e'. Other stamps appears to use this simplified method of identification.
Is this correct? I would have guessed that it would be similiar to the BS2 (using 2's complement) and send/discard echo/receive 2's-complement of all characters in the name ('B', then 'S', then '2', then 'e').
Is the documentation correct, or is the method that different between BS2 and all other stamps?
The reason I ask is that when I attempt to identify a BS2e as documented, my return character (after sending an 'e' and discarding the echo) is a 102 (when it should be a 101).
In examining the documentation, it appears that the method of identifying the BS2e (the second stamp I'm attempting to identify) is a quite a bit more simple than the method of identifying the BS2. Where the BS2 requires sending/discard echo/receiving 2's-complement of each letter of it's name ('B', then 'S', then '2') before confirmation, the BS2e *only requires* sending/discard echo/receiving of the character 'e'. Other stamps appears to use this simplified method of identification.
Is this correct? I would have guessed that it would be similiar to the BS2 (using 2's complement) and send/discard echo/receive 2's-complement of all characters in the name ('B', then 'S', then '2', then 'e').
Is the documentation correct, or is the method that different between BS2 and all other stamps?
The reason I ask is that when I attempt to identify a BS2e as documented, my return character (after sending an 'e' and discarding the echo) is a 102 (when it should be a 101).
Comments
There is additional info you might find helpful at www.emesystems.com/BS2clone.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
It also makes it much more difficult to identify a chip. A lot of trial and error as opposed to ask and response. Waiting for return values to timeout is not very elegant in some cases.
I'd like to suggest that in the future, this is more unified: Something alongs the lines of a command byte for "What type of chip are you?" and a response of 1,2,3,4,5,6, etc, then a command byte for "What version are you?" and a BCD response (ala the BS2) of 123 for 1.23.
With the current system, identifying a chip means checking for (in the case of the e-series) an e (in case it's one version), an f (for another) etc.....if I want the version number, I have to keep trying other letters until it fails. It is conceivable that no return value is present.
The IDE checks for Stamps by pinging first for the type of Stamp that is in the active window, and then the others in sequence. It only take 6 pings and even with the timeouts it does not take long. The method you are suggesting does make sense, but Parallax is religious about not breaking established protocols. In my opinion that is even more important than having an optimal protocol!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
P.S., I went back to my notes, and I see that as of 2005, the BS2e was in fact up to rev 1.1, which would echo an "f".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 9/18/2007 8:02:04 PM GMT