ENC28J60 Ethernet Library V3.3

General discussion on mikroPascal.
Author
Message
Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#31 Post by Dany » 10 Dec 2008 19:16

yo2lio wrote:I know about this problem, replace in code IpHeader with array[4] of byte and MacHeader with array[6] of byte.
Anyway, this library is not tested in other compiler than MP 7.0 .
Thanks. Problem solved. :D
- Is this a shortcoming of the mP V8.3 compiler?
- Do you expect any other problems with your ENC library and V8.3?
I did only some very basic tests until now. Do you have some kind of test
harness to perform quickly some of your tests?
Thanks in advance! And keep up the good work! :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#32 Post by yo2lio » 10 Dec 2008 22:48

Dany wrote:- Do you expect any other problems with your ENC library and V8.3?
I don't know, I'm happy with my MP 7.0. :D
Dany wrote:Do you have some kind of test harness to perform quickly some of your tests?
You can test the library in time ...

I use this library in few industrial applications, working 24 hour/day, public Ip. So, with MP 7.0 you don't need any tests , is tested and work 100 % .
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#33 Post by Loki1_11 » 11 Dec 2008 12:28

Hi guys can some of you help me with my thread http://www.mikroe.com/forum/viewtopic.php?t=17602

Just because I dont know more wath to do :/

Regards,
Diego

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#34 Post by Dany » 11 Dec 2008 13:47

yo2lio wrote:You can test the library in time ...
Hi Florin, I assume the code at the bottom of the "ENC_V3_4" example (which is never executed because of outside the main loop) does perform some meaningfull tests, or is that code still in as example, or that it is in to make sure all routines in the library are compiled?

Code: Select all

  CopyFlashToEthMem(@httpHeader,TXSTART+54,30); // only for compilation library
  if EthMemCompareWithFlash(AddrPacket+54, @httpHeader, 30) then  // only for compilation library
  CopyRamToEthMem(@eth_mac,TXSTART+22,6); // only for compilation library
  Success := Send_ARP(user_ip_addr, dest_mac); // only for compilation library
  if NTP_Sync = false then Success := Ntp_query; // only for compilation library
  Get_Time;
  ping_udp; // only for compilation library
Thanks in advance.
Last edited by Dany on 11 Dec 2008 13:53, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#35 Post by yo2lio » 11 Dec 2008 17:33

Dany wrote:... or that it is in to make sure all routines in the library are compiled?
Hello Dany,

This part of code is only to have all routine in compiled *.mcl file.

In my applications I use the compiled library *.mcl , not the source code !

For Diego :

Do you use a custom hardware ?
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#36 Post by Loki1_11 » 11 Dec 2008 19:45

yap yo2lio, I'm build it in my protoboard !

I just get the help schematic and do all conections like it says, but it didnt works ...

Its strange, When I comment the line Spi_Ethernet_doPacket();
do a build of the project and go to Run the Start Debugger options gets disabled, then if I program the pic, the program doesnt starts ...
If i comment this line, the program starts and the Start Debugger options gets enabled ...

Any tips ?

Whats the correct fuses settings ? I just want to get the communication done without any adc feature or button yet, just send my htm on a request is done.

Kindly Regards,
Diego.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#37 Post by yo2lio » 11 Dec 2008 20:41

Probably you have some problems with your hardware.

I'm sure that the code work 100 %.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#38 Post by Loki1_11 » 11 Dec 2008 21:23

Can you confirm for me the pic configurations ? how should it be ?
I think the hardware is ok, its everything connected like the help says ..
so maybe it is some o my pic config that I'm doing wrong .

Thanks yo2lio
Regards,
Diego

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#39 Post by yo2lio » 11 Dec 2008 21:48

You can download here :

http://www.microelemente.ro/MikroPascal/ENC_V3_4.hex

a working *.hex example.

MCU PIC18F452, XTAL 8 MHz , HSPLL

you can get ping from the board at address 192.168.1.253

Hardware configuration are the same like in help file.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#40 Post by Loki1_11 » 11 Dec 2008 22:32

Can I post an picture of my protoboard ?

Because I dont know what is going on :/

I tryed to program with this hex and nothing happened, my router led doesnt turned on, or even my protoboard leds connected to enc28j60 ...

I'm lost ...

I will post the link to the picture in a few moments !

Thanks a lote yo2lio :/ and sorry for bother you :/

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#41 Post by Loki1_11 » 11 Dec 2008 23:12

here comes the link to the picture,

http://www.unitone.com.br/arquivos/protoboard.jpg

Thanks guys !

Regards,
Diego.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#42 Post by yo2lio » 11 Dec 2008 23:28

:D :D :D Where is your Ethernet transformer ????

The RJ45 connector from schematic , have 10/100 Ethernet Transformer incorporated ....

http://home.comet.bg/datasheets/Cvi%20l ... B-TRAF.pdf
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#43 Post by Loki1_11 » 11 Dec 2008 23:49

Oh i dont have one :/

Do you recommend some one ? without the connector please.

I've noted that I was missing one gnd connection and an vcc conection on the enc28j60 to, so I fixed.

Just to know when you build your prog does the start debugger option gets disabled ?

other question can this hardware problem (missed transformer) afect the do_Packed procedure to stuck the pic program execution ? or this should be some spi related problem ?

And one more doubt is this schematic the same of your help right ? http://www.unitone.com.br/arquivos/mikroeSch.jpg

So how should I connect the pins ? with transformer ? do you have some sample ?

Sorry for asking to much :/

Kindly Regards,
Diego.

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#44 Post by Loki1_11 » 12 Dec 2008 04:37

Ok now I think its just this transformer, that is missing because Now some times I see the router led blink quickly, and turn it of for a time then blink it again, but not like transfering, that is a start ...
the strange is that none of the leds on the protoboard turns on.
But now the program is executing, I see my led connected to portc.6 blink.

I just setup some fuses that wasnt like the project hex that you send it to me yo3lio, and just disabled the watchdog and it works without uncommenting the spi_doPacket line ...

Just the leds of the enc28jc60 doesnt blink, but i think its because its missing the transformer ...
Am I right ?

Any tips on what transform can I use ?

Regards,
Diego.

Loki1_11
Posts: 32
Joined: 11 Dec 2008 00:20

#45 Post by Loki1_11 » 12 Dec 2008 23:53

How can I know if the communication with enc28j60 is working ?
without the transformer.

I've founded an HT2001 from an old network card that I has, but I couldnt figure it out how to connect it to my protoboard, I didnt find the datasheet equivalent ...

This transformer has 6 pins but i dont know how to proced ...

Will keep searching ...

Regards,
Diego

Post Reply

Return to “mikroPascal General”