Serial and Parallel ports are becoming less and less common on modern PC’s. Especially, the parallel port was very handy to control something with a PC.
Because of this, I’m now experimenting with USB and a Microchip PIC18F4550, using a 4Mhz crystal.
Problem with USB is that writing USB firmware is rather complex. Microchip has published an USB stack which is written in C. But I prefer USB firmware where (1) I can understand how it works and (2) I can create an HEX file by using my Debian GNU/Linux PC.
I’ve found very interesting firmware written in assembler, but trying to assemble it with gpasm gives a lot of errors :(
Lucky enough, I found this thread where Ben Dugan has ported lab2.asm to work with gpasm. After a few modifications, it worked perfectly with the PIC18F4550/4Mhz :) Thanks Ben!
You can download my lab2/PIC18F4550/4Mhz/gpasm source here.
I have also modified the original lab4 found at http://pe.ece.olin.edu/ece/projects.html to work with gpasm. You can download this modified lab4 here. You can compile the pc-files of the original lab4 with “gcc -l usb”.