Author Topic: Byte transfer  (Read 4247 times)

0 Members and 2 Guests are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Byte transfer
« 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.
If you like my work: why not give me an internet?








Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Byte transfer
« Reply #1 on: October 14, 2011, 08:37:35 am »
is this for us to check where the bug could be?
I'm not a nerd but I pretend:

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Byte transfer
« Reply #2 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.
If you like my work: why not give me an internet?








Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Byte transfer
« Reply #3 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.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Byte transfer
« Reply #4 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
If you like my work: why not give me an internet?