Directed Electronics 3200HS Informações Técnicas Página 31

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 99
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 30
SCI to SPI Peripheral Communication in V850ES Microcontrollers
Figure 19. MD_INTCSI00() : Interrupt Service Routine for INTCSI00
Yes
No
TX_CNT ==
TX_LEN?
Yes
No
TX_CNT ==
TX_LEN?
SOTB0L = *CSI00_TX_ADDRESS
CSI00_TX_ADDRESS ++
CSI00_TX_CNT ++
SOTB0L = *CSI00_TX_ADDRESS
CSI00_TX_ADDRESS ++
CSI00_TX_CNT ++
Return
Yes
No
RX_CNT + 1
< RX_LEN?
Yes
No
RX_CNT + 1
< RX_LEN?
CALL CALL_CSI00_Send( )
Yes
No
TX_CNT <
TX_LEN?
Yes
No
TX_CNT <
TX_LEN?
INTCSI00
Yes
No
RX_LEN == 0?
Yes
No
RX_LEN == 0?
*CSI00_RX_ADDRESS = SIRB0L
CSI00_RX_ADDRESS ++
CSI00_RX_CNT ++
*CSI00_RX_ADDRESS = SIRB0L
CSI00_RX_ADDRESS ++
CSI00_RX_CNT ++
*CSI00_RX_ADDRESS = SI000
CSI00_RX_CNT ++
CALL CALL_CSI00_Receive( )
*CSI00_RX_ADDRESS = SI000
CSI00_RX_CNT ++
CALL CALL_CSI00_Receive( )
Return
Return
After processing transmit data and optional received data, the MD_INTCSI00() routine returns to
the program at the place where the INTCSI00 interrupt occurred.
2.6.10 Temp_Read_1(): Read Temperature Sensor 1 (MAX6627)
The Temp_Read_1() routine reads the latest temperature reading from the MAX6627 temperature
sensor, and returns the value read as a signed 16-bit value, equivalent to (temperature in ºC) × 128.
First the CSI00_SetType4() routine is called, to set the CSI00 transfer type to the proper setting for
this device. Then the chip select for the temperature sensor is set on (active low). A short delay is
inserted to allow 100ns from chip select to the first serial clock.
The routine then calls CSI00_ReceiveData(rxbuf, 2) to set the location and count of bytes to be
read from the CSI00 peripheral. The first parameter, rxbuf, is a pointer to an array of byte values
to hold the data read; the second parameter, 2, is the count of bytes to receive.
25
Vista de página 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 98 99

Comentários a estes Manuais

Sem comentários