Online Development Notebook > Index > ODN > Raw Device Programming > 01 - WriteACmd

Command #01 - WriteACmd


Description:

Write a byte value to port A. The possible values range from 0-255 (00h to FFh).

Command Format:

Byte Number Description
0 01h: WriteACmd
1 Byte Data - This byte is written to port A, D0 - D7
The most significant bit of the byte value is written to D7
2 <not used>
3 <not used>
4 <not used>
5 <not used>
6 <not used>
7 <not used>

Command Format Details:

Byte 0 contains the command. Byte 1 contains the data to write to port A. Byte 2 through byte 7 are unused.

Response Format:

Byte Number Description
0 01h: WriteACmd
1 <not used>
2 <not used>
3 <not used>
4 <not used>
5 <not used>
6 <not used>
7 <not used>

Response Format Details:

Byte 0 contains the command. Byte 1 through byte 7 are unused.

Example Usage:

Writing a E7h to port A with the command 01-E7-00-00-00-00-00-00 will set A.7, A.6, A.5, A.2, A.1, and A.0 high and will set lines A.4 and A.3 low, assuming that they are configured as outputs.


Hardware:  U401 USB Interface    U421 USB Interface
Programming:  USBm DLL Programming    Download Files
Application Notes:  U4x1 Application Notes    Misc Applications and Information    FAQ