> From: piclist-bounces@mit.edu > [mailto:piclist-bounces@mit.edu] On Behalf Of Hector Martin > > Here's the little project I've been working on lately. This > is my first 18F project, a pressure sensitive (strain gage) > based DDR dancepad (basically a gamepad), with USB, Xbox > (crippled USB), and PS2 interfaces. Mainly, I've modified > Bradley A. Minch's driver, and made it pure asm code > (no structured macros, which were upsetting gpasm). > > http://www.marcansoft.com/subidos/sdgp.zip > I tried this with MPLAB and it is interesting to see there are some subtle differences between MPASM and gpasm. I need to make the following changes so that I can build it under MPLAB 7.22. 1) unix2dos all the asm files and inc files, get p18cxxx.inc from gputils. 2) MPASM will still fail to assemble main.asm and usb.asm. It will fail on those lines like the following: PSETUP_RTW banksel BUFFER_DESCRIPTORS It needs to be changed to two lines. PSETUP_RTW banksel BUFFER_DESCRIPTORS 3) MPASM also fails on the following line in usb.asm movf USB_BUFFER + wValue +1,W ; update new idle rate value I have to define a new label as wValue_plus_1 (as 0x03) and then it works. movf USB_BUFFER+wValue_plus_1,W; update new idle rate value 4) "clrw" in main.asm needs to be changed to "clrf WREG". After all this changes, both MPLAB and gputils will be happy. By the way, MPLAB 7.30/7.31 will have problem with the configuration word in main.asm. _BORV_43_2L will need to be changed to _BORV_3_2L for MPLAB 7.30/7.31. Regards, Xiaofan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist