Lantronix MatchPort b/g MatchPort b/g - User Guide - Page 80
Example 2: PC sends command 1Bh to change the current states of GPIO 0, and 1 assuming they are
View all Lantronix MatchPort b/g manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 80 highlights
7: Configurable Pins Example 2: PC sends command 1Bh to change the current states of GPIO 0 and 1 (assuming they are configured as outputs). PC -> MatchPort: 1Bh, 03h, 00h, 00h, 00h, 01h, 00h, 00h, 00h MatchPort -> PC: 1Bh, 01h, 00h, 00h, 00h Command details: 1Bh = command 1Bh 03h, 00h, 00h, 00h = the mask that determines which GPIOs will be changed bit 0 and 1 are 1 → GPIO0 and GPIO1 will be changed 01h, 00h, 00h, 00h = the new states bit 0 is 1 → GPIO0 will become 1 bit 1 is 0 → GPIO1 will become 0 Response details: 1Bh = response to command 1Bh 01h, 00h, 00h, 00h = bit 0 is 1 → GPIO0 = 1 bit 1 is 0 → GPIO1 = 0 MatchPort User Guide 80
7: Configurable Pins
Example 2: PC sends command 1Bh to change the current states of GPIO 0
and 1 (assuming they are configured as outputs).
PC -> MatchPort: 1Bh, 03h, 00h, 00h, 00h, 01h, 00h, 00h, 00h
MatchPort -> PC: 1Bh, 01h, 00h, 00h, 00h
Command details:
1Bh = command 1Bh
03h, 00h, 00h, 00h = the mask that determines which GPIOs will be changed
bit 0 and 1 are 1
→
GPIO0 and GPIO1 will be changed
01h, 00h, 00h, 00h = the new states
bit 0 is 1
→
GPIO0 will become 1
bit 1 is 0
→
GPIO1 will become 0
Response details:
1Bh = response to command 1Bh
01h, 00h, 00h, 00h
=
bit 0 is 1
→
GPIO0 = 1
bit 1 is 0
→
GPIO1 = 0
MatchPort User Guide
80