Data Sheet

Ether I/O 24R Users Manual V1.1
Elexol Pty Ltd Version 1.1 Page 29 http://www.elexol.com
ELEXOL
ELECTRONIC SOL UT IONS
Command Set (continued)
Write Disable EEPROM
ASCII Code Bytes Data Function
‘0 5 NU NU NU The EEPROM memory is Write Disabled
Operation: The module will Write Disable the EEPROM memory preventing any Write or Erase
Operations.
Special Conditions: All EEPROM functions must be sent as a single 5-byte packet. A Write Enable
command must be sent before any Write or Erase commands can be performed.
The user cannot write addresses 0-4 at any time. The EEPROM cannot be written
or erased if the J2 jumper is on.
Example: Winsock1.SendData “’0” + Chr$(0) + Chr$(0) + Chr$(0)
Enable SPI Mode PORT A
Command
Sent
ASCII
Code
Bytes Data Function
Sets up Port A for SPI, sets bits 0-2 to appropriate
directions for SPI, stores port value and direction registers
S1A 3 -
Command
Reply
ASCII
Code
Bytes Data
S1A 3 -
Operation: Sets up PORTA for SPI mode, it will set the direction register bits 0-2 for the appropriate
setting, it also stores the Port Value and direction register of the port before setting up SPI
Example: Winsock1.SendData “S1A”
Disable SPI Mode PORT A
Command
Sent
ASCII
Code
Bytes Data Function
Disables SPI on Port A, and restores port value and
direction registers that were before an enable SPI
S0A 3 -
Command
Reply
ASCII
Code
Bytes Data
S0A 3 -
Operation: Disables SPI on PORT A. Restores direction register and port values before SPI was
enabled.
.
Example: Winsock1.SendData “S0A”
Send SPI Data on PORT A
Command
Sent
ASCII
Code
Bytes Data Function
Sends out SPI data on PORT A. The number of data bytes
is sent out first followed by the data. The return data will
automatically be clocked in and sent back in the command
reply.
SA 2 + #data bytes +
data
data
Command
Reply
ASCII
Code
Bytes Data
SA 2 + #data bytes +
data
Return
data
Operation: Sends out SPI data on PORTA. The command consists of SA which tells the firmware that
SPI data will be sent on PORTA, then the number of data bytes to be sent out followed by
the data bytes. Below are some examples of the commands
Example: Winsock1.SendData “SA” + Chr$(&H2) + Chr$(&HAA) + Chr$(&H55)
Where Chr$(&H2) is the number of data bytes to be sent via SPI and Chr$(&HAA) and
Chr$(&H55) are the data bytes sent.