new to the forum but had to join to ask this possibly simple question to someone at least. My goal is to find a bootloader for the arduino (ATMEGA328) and ENC28J60 ethernet controller. I have found numerous ones for the wiznet controller and have used them! but only one uncompiled version exists (here Google Code Archive - Long-term storage for Google Code Project Hosting.) for the ENC28J60 and AVR's. I manged to download it and have downloaded the latest WINAVR and i have compiled a hex file. i have also manged to place the hex file on the arduino using an uno as a ISP running the isp software. i know the isp works as i have flashed the chip before to the arduino bootloader from a stock chip. so does anyone know where to get a compiled hex that works? or could you tell me where i am going wrong? the bootloader does come with a epp file that it asks to you place in the eprom of the chip i have no idea how to do this but i did modify the bootloader to use mac,ip adresses i programmed into it rather than reading from the eprom.
All you need is the library. The device has it's own internal software and bootloader, and cannot be changed. Google the device on the web, or in this forum, it's a simple device with a few drawbacks- but they are cheap and work well for what they are...
maybe i didnt explain very clearly. i have no issues using the arduino and the ENC28J60 for normal operation. ie you use the standard arduino bootloader and download your compliled sketch files using the usb lead. what i want is a ethernet bootloader like ones for the wiznet chip that allow you to download your sketch via TFTP remotley. i have googled for days and the only one i could find was the uncomplied one i listed in my first post.
Ah.. I'd be impressed to see it, actually- the ENC setup is quite a bit more limited than the Wiznet. I've got an ENC and it's great for simple stuff- though I suppose there isn't anything that couldn't be done. It's SPI as I remember, so maybe finding a bootloader that boots from SPI and set up the module as a transparent "virtual serial"?
These values are wrong. You're not changing Arduino code but AVR code so pin numbers are not the pins numbers Arduino chose for it's boards but pin numbers of the chosen IO port of the ATmega328 controller. The range is from 0 to 7, so this has to read:
thanks for the reply pylon. i have changed the config.h file to reflect what you said recompiled and downloaded and still no joy?? it does say in the documentation for the bootloader that the epp file is required to downloaded to the device's ram. does anyone know how to do this? does anyoone have a complied hex that they know works with the ATMEGA 328 they can send me? its driving me mad. everytime i donwload my compiled hex the chip just sits there with PIN13 High as if its not running anycode??
The epp file has to be stored in the EEPROM of the processor. This can be done using avrdude (-U parameter).
What do you expect the hardware to do at bootup? Pin 13 is used as the clock line so with a standard multimeter this pin will look HIGH when measured. Have you checked with a scope? It should communicate with the ENC28J60 intensively during the first 5 seconds, jumping then to the non-existing application code. Do you have networt traffic on the ethernet interface in this time?
hi pylon. thanks for the reply. i have had a majour learning curve today with avrdude. it wasnt working correctly with my arduino uno as an isp. modified the .conf file so the baud rate has been reduced to match that of the arduino sketch (9600) the -b over-ride parameter would not do anything. anyway i managed to get both the hex and epp files onto my chip and still no life! when i say that pin 13 is high i mean the led is on, when there is traffic you can see it blink ie talking to the ENC28J60. i will post my make.in file that defines the compiler. if this helps
#
# Please note that this file has been generated by make.
# DO NOT EDIT THIS FILE
# If you wish to change the configuration of the bootloader
# please type 'make distclean' and then 'make' on the command line.
#
MCU = atmega32
EMB_FLASHEND = 0x7FFF
EMB_BOOTLOADER_SECTION_START = 0x7C00
EMB_LINKER_SCRIPT = -T ../make.files/eth-avr5.x
F_CPU = 16000000
EMB_BOOTLOADER_FLAVOR = 1
your correct, duh... it looks like this is never going to work. the avr-ethernet only suports atmega32 and a few others not the 328. my mistake and newness to the world of atmega. i assumed and one should never assume that atmega32 refered to any chip in the 32 range ie 328. so my question is where can i find a bootloader for the Atmega328 and ENC28J60? or would there be a way to modify the one written for the atmega32 to run on a atmega328?
or would there be a way to modify the one written for the atmega32 to run on a atmega328?
Sure, the differences are not fundamental but they exist and therefore you have to change some code and configuration in the library. I don't have the hardware (ENC28J60) yet, so I cannot test stuff myself.