CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Pic18f4520+Enc28J60

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
miky_boy



Joined: 11 Jan 2008
Posts: 8

View user's profile Send private message

Pic18f4520+Enc28J60
PostPosted: Sat Feb 02, 2008 3:54 pm     Reply with quote

Hi my friends.
In my project i have to create comunication between the Pic and a Desktop PC, using ethernet protocol.
To implements this protocol i use the Pic18F4520 and the Enc28J60 that using SPI protocol.
I make all connections that i see in datasheets, but now i try to make the code
So i have this;

#include <18F4520.h>

#device ICD=TRUE
#device ADC=10
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, parity=N, xmit=PIN_C6, rcv=PIN_C7, bits=8)
#use spi(SPI1, MASTER, BAUD=1000000, BITS=16)

#define ENC_MAC_USE_SPI TRUE

#include <enc28j60.c>

void main (void)
{

setup_spi(SPI_MASTER|SPI_L_TO_H|SPI_CLK_DIV_4);
do
{
mac_spi_init();
mac_reg_init();

}

while (TRUE);


}


But now what i have to do??
How i define the IP address, the Gateway??
How i know if the SPI work's fine?!?!
Very thank's and strong regards to all.
miky_boy



Joined: 11 Jan 2008
Posts: 8

View user's profile Send private message

PostPosted: Wed Feb 06, 2008 7:50 pm     Reply with quote

103 view and no one request and no help :(
I can see that all questions about, ethernet, enc28j60 no have request....
Any problem with this envirement on ccs ? Crying or Very sad
Crying or Very sad Regards
joven



Joined: 30 Jan 2007
Posts: 56
Location: Viana do Castelo - Portugal

View user's profile Send private message

PostPosted: Thu Feb 07, 2008 2:12 am     Reply with quote

Hi

You should try find CCS TCP/IP

Is more easy implement.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group