HOME

PROJECTS

TUTORIALS

C FUNCTIONS

PROGRAMS

PRODUCTS

VIDEOS

COMPANY

SPANISH

                 

Bolt 18F2550 system 10 bits A/D converters:

 

 

 

 

Description: the image on the left shows the basic operation of the A/D. The analog sensor-transmitter converts the level signal and generates a voltage between 0 and 5 volts. This analog signal enters the 10-bit converter. The conversion result is given in a decimal value between 0 and 1023 units.
Using the 18F2550 Bolt system, which has up to 10 channels of A/D 10-bit resolution, a simple interface is built to generate a voltage of 0...5 volts through a precision potentiometer with 25 turns. This voltage enters Bolt system auxiliary port (pin 2) and later to pin RA5 (Channel 4) of 18F2550 microcontroller.
Using special C18 library functions for the A/D converter, the program performs the conversion every half second to a decimal value between 0...1023, which is finally displayed on the LCD.

 

 

To perform the test program, an emulation of the sensor-transmitter was done, connecting a 10K potentiometer, 25 turns, to the input (pin 2) of the auxiliary port and later the RA5 pin (which corresponds to channel 4 A/D converter) of 18F2550. Turning the potentiometer, we can modify the output voltage between 0-5 volts. Use as a reference for connections, the following diagram: Ports and connectors 18F2550 Bolt.
In the table shown below the test programs are provided for this project, using functions in C18, library ADC-BOLT.h

 

 

A test program was developed, provided in the table below. Through the precision potentiometer, you can control the generated voltage from 0 to 5 volts and therefore all the decimal values ​​range from 0 to 1023.
If you want to convert the value displayed on the LCD to engineering units, you can easily multiply the decimal value by a constant.
Download here the C18 library specialized for the management of the A/D 18F2550 Bolt System:

ADC-BOLT.h

This library handles, initializes and reads the A/D, channel 4, of 18F2550 microcontroller. However, it can be easily modified for any other channel.

 

TEST PROGRAM

DESCRIPTION

C18-BOLT-A-D-CONVERTER.c Application using library  ADC-BOLT.h
C18-BOLT-A-D-CONVERTER.hex