Computer Science Project



Develop the Software

The first tests with the ADC were performed with the software supplied by the manufacturer. The second tests were performed in Turbo Pascal for windows, but the DLL(*) file  supplied by the manufacturer only works for 32 bit and could not get a reading of the converter.

Fig.1 Test in Pascal

Fig.2    32 bit error

The next option was Visual Basic (a problem, because my experience with VB is very lower, but we see…). VB work with the Windows DLLs and the driver(*) PICO.SYS supplied by the manufacturer. PICO.SYS is the Windows parallel port driver and need to be installed in Windows. The operating system must be told that the driver is available and the Windows 32-bit driver is accessed using the DLL file ADC1032.DLL.

Driver, DLL and Procedures

The normal sequence to collect a block of data from the ADC is as follows:

1. Check that the driver version is correct. The procedure that check the driver is: adc10_get_driver_version 

2. Open the driver.The procedure that open the driver is: adc10_get_driver_version

3. Set sampling mode (channels and time per sample).

4. While you want to take measurements.
5. Run-
adc10_run                                   6. While not ready
7. Wait
8. End while
9. Get a block of data
10. End while
11. Close the driver

The  ADC have more procedures, will be explained in the next pages of the project.


(*) DLL Dynamic-link library
     What is a DLL ?

     What is a DRIVER ?




Searching & Reading

Write a program in VB was the principal objective of searching and reading. After a few hours of learning and testing, the first program have captured some data from the ADC.


 Fig.3 Form project


 Fig.4 First data captured



References:   Visual Basic  - Nuno Nina - FCA

JM Freixo Nunes © 2009