Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Keoni29 on October 14, 2011, 07:18:56 am

Title: Byte transfer
Post by: Keoni29 on October 14, 2011, 07:18:56 am
http://www.omnimaga.org/index.php?action=dlattach;topic=10338.0;attach=9861
I wrote this code to understand how the byte transfer between 2 calculators works. It worked yesterday, but I changed some minor things and now it stopped working. I really can't see what the bug is.
Title: Re: Byte transfer
Post by: aeTIos on October 14, 2011, 08:37:35 am
is this for us to check where the bug could be?
Title: Re: Byte transfer
Post by: Keoni29 on October 14, 2011, 10:07:59 am
Well I couldn't find a bug, so I'd apreciate if you where able to tell me whay I've done wrong.
Title: Re: Byte transfer
Post by: Builderboy on October 14, 2011, 04:28:06 pm
First off, are you aware that Axe has it's own Byte transfer routines?  They have very good features and are very reliable.  Or are you just perusing this topic for the fun of it?  In any case, it may be worthy to note some of the subtleties of how Port command works (or at least what I believe, I am no expert).  If one calculator writes a 3 into the Port (setting both bits), no matter what the other calculator sets the Port to, the Port will still remain at 3.  This is because when a single bit is 'pulled high' (set to 1) on either calculator, it is perceived by both to be high, even if the second calc has it set to be low.  In this sense, if both calculators set the Port to be a certain number, the actual reading of this Port will be the OR of these two numbers.
Title: Re: Byte transfer
Post by: Keoni29 on October 15, 2011, 06:57:08 am
I found the bug. Now it transfers something, but not the correct number is displayed. I dunno if it's the encoder, the receiver or the decoder