cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC Creator & Designer Software

moro_1580446
New Contributor II

Hi every body. I want to run an TCP/IP ethernet with ENC28J60 and CYC4245AXI-483

is there any body that have an example to share with me?

any samples that I founded is about psoc3, when I changed chip selection from psoc3 to psoc4 several errors occur. It is cause to confuse me to run and understand.

As a basic view point I need to understand how does ENC28J60 with their registers to have an TCP/IP ethernet network building. In addition what can I do to manage control and buffer registers of ENC28J60 as well as to work well.

please guide me...

thanks for attention...

0 Likes
1 Solution
EvPa_264126
Valued Contributor II

Project for PSoC Creator 4.3 with old CY_boot.
I just see that we have different sources (date of the project), perhaps it should be so.
I don't remember how it works anymore - I'm just trying to revive an old project for PSoC4,
but it seems to me a pair of ENC + PSoC4 is far from the best option.

View solution in original post

0 Likes
13 Replies
DheerajK_81
Moderator
Moderator

Hello @moro_1580446 ,

The following thread should serve as good reference: https://community.cypress.com/t5/PSoC-5-3-1-MCU/Use-ENC28J60-ethernet-shield-on-PsoC-5LP/td-p/119726...

However, there is no ready-made project available for the PSoC4. 

Regards,
Dheeraj

moro_1580446
New Contributor II

Thankyou for your answer. It solved and I could to read and write on ENC28J60 registers correctly. I will put file here as soon as it possible.

I try to build tcp connection used ethernet register to test communication between Psoc4 and PC with Hercules utility software. Could you help me with that?

Thankyou for attention...

0 Likes
DheerajK_81
Moderator
Moderator

Hello @moro_1580446 ,

Sure. What is the issue you are facing when using Hercules Utility Software? Are you able to connect after adding the TCP IP address and port number?

Regards,
Dheeraj

0 Likes
moro_1580446
New Contributor II

Here is my project with psoc4 and Enc28j60. I try at first to get MAC address of PC, but I do not know why it just reply to me 0:0:0:64:82:16 . It is not correct MAC address of PC. So I do not know where is the problem also I changed Ethernet properties with the router IP mentioned in PSOC4 code, but I can not find where is my problem?
Can you see my project attached and tell me how can I fix ARP-test with psoc4.
Thanks for attention...

0 Likes
DheerajK_81
Moderator
Moderator

Hello @moro_1580446 ,

I checked the code against the datasheet and the sequence and opcodes look proper. Can you please debug the project and let me know what value you see for bytBuffer in this particular function shown below:

DheerajK_81_0-1612893767095.png

Looking forward to your reply.

Regards,
Dheeraj

0 Likes
moro_1580446
New Contributor II

Hi, I used sample ENC28J60 header files.
ByteBuffer return SPI rx value gotted.
Do you think highlight part should changing?

0 Likes
EvPa_264126
Valued Contributor II

Hello.
I found the ENC28J60 board on the shelf and downloaded my old project for it: ENC28J60-BasicUDP-000.cywrk.Archive02.zip
ENC28J60 requires too many resources to maintain, and PSoC4 seems too weak for this to me.
I had to remove a lot from the project in order for the PSoC4 to have enough memory.
The device can only register on the network. It's all.
The project is attached.
Evgeniy

IP.jpg

0 Likes
moro_1580446
New Contributor II

I do not want to sned and recieve hug buffer data from ethernet. Just I need to control number of relay over ethernet. So I choose Enc28j60. But I cant find where is my problem to build ethernet connection with Enc28j60 registers. Psoc4 is my choice because the cost is important for me.

please giude me how can I use ENC28j60 registers to receive this purpose. I want to send function over ethernet using Hercules to control number of relay, But unfortunately I can not get MAC address of PC first of all.

Thank you for attention...

0 Likes
EvPa_264126
Valued Contributor II

I had to remove all printf inside all project files, otherwise it doesn't work.
I can see the difference in our projects files like:
#define ARPPACKET 0x0608 and #define ARPPACKET 0x0806
different ARP packet structure, etc.

I have connected:
ENC-> PC-> router (LAN / WIFI)


I get a result like this:
when it starts, my router sees it as 192.168.0.153

and I get one of three MAC addresses in a loop:

1 -MAC address of the router, but not the one in the passport, but the one that the network scanner sees.
2 -MAC address of LAN PC
3 -MAC address of WIFI PC

basically - the MAC address of the router
Evgeniy

 

0 Likes
moro_1580446
New Contributor II

Thanks for reply. first of all your ARP.zip is not complied with my psoc creator because it lost some cy boot file. another thing that is my question is about my project.

Is my problem just for ARP structure? because I  changed 0x0806 to 0x0608 but it is not different result.

another thing I get dat feedback from MACRead((unsigned char*)&arpPacket,sizeof(ARP)); sometimes it back 52 or 36 in decimal and sometimes 0. And I do not what does it means?
please giud me it is very important for me to solve my problem as soon as possible.

Thanks for attention...

0 Likes
EvPa_264126
Valued Contributor II

Project for PSoC Creator 4.3 with old CY_boot.
I just see that we have different sources (date of the project), perhaps it should be so.
I don't remember how it works anymore - I'm just trying to revive an old project for PSoC4,
but it seems to me a pair of ENC + PSoC4 is far from the best option.

View solution in original post

0 Likes
moro_1580446
New Contributor II

Thank you dear EvPa. It is worked and get back PC MAC address.
I know what is your mean about the PSOC4 features. But I do not want to use ENC28J60 to send and receive huge files or packets.
I need to send a short message throw ethernet to read from ENC28J60's buffer and then turn relay on/off, so I do not want very power from PSOC's series.

Now please guide me below question :

1- I think I need just TCP/IP connection for my target. Please guide me?

2- How can set port address on ENC28J60 to seprated several ENC28J60 on one ethernet network?

3-How can connect Hercules utilitie software from PC to ENC28J60 and getting data throw ethernet?

Thank you for attention...

0 Likes
EvPa_264126
Valued Contributor II


I was faced with the fact that using ENC28J60 requires too deep knowledge of various details, which I did not plan to study deeply.
On the advice of experts, I limited myself to using UDP packets to transfer commands and data. and then ESP8266 appeared ...
I do not seem to have saved my projects (PSoC5 + ENC + UDP), but I have already forgotten the whole theory.
In any case, for PSoC4 + ENC28J60 you will have to look for something lightweight and adapt for PSoC. (uIP (micro IP), tcpip lite stack, PIC18 + ENC28J60)

0 Likes