Robotics Technologies microBus-Cam II Manual do Utilizador Página 19

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 23
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 18
Development of Mobile Robot Based on I
2
C Bus System
211
Step 3 : I2C_ACK ( ),
Step 4 : I2C_SEND ( )Enable analog output, single mode and analog channel
selection,
Step 5 : I2C_ACK ( ),
Step 6 : I2C_STOP ( ),
Step 7 : I2C_START ( ),
Step 8 : I2C_SEND ( ) – Read mode; start to read data from analog input of
selected channel,
Step 9 : I2C_ACK ( ),
Step 10 : I2C_RECEIVE ( ),
Step 11 : I2C_ACK ( ),
Step 12 : I2C_STOP ( ).
5.3.4 Function ordering for temperature reading
To read temperature, it must be programmed in 3 steps; start to convert data, stop to convert
data and read data.
Start to convert data:
Step 1 : I2C_START ( ),
Step 2 : I2C_SEND ( ) – Call slave device address from robot and write mode
configuration,
Step 3 : I2C_ACK ( ),
Step 4 : I2C_SEND ( ) – Send command register, start to convert data,
Step 5 : I2C_ACK ( ),
Step 6 : I2C_STOP ( ),
Stop to convert data:
Step 1 : I2C_START ( ),
Step 2 : I2C_SEND ( ) – Call slave device address from robot and write mode
configuration,
Step 3 : I2C_ACK ( ),
Step 4 : I2C_SEND ( ) – Send command register, stop to convert data,
Step 5 : I2C_ACK ( ),
Step 6 : I2C_STOP ( ),
Read data:
Step 1 : I2C_START ( ),
Step 2 : I2C_SEND ( ) – Call slave device address from robot and write mode
configuration,
Step 3 : I2C_ACK ( ),
Step 4 : I2C_SEND ( ) – Send command register, stop to convert data,
Step 5 : I2C_ACK ( ),
Step 6 : I2C_START ( ),
Step 7 : I2C_SEND ( ) – Send command register, stop to convert data,
Step 8 : I2C_ACK ( ),
Step 9 : I2C_RECEIVE ( ) – Read MSB of temperature register,
www.intechopen.com
Vista de página 18
1 2 ... 14 15 16 17 18 19 20 21 22 23

Comentários a estes Manuais

Sem comentários