Serial Wombat
a general-purpose digital interface device for hobbyists, engineers and students

 


Home
Overview
Protocol
Documentation
Channel Modes
Direct Control
Controlled Pin
Raw A/D
A/D Averaging
A/D 1st Order Filtering
Matrix Keypad
Servo Control
Analog Direct
Analog Follow
Rotary Encoder
Debouncing
Counter
Hysteresis
Morse Code
Pulse
Unipolar Stepper
LCD Driver 1
LCD Driver 2
HW Pulse Meas.
2D Lookup
SPI Master
HD44780 Generic
Remote Control
DataLogger
Min-Max
Public Data
Timed IO
Getting Started
Connectivity
Pin Mode SDK Beta
Sample Projects
Downloads
Contact Us
Purchase
Forum

Did you know...

 

Direct Host Control

This is the simplest of the channel modes, designed to allow the host to directly control the state (input, high or low) of any of the Serial Wombat's digital pins. In default mode an 18F4620 based Wombat has 29 pins configured for digital I/O. Direct controlled mode is the default mode for all non-analog pins coming out of powerup. The CHANNEL_MODE_DIRECT mode is the result of an IMMEDIATE_CONFIGURE command or can be the result of a SET_CHANNEL_MODE command. When invoking this mode the host commands the Wombat to make the channel an input or a high or low output. This change happens when the message is received. The channel does not have to be serviced by the executive to change the state of its pin. When the executive services a channel in CHANNEL_MODE_DIRECT mode the buffer value of the channel is updated to 1 or 0 based on the measured or set value of the pin.
To configure a channel to CHANNEL_MODE_DIRECT, send the following set of 8 bytes:

Byte # Byte Value Description
0 200 Configure pin
1 pin# Physical Pin number
2 0 Channel mode = CHANNEL_MODE_DIRECT
3 Pin State 0 for output low, 1 for output high, 2 for input
4 unused  
5 unused  
6 unused  
7 unused  


For example, to configure pin 20 to an output high, the following command would be sent:
200 20 0 1 0x55 0x55 0x55 0x55

Return packet is an echo of the sent packet.

 

 

Copyright Wombat Interface Products, 2005-2008. All Rights Reserved.