Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
387
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Spi_Ethernet_putByte
Spi_Ethernet_putBytes
Prototype
procedure Spi_Ethernet_putByte(v: byte);
Returns
Nothing.
Description
This is MAC module routine. It stores one byte to address pointed by the cur-
rent 
ENC28J60
write pointer (EWRPT). 
Parameters:
v
: value to store 
Requires
Ethernet module has to be initialized. See Spi_Ethernet_Init.
Example
var data as byte;
...
Spi_Ethernet_putByte(data); // put an byte into ENC28J60 buffer
Prototype
procedure Spi_Ethernet_putBytes(ptr : ^byte; n : byte);
Returns
Nothing.
Description
This is MAC module routine. It stores requested number of bytes into 
ENC28J60
RAM starting from current 
ENC28J60
write pointer (EWRPT) location.
Parameters:
ptr
: RAM buffer containing bytes to be written into ENC28J60 RAM. 
n
: number of bytes to be written. 
Requires
Ethernet module has to be initialized. See Spi_Ethernet_Init.
Example
var
buffer : 
array[17] of byte;
...
buffer := 'mikroElektronika';
...
Spi_Ethernet_putBytes(buffer, 16); // put an RAM array into
ENC28J60 buffer