Difference between revisions of "83Plus:Ports:08"

From WikiTI
Jump to: navigation, search
m
 
(More information)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Note:''' Do not take the information on this template page as actual documentation!
+
[[Category:83Plus:Ports:By_Address|08 - Link Assist Enable]] [[Category:83Plus:Ports:By_Name|Link Assist Enable]]
 
+
The Ports are named by their number, in hexadecimal. An example is [[83Plus:Ports:00]].
+
 
+
You also must put a variation on the following code into your page to have it categorized:
+
NaodW29-nowiki4ba326a46ee8fcd600000001
+
 
+
----
+
 
+
 
== Synopsis ==
 
== Synopsis ==
'''Port Number:''' 06h
+
'''Port Number:''' 08h
  
'''Function:''' Flash Memory Paging
+
'''Function:''' Link Assist Enable
  
This port controls what page is swapped into the 4000h to 7FFFh range. ('''DO NOT''' take this template page as real documentation on port 6!)
+
This port controls whether the hardware link assist is enabled. It also controls what interrupts the link assist will generate.
  
 
=== Read Values ===
 
=== Read Values ===
* [00h - FFh]: The current port mapped to the memory range 4000h through 7FFFh.
+
* Bit 0: 1 if link assist will generate an interrupt when a byte is received. (Link assist must be enabled)
 +
* Bit 1: 1 if link assist will generate an interrupt when a byte has been sent. (Link assist must be enabled)
 +
* Bit 2: 1 if link assist will generate an interrupt when an error has occurred. (Link assist must be enabled)
 +
* Bit 6: 1 if two-second timeout is disabled
 +
* Bit 7: 1 if the link assist is disabled.
  
 
=== Write Values ===
 
=== Write Values ===
* [00h - FFh]: The new page to swap in to the memory range 4000h through 7FFFh
+
* Bit 0: Set to generate an interrupt when link assist receives a byte. (Link assist must be enabled)
 +
* Bit 1: Set to generate an interrupt when link assist has finished sending a byte. (Link assist must be enabled)
 +
* Bit 2: Set to generate an interrupt when an error occurs. (Link assist must be enabled)
 +
* Bit 6: Set to DISABLE two-second timeout in link assist
 +
* Bit 7: 1 to disable the link assist.
  
''Note: if you would have bitwise flags for your port, label them "bit X".''
 
  
 
== Comments ==
 
== Comments ==
The behavior of this port changes in different memory map modes.
+
This port only exists on the 83+ SE and the 84+.
 +
 
 +
Programs which directly control the link port should disable the hardware assist.
 +
 
 +
The timeout for the link assist is ~2 seconds.
 +
 
 +
 
 +
===Interrupts===
 +
Link Assist hardware can generate an interrupt when a byte is received, when a byte can be sent or when an error in transmission occurs.
 +
 
 +
 
 +
To enable an interrupt when a byte is received write 01 to port 08. When a byte received and an interrupt is generated bit 0 of port 9 is set. Like all interrupts this one needs to be acknowledged, do this by reading the byte from port 0A.
 +
 
 +
 
 +
To enable an interrupt when a byte can be sent write 2 to port 08. When the the link assist is not busy it will generate an interrupt so you can send data. Bit 1 of port 9 is set when this interrupt generates. You acknowledge this interrupt by writing to port 0D.
 +
 
 +
 
 +
To enable an interrupt when an error occurs have bit 2 set when you write to port 08. It is not necessary to have the the other link assist interrupts enabled but you can. When this interrupt generates bit 2 of port 9 is set, and it is acknowledged by reading port 9.
 +
 
  
== Example ==
+
The biggest benefit from the link assist interrupts is that no time must wasted waiting, it could take millisecond to send or receive a byte. With interrupts that time can be put to more useful code. I don't believe that you should have both the send and receive interrupts enabled at the same. But really communication would dictate who is sending and receiving. Remember that TI-OS does not seem to handle these interrupts, disable them when you're through.
NaodW29-nowiki4ba326a46ee8fcd600000002
+
  
 
== Credits and Contributions ==
 
== Credits and Contributions ==
* '''/dev/urandom:''' Because of your randomness, this project is possible.
+
* '''Michael Vincent:''' Original documentation of the link assist
 +
* '''James Montelongo:''' Interrupt information

Latest revision as of 16:02, 3 March 2020

Synopsis

Port Number: 08h

Function: Link Assist Enable

This port controls whether the hardware link assist is enabled. It also controls what interrupts the link assist will generate.

Read Values

  • Bit 0: 1 if link assist will generate an interrupt when a byte is received. (Link assist must be enabled)
  • Bit 1: 1 if link assist will generate an interrupt when a byte has been sent. (Link assist must be enabled)
  • Bit 2: 1 if link assist will generate an interrupt when an error has occurred. (Link assist must be enabled)
  • Bit 6: 1 if two-second timeout is disabled
  • Bit 7: 1 if the link assist is disabled.

Write Values

  • Bit 0: Set to generate an interrupt when link assist receives a byte. (Link assist must be enabled)
  • Bit 1: Set to generate an interrupt when link assist has finished sending a byte. (Link assist must be enabled)
  • Bit 2: Set to generate an interrupt when an error occurs. (Link assist must be enabled)
  • Bit 6: Set to DISABLE two-second timeout in link assist
  • Bit 7: 1 to disable the link assist.


Comments

This port only exists on the 83+ SE and the 84+.

Programs which directly control the link port should disable the hardware assist.

The timeout for the link assist is ~2 seconds.


Interrupts

Link Assist hardware can generate an interrupt when a byte is received, when a byte can be sent or when an error in transmission occurs.


To enable an interrupt when a byte is received write 01 to port 08. When a byte received and an interrupt is generated bit 0 of port 9 is set. Like all interrupts this one needs to be acknowledged, do this by reading the byte from port 0A.


To enable an interrupt when a byte can be sent write 2 to port 08. When the the link assist is not busy it will generate an interrupt so you can send data. Bit 1 of port 9 is set when this interrupt generates. You acknowledge this interrupt by writing to port 0D.


To enable an interrupt when an error occurs have bit 2 set when you write to port 08. It is not necessary to have the the other link assist interrupts enabled but you can. When this interrupt generates bit 2 of port 9 is set, and it is acknowledged by reading port 9.


The biggest benefit from the link assist interrupts is that no time must wasted waiting, it could take millisecond to send or receive a byte. With interrupts that time can be put to more useful code. I don't believe that you should have both the send and receive interrupts enabled at the same. But really communication would dictate who is sending and receiving. Remember that TI-OS does not seem to handle these interrupts, disable them when you're through.

Credits and Contributions

  • Michael Vincent: Original documentation of the link assist
  • James Montelongo: Interrupt information