Using the AD (Analog to Digital)

Return to Introduction  Previous page  Next page

 

 

warning1

VERY IMPORTANT

Analog inputs of LadderDIP are directly connected to the on-board NXP microcontroller. Input voltage for these signals MUST NOT exceed the range 0 - 3.0V

 

Refer to this table: DC/AC Parameters and absolute max ratings

 

 

There are six on-board A/D (Analog to Digital Converter) available on LadderDIP. These resources are accessible, in the Ladder diagram, using the AD_CONV function block.

 

This block has un unique output pin that gives the value of the converted analog input. The output value can span from 0 to 1023 (10 bits)

 

In order, to use the AD_CONV block, follow the listed instructions

 

Use the AD_CONV block configuring the CHANNEL parameter according to the following table

 

ANALOG INPUT

POSITION

CHANNEL

AIN1

P1-5

0

AIN2

P1-6

1

AIN3

P1-14

2

AIN4

P1-15

3

AIN5

P2-30

4

AIN6

P2-32

5

 

 

Also configure the AD_CONV block with the following parameters

 

PARAMETER

VALUE

NOTE

SPAN

1

 

OFFSET

0

 

 

Using the Pin Configuration Dialog (Options Menu_Navigate_ArrowConfiguration Menu_Navigate_Arrow"Pin Configuration Tab") set the pin you want to use as Analog Input to "AD"