Re: Can you use the PIC24ep512gu810 with the Microchip TCP/IP Lite Stack (AN1921)?
@aurora96 If packets are not being sent, then it can be a problem with your SPI, or the way you initialized the ENC28J60.
You can test SPI by writing to the PHLCON register and turning on an LED (assuming you have an led connected). You can use the ENC28_PhyWrite function in the AN1921 stack. Look at the ENC28J60 datasheet on what to value to write to the PHLCON register to turn on an LED. Be sure to change the values of the CS, SCLK, MOSI and MISO pins based on your hardware. Also make sure you are using 8-bit SPI as the ENC28J60 only supports 8-bit. All the functions that write to the ENC28J60 use ETH_SPI_WRITE8(a) so make sure that function is defined as your SPI function.
If you are certain your SPI is working, you can set the PHLCON register to blink every time you send a packet. If it is not blinking, check to see how you initialized the ENC28J60 in the ETH_Init function. How to initialize it and send packets is in the ENC28J60 datasheet. You can also use Wireshark to capture packets, but if your packets are not being captured it may also be due to the way Wireshark is configured. If you have linux, the 'any' interface is good at capturing almost all packets in the network.