AVR Library for Ethernet with Codevision?

Go To Last Post
22 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all

Does anyone know of a codevision compatible version of an ethernet library to interface with WizNet chips?

The arduino folks have a library, and it looks quite straightforward to use - example here:

http://www.pjrc.com/teensy/td_libs_Ethernet.html

I don't want to use arduino, cos it seems like a step backward to beginner level. (or is it the future of embedded programming, and I should get used to it?)

I think some of you on here are in touch with the developer of CodevisionAVR - any news? rumours?

All I want to do is simple things - eg read a temperature sensor and show it on a web page, or switch a light on and off.

Any suggestions?

Thanks
Pete

Last Edited: Thu. Aug 16, 2018 - 06:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd have thought it would be possible to translate the Wiznet GCC code to CV. The main difference you'd be looking at are the structure of any ISRs.

(or you could just use GCC for this one Wiznet project - you never know you might like it ;-))

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Clawson

Thanks for the quick reply.

I have used GCC before, but I love the convenience of Codevision.

I'm not a super smart programmer, so I like to keep things simple as possible...

It appears that networked devices are the way of the future, so I would expect that codevision will have to support it soon, or lose market share to arduino :-(

(And that's why I have to learn how to do it, or I'll be behind the times!)

Thanks
Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

It appears that networked devices are the way of the future, so I would expect that codevision will have to support it soon, or lose market share to arduino

I think it'd be up to Wiznet to make that choice. I guess they chose to develop their existing code using GCC simply because it was (a) free for them to use and (b) they could guarantee that the users of their chips/code could also get easy access to it.

Presumably it's the WIZ812MJ you are using?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I'm not a super smart programmer, so I like to keep things simple as possible...
I completely disagree! Keeping things SUPER simple, is what makes a programmer 'smart' :)

You should see some of the code I have to read at work... the programmers that think they are really clever and in actual fact, thickest son's of moron's it's been my misfortune to come accross :twisted:

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Quote:

It appears that networked devices are the way of the future, so I would expect that codevision will have to support it soon, or lose market share to arduino

I think it'd be up to Wiznet to make that choice. I guess they chose to develop their existing code using GCC simply because it was (a) free for them to use and (b) they could guarantee that the users of their chips/code could also get easy access to it.

Presumably it's the WIZ812MJ you are using?

What I meant is that I choose Codevision over GCC cos I like the convenience of the LCD Libraries etc, so it would be in Mr. Codevision's best interest to add a Wiznet library - he needs to give the users what they need, or they will go elsewhere. The arduino people have done it, so its obviously possible - but I don't want to go down that route and have to learn another system - my brain can only cope with so much!

Wiznet type: I'm not using anything at the moment - I just don't even know where to start!

Luckily, this is not an actual project with a deadline or anythin, I just thought it would be a good thing to play around with during quiet times at work, so that when I do need to use it for real, I know what I'm doing.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The arduino people have done it, so its obviously possible

I don't think that's true for anything but the most basic things like ADC and UART. It's one of the 100,000+ Arduino users who's done it for things like Wiznet Ethernet and then shared it with the community - that's the power of having such a large user base.

(BTW GCC comes with HD44780 code ;-) - though admittedly not the wealth of library code that CV comes with - but then again you have libraries such as Procyon and Fleury as well as Martin Thomas and others)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For ethernet interfaces... The Wiznet 5100 based modules eliminate 95% of the code for TCP/IP networking. It's all on the WizNet module. The host (AVR?) microprocessor has a very tiny/simple interface via SPI to the '5100.
The software model is four sockets, each with separate 2KB buffers for TX and RX, all on the module, such as the Wiz812MJ which is cheap.

The module takes care of ARP/ICMP, IP, TCP and UDP, as well as PPPoE if you want that.

So much easier than the Microchip module.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

stevech wrote:
For ethernet interfaces... The Wiznet 5100 based modules eliminate 95% of the code for TCP/IP networking. It's all on the WizNet module. The host (AVR?) microprocessor has a very tiny/simple interface via SPI to the '5100.

Hi Stevech

That's exactly the sort of module I would like to use, but there are no libraries for it, to suit Codevision. :-(

The arduino people get to use an ethernet library http://arduino.cc/en/Reference/Ethernetwith simple-sounding commands like:

void setup()
{
  // initialize the ethernet device
  Ethernet.begin(mac, ip, gateway, subnet);

  // start listening for clients
  server.begin();
}

cool, eh?

I wouldn't even begin to know how to write my own library routines!

I thought that I couldn't be the only Codevision user who wants to do this - maybe I am!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I wouldn't even begin to know how to write my own library routines!
Give it time. We all had to start somewhere ;)

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How do you get rid of sticky stuff from an ethernet cable? We taped our ethernet cable down to the carpet with masking tape for a year, and now need to clean it off; however, there's sticky residue left on the ethernet cable after we peeled off the masking tape. We've tried Purell, nail polish remover, and I've heard of using rubbing alchohol, but would anything else work?
____________________________
yahoo keyword tool ~ overture ~ traffic estimator ~ adwords traffic estimator

Last Edited: Sat. Sep 10, 2011 - 06:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

O_O

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

petenz123 wrote:
Hi all

Does anyone know of a codevision compatible version of an ethernet library to interface with WizNet chips?

All I want to do is simple things - eg read a temperature sensor and show it on a web page, or switch a light on and off.

You can download this CodeVisionAVR web server example:

http://www.hpinfotech.ro/w5100.zip

It does exactly what you need.

Regards,
Pavel

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hpinfotech wrote:
petenz123 wrote:
Hi all

Does anyone know of a codevision compatible version of an ethernet library to interface with WizNet chips?

All I want to do is simple things - eg read a temperature sensor and show it on a web page, or switch a light on and off.

You can download this CodeVisionAVR web server example:

http://www.hpinfotech.ro/w5100.zip

It does exactly what you need.

Regards,
Pavel

Anyone have luck with this? I'm a newbie to Ethernet, but have been writing code using Codevision for several years. I got the Arduino program to work but not the Codevision example. At first, it couldn't be seen on the network at all much less see the web page. I turned on debug and that works, so it is programming the device ok. I copied the MAC and ip address from the Arduino code into the CV example and now I can at least see the device on the network, but still no luck seeing the web page.
- Brian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found the problem - turns out the Wiznet device needed some time to settle down before configuring it with the W5100_Init(); function. I tried reading back the MAC address and was getting all zeros. I waited 500ms before the Init and now it's working great.
Possibly a newer version of the W5100?

www.brianlongwell.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
Thanks for bumping this up - I hadn't even realized that Pavel had replied.

Glad to see its working for you!

Cheers
Pete

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi
This is codevision source code. switch a light on and off.
goodluck!

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

anddmt wrote:
Hi
This is codevision source code. switch a light on and off.
goodluck!

Hi. Actually it is an avr studio source code with encj2860 not the Wiznet chip. Did you upload the wrong source code?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

tanks for this file.(https://www.avrfreaks.net/sites/d...)

 

i download it but in the compile exist error!

it is need <avr/io.h> & <util/delay.h>

i searched and i found just these header(library) for winavr(gcc) but i need those header for codevision.

can you help me please?

tank you

control engineer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i download it but in the compile exist error!

it is need <avr/io.h> & <util/delay.h>

i searched and i found just these header(library) for winavr(gcc) but i need those header for codevision.

can you help me please?

Well clearly the C code is written for GCC so you need to "port" it.

 

Looking through it (though extensive) I see very little that is not generic C so it should simply be a matter of changing <avr/io.h> to Codevision's <io.h> (is it?). As of <util/delay.h> you can replace any _delay_ms() and _delay_us() calls with Codevision's own delay_ms() and delay_us() - that is just remove the leading under-score. Not sure what header Codevision uses for those though - maybe it's covered by the generic IO header anyway?

 

Last Edited: Wed. Jul 22, 2015 - 08:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello !
I want to connet my AVR ATMEGA32 to ethernet . For doing this project i need ethernet module !
Which of them is better and easiest W5100 or ENC28J60

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You've already asked that question - and got answers: https://www.avrfreaks.net/forum/connect-enc28j60-or-wiznet5100-avr

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Topic locked