TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139252 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57122 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28078 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

ADC 6 click

Rating:

5

Author: MIKROE

Last Updated: 2018-02-27

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: ADC

Downloaded: 5917 times

Not followed.

License: MIT license  

ADC 6 click is an advanced 24bit multichannel analog to digital converter (ADC), with 8 fully differential or 15 single ended/pseudo differential sampling inputs, and very flexible routing capabilities.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ADC 6 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ADC 6 click" changes.

Do you want to report abuse regarding "ADC 6 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

ADC 6 click

ADC 6 click

Native view of the ADC 6 click board.

View full image
ADC 6 click

ADC 6 click

Front and back view of the ADC 6 click board.

View full image

Library Description

Initializes and defines SPI bus driver and driver functions witch offer a choice to convert analog input voltage to 24-bit digital output value. Functions also offer a choice to choose witch channels we want use for positive and negative analog input by writting in configurations registers. Functions can read converted data in two modes, single read, where we must be sure that converting is done, or continuous read mode, where we only continuously read converted data without writting anything on SPI, not even an data register address. Library also defines commands witch help us to configure registers. Check documentation for more details.

Key functions :

void adc6_writeReg( const uint8_t register_address, const uint32_t transfer_data ) - Function writes data to determined register.

uint32_t adc6_readReg( const uint8_t register_address ) - Function reads data from determined register.

uint32_t adc6_continuousReadData( void ) - Function continuously reads data from Data register without writting anything on SPI.

uint32_t adc6_getADCData( const uint8_t mode ) - Function gets data from Data register in two possible modes. In single read mode first checks ready bit, and when conversion is done (data is ready) reads data from register. In continuous read mode only reads data without writting anything on SPI bus.

Examples Description

The application is composed of three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes SPI bus driver and sets configuration witch enables channel 0, puts AIN0 on positive analog input and AIN1 on negative analog input, enables internal reference voltage (approximately 2.65V (AVDD = 3.3V)), and also enables bipolar operation mode and puts device on full power mode. When the ADC is configured for unipolar operation, the output code is natural (straight) binary with a zero differential input voltage resulting in a code of 0x00000000, a midscale voltage resulting in a code of 0x00800000, and a full-scale input voltage resulting in a code of 0x00FFFFFF. When the ADC is configured for bipolar operation, the output code is offset binary with a negative full-scale voltage resulting in a code of 0x00000000, a zero differential input voltage resulting in a code of 0x00800000, and a positive full-scale input voltage resulting in a code of 0x00FFFFFF.
  • Application Task - (code snippet) - Gets 24-bit converted data in single read mode and logs data on USB UART. Repeats operation every 500 ms.
void applicationTask()
{
 adc_value = adc6_getADCData( _ADC6_SINGLE_GET_DATA_MODE );
 LongWordToStr( adc_value, text );
 if ( tmp )
 {
 mikrobus_logWrite( "** The ADC value is: **", _LOG_LINE );
 tmp = 0;
 }
 mikrobus_logWrite( text, _LOG_LINE );

 Delay_ms( 500 );
}

Other mikroE Libraries used in the example:

  • Conversions
  • SPI
  • UART

Additional notes and information

Depending on the development board you are using, you may need USB UART click,  USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Heart Rate 9 click

5

The Heart Rate 9 click is a Click boardâ„¢ which features PIC16F1779 8-bit MCU and SFH 7060 heart rate and pulse oximetry monitoring sensor. This Click boar employs a very sensitive analog front-end IC with high dynamic range, which ensures accurate and reliable readings.

[Learn More]

ECG 3 click

6

ECG 3 click is a complete solution for the development of ECG applications, which utilizes a specialized clinical-grade biopotential analog front-end (AFE) IC. ECG 3 click is an ideal solution for the development of heart rate monitoring applications, fitness applications, for the ECG bio-authentication, and similar applications.

[Learn More]

Hall Current 7 Click

0

Hall Current 7 Click is a compact add-on board that provides economical and precise solutions for AC or DC current sensing. This board features the ACS770, a thermally enhanced, fully integrated, Hall effect-based high precision linear current sensor with 100µΩ current conductor from Allegro MicroSystems. Applied current flows directly into the integrated conductor generating a magnetic field, and an integrated low-hysteresis core concentrates the magnetic field sensed by the Hall element with a typical accuracy of ±1% and 120 kHz bandwidth.

[Learn More]