PRT232 Pulse Counter/Digital interface card
User Manual

Rev C. 2/2008

Introduction
Your PRT232 digital interface is a versatile module for interfacing the computer to the real world. It features a high-speed count input for reading devices such as flowmeters or turnstiles and measuring RPM of rotating mechanisms. It also monitors three digital inputs making it simple to read switches and pushbuttons and the eight power outputs will control relays, solenoid valves or small DC motors.

Communications

The PRT232 uses a simple text interface. Each command is terminated with a Carriage Return (ASCII 13) which is shown as '\n' in the text following. Responses are sent in plain text making for easy communication with a terminal such as Hyperterm. The text-based communication method also means that software control is simplified as there are no complex multilayer protocols to be decoded.

Settings	Serial settings are 19,200 bps, 8-bit word, No Parity, One Stop bit (8N1)
		Flow Control is not used, so if you are using a program such as Hyperterm, be sure to
		disable it to prevent communication errors.

		At power-on, the PRT232 sends the string "DIO2\r\n" where '\r' is a Carriage Return 			(ASCII13) and '\n' is a Line Feed (ASCII 10). We suggest that your first command be a 			plain Line Feed	(\n) as this will clear the command input buffer of any spurious characters 		that may have been created on the communication line from power up.

Operation:	Read count. This returns the current value of the count accumulated from the Sensor 			terminal.
Command	c\r
Return value	0 - 4,294,967,296 (32bits unsigned)

Operation:	Read pulse interval. This returns the period between pulses and can be used to measure 			RPM (revolutions per minute) or pulse rate. Period is stated in microseconds.
Command	p\r
Return value	0 - 32767

Operation:	Clear count. This resets the count to zero.
Command	z\r
Return value	None

Operation:	Read digital input. Returns the state of the Switch Inputs S1, S2 & S3..
Command	s\r
Return value	"xxx"  where x is '1' or '0' representing the switch status in order. i.e., first x is S1, second 		is S2 and third is S3. A '1' indicates the switch is activated, a '0' deactivated. 
		The state with no switches connected is '000'

Operation:	Set output value. Activates/deactivates the digital Power Outputs at terminal J7.
Command	o<N>\r
		The argument '<N>' is a binary representation of the desired state and is calculated by
		combining the ON values for all inputs.

		Output			Value
		0			1
		1			2
		2			4
		3			8
		4			16
		5			32
		6			64
		7			128

		To turn all outputs OFF, set N to 0. 
		To turn on, e.g., outputs 1,2 & 5, set <N>= 2 + 4 + 32 (38) send the command
		o38\r	
Return value	None

Connections

J1:		Sensor. Pulses at this input will be counted and accumulated. Please observe correct 			signal polarity(1).
J2:		RS-232 serial communication to PC.
J3:		Power. Please observe correct signal polarity(1).
J4:		Switch inputs/Digital inputs. Notice that the right side pins on each input are Ground (-).
		For connecting switches, polarity is unimportant, but you must observe proper polarity
		when connecting to an external active digital source.
J7:		Power outputs. Pin 1 is +12V, pin 2 is Ground.
		Outputs 0-7 are on pins 3-10. The row nearest the edge is odd-numbered, and
		the inner row is even numbered.
		These are "low-side" switches, meaning that the load must be connected between an 			output pin (3-10) and +12V (pin 1) i.e., pin 1 is Common for all outputs

Note (1)		Color-coded cables are available for these inputs from Cedar Lake Instruments. 			Please refer to our website at www.cedarlakeinstruments.com/products to order.

Specifications
Power	requirements			7 - 20 VDC @ 30mA (all outputs OFF)
Pulse rate				1,000 pulses/second
Pulse input configuration		Open-collector (820 ohm pullup to +5V)
Digital inputs				0/5V CMOS
Power outputs				350mA per output open-collector low side switching.