Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] put Bytes to Enc28j60 ethernet controller Ram

Status
Not open for further replies.

yanal

Junior Member level 1
Joined
Sep 20, 2015
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
149
Hello friends ..

i have already use "Micro electronica Spi Ethernet Library"
https://www.mikroe.com/download/eng/documents/compilers/mikroc/pro/pic/help/spi_ethernet_library.htm in my project ..

it use put_String Function to stores whole string (excluding null termination) into ENC28J60 RAM
for example :

Code:
 // add AN2 value to reply
IntToStr(ADC_Read(2), dyna) ;
len += putConstString("var AN2=") ;
len += putString(dyna) ;
len += putConstString(";") ;

and store the value to ' len' variable which it's unsigned int .type

if i want to store more than one byte at enc ram to display it at the html page ..
what function should i used ?? and what is the type of the variable should i use to store the data ??


if any one can explain with examples i t will be so useful ..
:bang::bang:
 
Last edited by a moderator:

I have not used that library but looking at the document you reference, perhaps the 'SPI_Ethernet_putBytes' function would seem to fit. It seems to write multiple bytes into the Ethernet controller RAM.
HOWEVER, I am concerned by your comment about displaying the data as an HTML page, in that I'm not sure you are using the Ethernet controller chip appropriately if that is your purpose.
That chip is used to connect a device to an Ethernet network. What data is communicated between the device and some other device on the network is not really the concern of the ENC28J60. What the chip does do is handle the low level networking protocols and the libraries that are available (and you reference one) are then used to handle manage the higher networking layers such as DHCP, UDP and TCP.
Your reference to an HTML page does not really fit into that context in that it is a higher in the network layer again and is code that you need to write yourself to make your device into an HTML server.
Susan
 

Thanks Susan .. yes You are right ,,
i Attached my code here please please check lines from 270-280 here i want to use putBytes function
it seems the variable i use to store the data is wrong or i used this function in error way .. could you tell me what is the solution to this error .. Screenshot (4).png

- - - Updated - - -

................
 

Attachments

  • SPI2.rar
    101 KB · Views: 47

The error is exactly what the error message says: the SPI_Ethernet_putBytes' function has a "void" return and so you cannot the non-existent return value to the "len" variable. In this case you pass the number of bytes as a parameter to the fuinciton so you can simply use the same value to add to "len".
The documentation is your friend.
Susan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top