|
|
View previous topic :: View next topic |
Author |
Message |
miky_boy
Joined: 11 Jan 2008 Posts: 8
|
Pic18f4520+Enc28J60 |
Posted: Sat Feb 02, 2008 3:54 pm |
|
|
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
|
|
Posted: Wed Feb 06, 2008 7:50 pm |
|
|
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 ?
Regards |
|
|
joven
Joined: 30 Jan 2007 Posts: 56 Location: Viana do Castelo - Portugal
|
|
Posted: Thu Feb 07, 2008 2:12 am |
|
|
Hi
You should try find CCS TCP/IP
Is more easy implement. |
|
|
|
|
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
|