Wiznet WIZ810Sio User Manual page 9

Table of Contents

Advertisement

/* Pseudo Code for Read data of 8bit per packet */
#define
data_read_command
uint16 addr;
// Address : 16bits
int16 data_len;
// Data length :15bits
uint8 data_buf[];
SpiSendData();
// Send data from MCU to W5100S
SpiRecvData();
// Receive data from W5100S to MCU
{
ISR_DISABLE();
// Interrupt Service Routine disable
CSoff();
// CS=0, SPI start
// OP Read command
SpiSendData (0x0F);
// SpiSendData
SpiSendData(((addr+idx) & 0xFF00) >> 8);
SpiSendData((addr+idx) & 0x00FF);
// Read data:On data_len> 1, Burst Read Processing Mode.
for(int idx = 0; idx<data_len; idx++)
WIZ810Sio User Manual (WIZnet Co.,Ltd.)
< Read Sequence >
0x00
// Array for data
// Address byte 2
// Address byte 1
9

Advertisement

Table of Contents
loading

Table of Contents