If you want to run the example software you will need:
2. Windows 3.x, 95 or PC/MS-DOS 5.0 or later disk operating
3. Input Transducer: Sensor or Signal source or laboratory test signal generator
For advanced use of this and other SiliconSoft Digital Sampling Systems, programmer support for Window DLLs, C, C++, OS/2 and DOS is available.
Making a Copies of the Program Diskettes
The SiliconSoft PicDongle Digital Sampling example software is not copy-protected, so you can make backup or archive copies.
While you are in Windows, change to the drive that contains the SiliconSoft Digital Sampling diskette. If you are using the Program Manager, select File Menu and choose Run. Then type (for example if diskette is in drive A):
and press Enter.
Follow the instruction displayed on the screen.
Connect the COM port cable to the PicDongle (refer to the labels on the PicDongle casing). To verify operation, start the example windows program and select the COM port you are using. While recording, touch pin 1 with a metal object. You should see the channel 1 indicator pick up a 60 Hz signal.
To make a connection to the PicDongle be sure to read the bottom label and note the signal and ground pin numbers. Solder your wires to a DB25 receptical connector (pin 1 is channel 1, pin 2 is channel 2, etc., and pin 14 is ground). If the COM port is reset, the PicDongle's LED should be lit when the PC is on.
1. Plug the PicDongle 12A digital sampling hardware directly into the desired serial port.
2. Turn on the power to your PC and any attached peripherals.
3. Start the example software or other COM or TERMINAL software and configure the hardware setup to 8 bits, No parity, 1 Stop bit at a 19,200 bps.
When you select the port to which the PicDongle is connected and select Connect in the Dialog Box, you should see the data stream start. Normally the power required to operation the PicDongle is obtained from the RS232-E serial port. Some laptop or palmtop PC's may not have a standard power serial port and the PicDongle will not operate correctly. The LED should be lit on the PicDongle after it has been connected to a COM that has been reset (normally it's reset upon bootup) and it will stay on unless you toggle DTR 'high'.
The TTY Windows C sample program and source code is for use with Microsoft Visual C environment. This sample program demonstrates how to receive data from the PICDongle12A hardware using the COMM API. This program will accept data through the COM port from the PICDongle12A module.
Install the PicDongle 12A by attaching it to any unused Serial port on you computer as covered in the previous pages. Run the TTY.exe sample program in Windows 3.1 or Windows 95. A window will be displayed with a menu bar with "Action", "Settings", and "About" menu items.
1) Click on the Setting menu item to display the settings dialog box. Select the COM port of where the PicDongle 12A is attached. Check to make sure that the other settings are set as follows:
Baud Rate: 19.2k Data Bits: 8 Parity: None Stop Bits: 1 Flow Control: None (all boxes are NOT checked). Also check the "Use CN_RECEIVE Notifications" box. Then press the OK button to save settings and remove dialog box.
2) Click on the "Actions" pulldown menu item. Then click on the "Connect" item to start receiving data from the PicDongle 12A hardware. Click on the "Disconnect" item in the "Actions" pull down menu to stop receiving data.
3) The data from the PicDongle 12A will be displayed in the TTY.exe Window in HEX format. The frame markers are also displayed.
Example of output:
FFFF 0109 0108 0107 0106 0105 0104 0103 0102 FFFF 0101 0102 ...
FFFF xxyy xxyy xxyy xxyy xxyy xxyy xxyy xxyy FFFF ... LoHi LoHi LoHi LoHi LoHi LoHi LoHi LoHi Frame ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 Frame ch1
The data stream from the PicDongle is continuous after power is applied by attaching the PicDongle to a COM port. There is a frame marker sent once every 8 channel samples or 16 bytes. The frame marker is 2 bytes of 0xFFFF at the start of each block of 8 samples (16 bytes) of sampled data.
After the 2 bytes of 0xFF (frame marker: 0xFFFF), the sampled data is received in the PC as LowByte first then HiByte follows.
For example, if the data stream looks like:
FF FF 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 FF FF ... Frame Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Lo Hi Frame ...
One sample for each of the 8 channels are transmitted between the frame markers, from channel 1 through channel 8.
For example, if the samples are:
FFFF 0109 0FFF 0000 0106 0105 0104 00FF 0102 FFFF 0101 0102 ... ch1 ch2 ch3 ch4 ch5 ch6 ch7 ch8 ch1 ch2 ...
sample value for channel 1 is 0x0109 decimal value 265 mV
sample value for channel 2 is 0x0FFF decimal value 4095 mV (full scale)
sample value for channel 3 is 0x0000 decimal value 0 mV (zero)
sample value for channel 7 is 0x0800 decimal value 2048 mV (half scale)
sample value for channel 8 is 0x0BB8 decimal value 3000 mV
Since the sampled data is 12-bits, the upper nibble of the HiByte will always be 0 unless it is a frame marker. The sample program prints out the sampled data to the screen in HEX 16-bit values.
See the WriteTTYBlock function (in the sample file) for an example of how to check for frame markers and how to put the data stream byte values into 12-bit samples.
The host computer's UART baud rate must be set to 19,200 so that it matches the fixed baud rate of the PicDongle 12A. Other settings are: 8 bits, 1 stop bit, no parity, no flow control.
These lines carry the data to and from the PicDongle; 1 is transmitted as 'mark' (what is called 'low' or -3 to -15 Volts ) and 0 is transmitted as 'space' ('high' or +3 to +15 Volts).
Is used by the PC (IBM, Mac, Sun or other RS232-E COM Port Card) and the modem/printer or PicDongle referred to as the data set, or DCE to start/stop the communications from the PicDongle. An RTS low stops the data stream. The PC sets RTS to 'high' ( logic 0) and the PicDongle data stream restarts.
Increasing the Sample Rate:
Although the PicDongle 12A's sample rate is fixed at 55.5 samples/sec
for 8 channels you can increase the sample rate or bandwidth by tying
channels together since each channel has a separate time slot:
Channel Jumpers Effective Sample Rate (s/s) Bandwidth (Hz) 8 none 55.5 27.8 4 1-5,2-6,3-7,4-8 111.1 55.5 2 1-3-5-7,2-4-6-8 222.2 111.1 1 1-2-3-4-5-6-7-8 444.4 222.2
Troubleshooting - Errors:
A common problem with using the COM port is lost data or framing errors.
If the host computer' CPU is not able to handle the COM port UART
handshaking and move data from the COM buffer to RAM fast enough a
COM error will occur. Try to give as much time as possible to service
of the COM port and use a UART with a FIFO buffer.
If you are having trouble connecting the PicDongle, this may help.
Contact: SiliconSoft Inc. www.siliconsoft.com San Jose, CA USA Support Lines: Email: email@example.com Phone: (408)446-4521
© Copyright 2000 by SiliconSoft Inc., San Jose, CA.