DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

EVM-900-DT Просмотр технического описания (PDF) - Unspecified

Номер в каталоге
Компоненты Описание
производитель
EVM-900-DT Datasheet PDF : 38 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
Read Analog Voltage Value - Command Code = 26
This command reads the analog voltage on a specific GPIO line.
Read Analog Voltage Value Command and Response
Command
Start Command Param 1 Param 2 End
3C
26
00
GPIO
3E
Response
Start Response Param 1 Param 2 Param 3 Param 4 Param 5 End
3C
26
00
GPIO ADC1 ADC2 Status
3E
Figure 29: Read Analog Voltage Value Command and Response
Parameter 1 is set to 0x00. Parameter 2 is the GPIO number to be queried,
where 0 corresponds to GPIO_0 and 7 is GPIO_7 and so forth.
The response returns four parameter bytes. Parameter 1 is set to 0x00
and Parameter 2 returns the GPIO number that is being read. Param 3
and Param 4 return the voltage value on the pin. The voltage on the pin is
calculated using the formula below.
Voltage (V) = [(Param 3) * 16 + (Param 4)] / 2047 * VCC
For example, if a Read ADC Value command returns the following response
and VCC is 3.0V,
0x3C 0x26 0x00 0x07 0x21 0x0E 0x00 0x3E
This means that the voltage on GPIO_7 can be calculated as
[(0x21) * 16 + (0x0E)] / 2047 * 3.0 = 0.794V
The GPIO line being read must be configured as an analog input before the
ADC value can be read.
Parameter 5 indicates if the command was successful (00) or if there was
an error (01).
Read Digital IO Value - Command Code = 27
This command reads the digital input value on a specific GPIO line.
Read Digital Input Value Command and Response
Command
Start Command Param 1 Param 2
End
3C
27
00
GPIO
3E
Response
Start Response Param 1 Param 2 Param 3 Param 4 End
3C
27
00
GPIO
DIVal
Status
3E
Figure 30: Read Digital Input Value Command and Response
This command returns four Parameter bytes. Parameter 1 is set to 0x00
and Parameter 2 returns the GPIO number that is being read.
Parameter 3 is the state of the GPIO line that is being read. If it is high,
Parameter 3 is 0x01. If it is low, Parameter 3 is 0x00.
Parameter 4 indicates if the command was successful (00) or if there was
an error (01).
The GPIO line being read must be configured as a digital input or output
before the value can be read.
32
33

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]