using the onboaurd 8/16u2 as isp?

Is it possible to use the onboard 8u2 to isp the atmega328/2560?
I imagine all it would need is a nice jumper from the isp of it to the other, snipping the reset line in the jumper
the 8u2 can already reset the 328 like it does with the dtr line right? So why not it be used as a usb->serial/isp
then there would be no need for the bootloader right?

Well, you'd need an ISP to re-write the firmware in the 8U2. You'd also loose serial communication with the USB host unless you could fit both the ArduinoISP sketch and the USB-to-Serial firmware. You would need separate firmware for the 386 and 2560 since the 2560 is too big for the STK500V1 protocol and needs STK500V2.

Aside from all those limitations it would allow you to download sketches without using some of the main processor memory space for a bootloader.

you could fit both the ArduinoISP sketch and the USB-to-Serial firmware.

Can be if the Bootloader section memory allows to fit the USB-to-Serial firmware in it if it allows or intermesh the two programmes which may cause interference, then it can be locked there and then ArduinoISP sketch can be loaded.definitely can't happen on 8u2 though as the ArduinoISP programme itself is 4.5K and i think USB to Serial firmware programme will be quite a heafty one.

The new rev3 have the 16u2 tho right? Preferably id be nice to automatically know if its meant to be talking with isp or serial but I imagine a jumper and a very large if statement could accomadate the two options
unfortunetly I don't know much about the inner workings of either program, but if I knew it was possible it'd be a great learning experience rather than frustrating failure at something impossible,
I think that would be pretty cool tho if it can be done, although the result is only that the main chip doesn't need a bootloader, it would make bootloading another chip very easym much the way you can use the arduino uno board to upload a sketch to a bootloaded 328, except you will be able to put in a fresh 328 and do it all

The new rev3 have the 16u2 tho right?

Yes

it'd be a great learning experience rather than frustrating failure at something impossible,

I do not this any thought in here is impossible its just this that some thoughts need an input far more in depth than other thoughts might need.

result is only that the main chip doesn't need a bootloader

Once we form a programme able to handle the USB to Serial + ArduinoISP then we can even tweak the Arduino ISP programme to deal with other chips so may be the result can be a uno programmer , ehh that is not a big thing but then Learning curve would be there.

However there are many fun stuff activities that can be done if USB to Serial remains on the serial interface chip to handle the basic functionality and then we can think of the rest of the space for something creative ,back some 10-20 days i posted on the similar topic for a guy asking to turn his uno into joystick, i do not remember it that finely today but i remember i posted back to him with a DFU programming stuff, i think that is the starting point along with the study of the Serial Interface chip firmware.

Does it have to be programmed with that dfu thing? Using isp should work just as well right?
I think im gonna attempt to just merge the two and upload and see what happens, basicaly one big if statement dependent on a jumper for now,
Is there the actual c code for the usb serial somewhere? I think the arduino source only has the hex files which is pretty useless to me

Does it have to be programmed with that dfu thing?

DFU stands for Device Firmware Update so it is definitely needed and is the main thing to do here.

basicaly one big if statement dependent on a jumper for now

The Rev.3 has about 4 additional header pins that could be used to read the digital pin's on the 16u2 have gone deep at this sight because back sometime Nick Gammon posted the image and i asked them the same question then Nick said he was thinking about the same thing that what those 4 pins are about in addition to the ICSP ones for 16u2.

this is place >> http://arduino.cc/en/Hacking/DFUProgramming8U2 where to start from. it features the stuff to turn Arduino into a HID with the firmware on the 8/16u2.

But what's with the flip program thing to program thru usb in that, regular isp upload should work right?

This is a great idea. There certainly should be enough extra memory in the 16u2. ArduinoISP will need re-writing to avoid dependency on the Arduino libraries, but that looks eminently doable.

Has anybody managed to compile the USB-to-Serial firmware? I had a quick go using the Arduino tools under Win7, but the makefile needs some modification.

regular isp upload should work right?

ya isp upload will work pretty fine for DFU

Anyone knoe where I can find the c code for the usb part?

OK, here's how to recompile the Uno's usb-to-serial code. It's quite easy, but there are a few gotchas:

  • You'll need WinAVR-20100110. The Arduino IDE tool-chain will not work. Other versions of WinAVR will not work.
  • You'll need LUFA-100807. More recent versions will not work.
  • Look in directory hardware\arduino\firmwares\ of the Arduino IDE v1.0 and copy arduino-usbserial into LUFA's Projects directory
  • Modify LUFA\Projects\arduino-usbserial\Descriptors.c as explained here http://arduino.cc/forum/index.php/topic,72236.msg618992.html#msg618992
  • In LUFA\Projects\arduino-usbserial, run make clean and make

You'll end up with a new file Arduino-usbserial.hex which is identical to the original Arduino-usbserial-uno.hex. This is for the 8U2 chip found on the Uno r1 and r2.

Altering the makefile for the 16U2 chip produces a binary which is not the same as the original Arduino-usbserial-atmega16u2-Uno-Rev3.hex. I haven't worked out why yet.

Is there a resource for the actual c code involved? Something I can actually atempt to modify?

Ummm... I think I already mentioned all the source code. Did I miss anything? ArduinoISP will need converting from "Arduino C" to "WinAVR C" before it can be merged with Usbserial.

Sorry, just alittle confused
the descriptors.c part was confusing me, then I realized real c has multiple files for stuff, not just one file like in the ide
I haven't much experience with c compilers and etc, I think I need to read up a bit before I continue
know any good resources for the general process of making a c program? The whole make and other stuff I don't know yet

know any good resources for the general process of making a c program? The whole make and other stuff I don't know yet

Get the Visual C++ express edition for free from msdn and they have the very best tutorials or educational systems on making you learn any of these c++/c# (if you get c++ then c is already there.)