Does anybody know how to use the link port in Axe? I've tried using the Send( and Get commands but it isn't working...

Thanks in advance Very Happy

Code:
+----------------------------+-------------------------------------------------------------+
|port          key: ClrTable | Returns the status of the link port as a number 0-3.        |
+----------------------------+-------------------------------------------------------------+
|EXP→port      key: ClrTable | Sets the link port to a given status with a number 0-3.     |
|                            | Must exit program with status 0 if changed!                 |
+----------------------------+-------------------------------------------------------------+
|Freq(WAVE,TIME) key: SinReg | Sound is played out of the link port. Wave is inversely     |
|                            | proportional to frequency and Time must be much greater     |
|                            | than Wave to hear anything.                                 |
+----------------------------+-------------------------------------------------------------+
|Send(BYTE,TIME)             | Tries to send the byte across the linkport. It will keep    |
|                            | trying until the other calculator receives the byte or time |
|                            | runs out. Returns 1 if the byte was sent successfully or 0  |
|                            | if it timed-out. Time is in the order of microseconds.      |
+----------------------------+-------------------------------------------------------------+
|Get               key: Get( | Checks if the sender is trying to send anything. Returns    |
|                            | the byte if it was received or -1 if nothing was sent. No   |
|                            | waiting is done.                                            |
+----------------------------+-------------------------------------------------------------+



from the above, you can see that the link port can either be controlled manually or a built-in routine can be used to easily send values. how were you trying to use Get( and Send( and what exactly were the symptoms? i've had them work fine for me.
I believe ClrDraw's issue has been "solved" on the corresponding Omnimaga thread. The issue was that he was using a USB link cable, and Axe does not support USB linking because ain't nobody got time to implement that. Unless you do, in which case I'd be grateful if you'd let me try to pack it into Axe.
Quote:
ain't nobody got time to implement that

Haha XD

But yeah, I was using the wrong link port. Thanks for the help anyways.
Runer112 wrote:
Unless you do, in which case I'd be grateful if you'd let me try to pack it into Axe.

It might be possible to do this in 500 bytes for a bare-bones system that lets you exchange single bytes like the DBUS. The implementation would cut out a lot of stuff that's technically required by the USB spec, but can be ignored for a simple point-to-point implementation with two calcs.

It'd probably go something like this: Wait until a UBS cable is connected. If B cable is connected, perform peripheral-mode initialization and disable all USB interrupts. Write 0 to ports 80h-85h, 8B, and 8E. Poll bit 0 of port 84 to check for incoming packet, and read a byte from A0 when set. To send a packet, write 08 to port 91 to flush any data already in the queue, then write your byte A0, and finally write 01 to port 91 to tell the controller the pack is ready to send. If an A cable is connected, do short host-mode initialization. Surprisingly, most of the stuff I said above will also work for host mode.

I've also found that initializing the charge pump is not necessary for peripheral mode, so that should give major power savings. It may or may not be possible to trick host mode into working without the charge pump.

For peripheral mode initialization, you need to set up the 48 MHz crystal, set the D+/- pull-ups, reset the PHY, and disable a lot of hardware events you don't care about. I don't know about host-mode, as I haven't looked at that code.

For the USB experts here, the essential hack I'm suggesting here is completely skipping the USB initialization sequence. No descriptors, no function address (just keep it fixed to zero), just sending and receiving data on the control pipe.
  
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 1 of 1
» 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