Good day,
I am developing a board with the Atmega1284P-U. The board needs to be able to send and receive data via internet.
The tutorial i saw online is this one:
I am trying to build the exact same thing but instead of the Atmega328P i am using the Atmega1284P and ofcourse i use the correct pins on the Atmega1284 (PB2 on the Atmega328P = PB2 on the Atmega1284P etc...)
I have used multiple example codes but none of them seem to work. I always get IP: 0.0.0.0. When the internet cable is connected to my router i can see the router RJ45 led on but it won't work.
I am not exactly sure i have used the right RJ45 pins because i cannot find what pins are number 1 till 8 but i tried to figure it out looking at reference pictures (https://docstore.mik.ua/univercd/illus/h/18/h5318.gif)
I was uning another connector but i cannot find any information about that one, and when i try to measure resistance, multiple pins are connected to the same wire (SI-52007-F) => (https://componentsearchengine.com/footprintPreview.php?partID=239837&u=0)
For example, pin 9 on the schematic above is connected to wire 7 AND 8??
This is the code i am using with the UIPEthernet library, but i also tried other examples (forgot which ones)
/*
* UIPEthernet EchoServer example.
*
* UIPEthernet is a TCP/IP stack that can be used with a enc28j60 based
* Ethernet-shield.
*
* UIPEthernet uses the fine uIP stack by Adam Dunkels <adam@sics.se>
*
* -----------------
*
* This Hello World example sets up a server at 192.168.1.6 on port 1000.
* Telnet here to access the service. The uIP stack will also respond to
* pings to test if you have successfully established a TCP connection to
* the Arduino.
*
* This example was based upon uIP hello-world by Adam Dunkels <adam@sics.se>
* Ported to the Arduino IDE by Adam Nielsen <malvineous@shikadi.net>
* Adaption to Enc28J60 by Norbert Truchsess <norbert.truchsess@t-online.de>
*/
#include <SPI.h>
#include <UIPEthernet.h>
EthernetServer server = EthernetServer(1000);
void setup()
{
Serial.begin(9600);
uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
IPAddress myIP(192,168,0,6);
Ethernet.begin(mac,myIP);
server.begin();
}
void loop()
{
size_t size;
if (EthernetClient client = server.available())
{
while((size = client.available()) > 0)
{
uint8_t* msg = (uint8_t*)malloc(size);
size = client.read(msg,size);
Serial.write(msg,size);
free(msg);
}
client.println("DATA from Server!");
client.stop();
}
}
Does the light on the switch mean the wires are correct? Or can it be something else?
Thanks for the help
