ok, thanks. But then, does this mean that this code:


Code:
::Pseudocode
//program inits
Repeat getkey(15)

//Load 4 bytes of data to be sent into L4
2->{L4}r
2->{L4+2}r

//Clear out L5, the recently received data buffer
0->{L5}r
0->{L5+2}r

//Sending
   //is Sizeword+1 msb reset?
   If GetS = 0
   
      //load data into the send buffer
      Copy(L4,OTDAT,4
      //set size into Sizeword
      4->{SNDID+5}r
      //set Sizeword+1 msb
      SetS
      
   End
//Receiving
   
   //is size word set?
   If GetR
      
      //put the data somewhere we can use it later in the program
      Copy(INDAT,L5,4
      //reset msb of Sizeword+1
      SetR   //I'm not sure if this is correct...
      
   End
   
//now we're doing sending and receiving
//do whatever crap with the data

//recently sent data is in L4
//recently received data is in L5

ClrDraw
Text(0,0,{L5}r>Dec
Text(0,8,{L5}r>Dec
Dispgraph
   
End


would work perfectly if RCVID was filled with five zeros?
minus the setr needing to be a resr yes it should work fine
hm, ok. This is ofc assuming a setup where two calcs are connected by a physical link cord - I'll see if I can get the code up and running sometime soon.
geekboy1011 wrote:
ok sndid should never be filled with 5 0's thats pointless

rcvid when that is filled with 5 0's calcnet will send the data you have loaded to everyone. not just a specific endpoint

Ok, geekboy, it seems as if you keep mixing up SNDID and RCVID. SNDID (or TXID) is the buffer that you store the target of reception into. RCVID is the buffer that says where the last message came from.
oops. i wrote that post when i should have been sleeping >.<
But it is still true that its pointless to have SNDID filled with 5 zeros?
LincolnB wrote:
But it is still true that its pointless to have SNDID filled with 5 zeros?
You fill the Cn2_Int_Sendbuf to Cn2_Int_Sendbuf+4 area with zeroes if you want to a broadcast frame. There's no point in ever zeroing out Cn2_Int_Recbuf through Cn2_Int_Recbuf+4, since the interrupt always takes care of filling in a sender address.
Alright first and foremost I have probably been totally wrong with how i have been saying what is what I apologize my fail.

Secondly
http://www.cemetech.net/programs/index.php?mode=file&id=737
Updated with better documentation. And some new equate names and stuff. Should be better in the long run. change log has an abstract of everything that has been done.

note new names on all the programs and stuff you should be able to figure it out Very Happy

Edit by Kerm: Changed massive link to the smaller fileID link
Totally wrong with which bit, just so we can be clear and sort out both you and LincolnB/CompyNerd?
I honestly don't even know what was wrong. sndid and rcvid were getting mixed up constantly. so i triple checked everything and updated the readme so use that so we are all square. :/
geekboy1011 wrote:
I honestly don't even know what was wrong. sndid and rcvid were getting mixed up constantly. so i triple checked everything and updated the readme so use that so we are all square. :/
OK, sounds good. You made sndid be the calculator ID in the send buffer, ie, the calculator to send to, and rcvid be the calculator ID in the receive buffer, ie, the calculator that sent the frame?
yes i did i just renamed them to rx and txid shorter so the code should be more readable. and easier for me to remember
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 5 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement