Hi
I have a few products that use the ATMega2560s.
For development I use AVR Studio mostly (I did one project using Eclipse but I went back to AVR Studio).
So far it has been standard embedded stuff devices on serial ports and digital IO to control RF hardware BCD displays etc. everything works fine and life is good.
My next project besides the standard stuff I already do also needs to connect to the internet via Ethernet.
I looked at an Arduino shield (2) and I was think that if I wired up my 2560 to the
W5500
controller just like it is done on the Arduino board(s) then I could use the Arduino Ethernet library.
(Libraries - Arduino Reference)
And I assume it would mesh just fine with Standard C library for AVR-GCC (avr-libc: Modules)?
Also I'm looking at the Mega2560m schematic and it appears that there is a Mega16U2 on the board that eliminates the need for an ICE or allows you to do the development via a USB port.
I have loads of JTAGICEs, STK500s and STK600s lying around.
So my plan would be to use one of those (JTAG ICE3) and leave the Mega16U2 off and just use the JTAG or ISP connector instead?
Can anyone out there provide me with a little guidance?
I'm thinking it would be great not to have to write an Ethernet library when it appears that there is a perfectly good open source Ethernet library that I can use.
pcoiner:
Hi
I have a few products that use the ATMega2560s.
For development I use AVR Studio mostly (I did one project using Eclipse but I went back to AVR Studio).
So far it has been standard embedded stuff devices on serial ports and digital IO to control RF hardware BCD displays etc. everything works fine and life is good.
My next project besides the standard stuff I already do also needs to connect to the internet via Ethernet.
I looked at an Arduino shield (2) and I was think that if I wired up my 2560 to the
W5500
controller just like it is done on the Arduino board(s) then I could use the Arduino Ethernet library.
(Libraries - Arduino Reference)
And I assume it would mesh just fine with Standard C library for AVR-GCC (avr-libc: Modules)?
Also I'm looking at the Mega2560m schematic and it appears that there is a Mega16U2 on the board that eliminates the need for an ICE or allows you to do the development via a USB port.
I have loads of JTAGICEs, STK500s and STK600s lying around.
So my plan would be to use one of those (JTAG ICE3) and leave the Mega16U2 off and just use the JTAG or ISP connector instead?
Can anyone out there provide me with a little guidance?
I'm thinking it would be great not to have to write an Ethernet library when it appears that there is a perfectly good open source Ethernet library that I can use.
Just setup an ISP connection 6 pin 2x3x0.100 with the correct pinout, supply VCC, Gnd, 100uF caps on EACH VCC, VCCA, pin. A clock Source, some use Xtals, I use Resonators. Reset Circuit is simple. Just copy the MEGA2560. A cap, a resistor, a diode. Add a switch thru a resistor to ground for manual control.
I use an AVRISPmkII. Easy.
You can use the W5500, or ENC28J80, or ESP-12F for your network. Just provide the connections, Some of these require a 3.3V SPI, or 3.3v TTL serial so if you run your Mega at 5V, you will have to provide a level shift circuit.
Hi Chuck
I can make the hardware work all day (most times).
Generally I will hook up both the ISP and the JTAG and only load one connector.
(That has gotten me out of a jam more than once early MKII) but I generally default to the JTAG if I have to sacrifice pins.
I trying to figure out if I can include the Arduino Ethernet library in with the GCC C++ that comes out of the can with AVR Studio.
Seems the code should be compatible when I think about it but I've never tried anything Arduino before.
I don't see why I need the USB connection when I have both the JTAG and ISP but I thought I better ask someone that knows more than I do.
Maybe a better title would be "Mixing Arduino Libraries and Standard C Library for AVR-GCC"
(I'll let the sysop be the judge of that)
BTW
The Ethernet shield schematic/hardware looks fairly cut and dried.
Thanks for the heads up on the level shift.
I was planning on running the 2560 @ 5V.
I'm running a GPS receiver at 3.3 in my other designs and will need one here also.
On it I do a divider on the gusinta and an 74HTC125 on the gusoutta back to the 2560 I'll do the same on the W5500 unless I move everyone to 3.3V which is starting to make more sense.
I have used resonators and crystals with equal success.
I now use a 14.7456MHz osc for RS232 perfection but it is a 5V part.
I've buy enough that I get a pretty good deal on them.
Just found this on the W5500 data sheet (3.3V operation with 5V I/O signal tolerance)..now I'm leaning back to 5V.
See the libraries page for interfacing with particular types of hardware. Try the list of community-contributed code. The Arduino language is based on C/C++. It links against AVR Libc and allows the use of any of its functions; see its user manual for details.
here
Is there anyone out there that as actually performed this feat using AVR Studio?