Yet another crazy idea, I know.
These crazy ideas are the result of me having no money for things so I always seek for alternatives and make improvizations.
I cannot find a programming device for my ATMEGA8 in my country. The programming devices are pretty expensive. On eBay, they're cheap, but eBay is not an option for me because I don't have a credit card or a job.
I was thinking about using my ATXMEGA128A1 to program ATMEGA8 by connecting XMEGA's SPI pins to ATMEGA's ISP pins.
I tried Google searching for an XMEGA programmer's source code where XMEGA is NOT the one being programmed, but THE programmer! But Google is never precise in what I want, but only in what's relevant.
That's how I couldn't find an XMEGA version of anything USBasp-ish.
Then I decided to write my own code. Here's my idea:
The upload from the program goes from an MFC program for Windows that I make that sends user's hex file via USB-UART to XMEGA. XMEGA processes it and sends instructions via SPI to ATMEGA'S ISP to flash bytes on addresses.
I tried to search for some documentation on how ISP works and found none. Which byte goes when and how to access certain registers.
Is there any documentation about ISP programming and is there a programmer written in XMEGA's assembler with XMEGA's registers and not ATMEGA's?