Tableau de clic ADAC
Tableau de clic ADAC
L' ADAC Click Board™ est un ADC, DAC et GPIO 12 bits à 8 canaux. L'ADAC Click Board™ communique avec le microcontrôleur cible via l'interface I2C, avec des fonctionnalités supplémentaires fournies par la broche RST sur la ligne MikroBUS.
L' ADAC Click Board™ est conçu pour fonctionner sur une alimentation 3,3 V ou 5 V.
The ADAC Click Board™ is an 8-channel 12-bit ADC, DAC and GPIO. It carries the AD5593R configurable ADC/DAC, from Analog Devices. The click is designed to run on either 3.3V or 5V power supply. The ADAC Click Board™ communicates with the target microcontroller over I2C interface, with additional functionality provided by the RST pin on the mikroBUS™ line.
How Does The ADAC Click Board™ Work?
Every channel can be set individually as ADC, DAC, or GPIO. The 12-bit conversion values are readable through I2C.
For resetting the IC, use the Reset pin (RST).
AD5593R IC FEATURES
The AD5593R has eight input/output (I/O) pins, which can be independently configured as digital-to-analog converter (DAC) outputs, analog-to-digital converter (ADC) inputs, digital outputs, or digital inputs. When an I/O pin is configured as an analog output, it is driven by a 12-bit DAC. The output range of the DAC is 0 V to VREF or 0 V to 2×V REF.
When an I/O pin is configured as an analog input, it is connected to a 12-bit ADC via an analog multiplexer. The input range of the ADC is 0 V to VREF or 0 V to 2 × VREF. The I/O pins can also be configured to be general-purpose, digital input or output (GPIO) pins.
SPECIFICATIONS
Type | ADC-DAC |
Applications | control and monitoring, measurement, etc. |
On-board modules | AD5593R 8-Channel, 12-Bit, Configurable ADC/DAC |
Key Features | 8 12-bit DAC channels, 8 12-bit ADC channels |
Interface | GPIO,I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
KEY FEATURES
- AD5593R configurable ADC/DAC
- 8 12-bit DAC channels
- 8 12-bit ADC channels
- 8 general-purpose I/O pins
- I2C interface
- 3.3V or 5V power supply
PINOUT DIAGRAM
This table shows how the pinout on the ADAC Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Active low IC reset | RST | 2 | RST | INT | 15 | NC | |
NC | 3 | CS | TX | 14 | NC | ||
NC | 4 | SCK | RX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C serial clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C serial data | |
Power supply | +3.3V | 7 | 3.3V | 5V | 10 | +5V | Power supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ADDITIONAL PINS
Name | I/O | Description |
---|---|---|
IO0 | Multipurpouse IO pin(ADC,DAC,GPIO)channel0 | |
IO1 | Multipurpouse IO pin(ADC,DAC,GPIO)channel1 | |
IO2 | Multipurpouse IO pin(ADC,DAC,GPIO)channel2 | |
IO3 | Multipurpouse IO pin(ADC,DAC,GPIO)channel3 | |
IO4 | Multipurpouse IO pin(ADC,DAC,GPIO)channel4 | |
IO5 | Multipurpouse IO pin(ADC,DAC,GPIO)channel5 | |
IO6 | Multipurpouse IO pin(ADC,DAC,GPIO)channel6 | |
IO7 | Multipurpouse IO pin(ADC,DAC,GPIO)channel7 | |
VREF | OPTIONAL | Used as input for connecting external VREF or output 2.5V from internal |
GND | OPTIONAL | Used for external connection to GND if VREF input is used |
JUMPERS AND SETTINGS
Designator | Name | Default Position | Default Option | Description |
---|---|---|---|---|
ADD SEL | Address bit | 0 | 3V3 | I2C slave address selection, set LSB of slave address 0010001x left pos, 0010000x right pos, (x=R/W) |
VCC SEL | Power supply | 3V3 | Supply Voltage Selection 3V3/5V, left position 3v3, right position 5v | |
LOG SEL | Interface power supply | 3V3 | Logic Level Voltage Selection 3V3/5V, left position 3v3, right position 5v |
Software Support
Code examples for the ADAC Click Board™, written for MikroElektronika hardware and compilers are available on Libstock.
Example Description
The following code snippet demonstrates the use of the ADAC Click Board™ library functions. It will first set a pin as an analog output, showing DAC function, and will then set a different pin as an analog input, showing ADC operation.
01 UART1_Write_Text ("rnrnStarting DAC Operation..."); 02 Delay_ms (1000); 03 //Sets the IO3 pin as DAC 04 ADAC_setConfiguration (_ADAC_DAC_CONFIG, _ADAC_NULL, _ADAC_IO3); 05 //Rises the DAC output on IO3 from 0 to VREF 06 for (i = 0; i < 0xFFF; i+=4) 07 { 08 ADAC_writeDAC (_ADAC_DAC_WRITE | _ADAC_PB_PIN3, i/0x100, i%0x100); 09 Delay_ms (10); 10 } 11 UART1_Write_Text ("rnDAC Operation finishedrn"); 12 Delay_ms (1000); 13 14 15 UART1_Write_Text ("rnStarting ADC Operation..."); 16 Delay_ms (1000); 17 //Sets the IO4 pin as ADC 18 ADAC_setConfiguration (_ADAC_ADC_CONFIG, _ADAC_NULL, _ADAC_IO4); 19 //Sets the ADC sequence repetition to enabled, and adds IO4 to sequence 20 ADAC_setConfiguration (_ADAC_ADC_SEQUENCE, _ADAC_SEQUENCE_ON, _ADAC_IO4); 21 //Reads the ADC input, and writes it to UART1 22 for (i = 0; i < 8; i++) 23 { 24 ADCValue = ADAC_readADC ( _ADAC_ADC_READ, &channel ); 25 ShortToStr (channel, uartText); 26 UART1_Write_Text ("rnRead value from channel"); 27 UART1_Write_Text (uartText); 28 29 30 IntToStr (ADCValue, uartText); 31 UART1_Write_Text (": "); 32 UART1_Write_Text (uartText); 33 Delay_ms (2000); 34 } 35 36 UART1_Write_Text ("rnADC Operation finished"); 37 Delay_ms (1000);
Software Support
Code examples for the ADAC Click Board™, written for MikroElektronika hardware and compilers are available on Libstock.
Example Description
The following code snippet demonstrates the use of the ADAC Click Board™ library functions. It will first set a pin as an analog output, showing DAC function, and will then set a different pin as an analog input, showing ADC operation.
01 UART1_Write_Text ("rnrnStarting DAC Operation..."); 02 Delay_ms (1000); 03 //Sets the IO3 pin as DAC 04 ADAC_setConfiguration (_ADAC_DAC_CONFIG, _ADAC_NULL, _ADAC_IO3); 05 //Rises the DAC output on IO3 from 0 to VREF 06 for (i = 0; i < 0xFFF; i+=4) 07 { 08 ADAC_writeDAC (_ADAC_DAC_WRITE | _ADAC_PB_PIN3, i/0x100, i%0x100); 09 Delay_ms (10); 10 } 11 UART1_Write_Text ("rnDAC Operation finishedrn"); 12 Delay_ms (1000); 13 14 15 UART1_Write_Text ("rnStarting ADC Operation..."); 16 Delay_ms (1000); 17 //Sets the IO4 pin as ADC 18 ADAC_setConfiguration (_ADAC_ADC_CONFIG, _ADAC_NULL, _ADAC_IO4); 19 //Sets the ADC sequence repetition to enabled, and adds IO4 to sequence 20 ADAC_setConfiguration (_ADAC_ADC_SEQUENCE, _ADAC_SEQUENCE_ON, _ADAC_IO4); 21 //Reads the ADC input, and writes it to UART1 22 for (i = 0; i < 8; i++) 23 { 24 ADCValue = ADAC_readADC ( _ADAC_ADC_READ, &channel ); 25 ShortToStr (channel, uartText); 26 UART1_Write_Text ("rnRead value from channel"); 27 UART1_Write_Text (uartText); 28 29 30 IntToStr (ADCValue, uartText); 31 UART1_Write_Text (": "); 32 UART1_Write_Text (uartText); 33 Delay_ms (2000); 34 } 35 36 UART1_Write_Text ("rnADC Operation finished"); 37 Delay_ms (1000);
Tableau de clic ADAC
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.