gnupic: Re: 18F pure asm USB HID driver


Previous by date: 16 Feb 2006 04:16:38 +0000 Re: 18F pure asm USB HID driver, Chen Xiao Fan
Next by date: 16 Feb 2006 04:16:38 +0000 Re: [gnupic] [PIC] piklab now supports ICD2 and PICkit 2 programmer under Linux, Scott Dattalo
Previous in thread: 16 Feb 2006 04:16:38 +0000 Re: 18F pure asm USB HID driver, Chen Xiao Fan
Next in thread:

Subject: RE: [PIC]: 18F pure asm USB HID driver
From: "Chen Xiao Fan" ####@####.####
Date: 16 Feb 2006 04:16:38 +0000
Message-Id: <7D4AB72251D4D949AB2732ABEABDA54F130070@PFSG-MX1.ap.p-f.biz>

> From: ####@####.#### 
> ####@####.#### 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

Previous by date: 16 Feb 2006 04:16:38 +0000 Re: 18F pure asm USB HID driver, Chen Xiao Fan
Next by date: 16 Feb 2006 04:16:38 +0000 Re: [gnupic] [PIC] piklab now supports ICD2 and PICkit 2 programmer under Linux, Scott Dattalo
Previous in thread: 16 Feb 2006 04:16:38 +0000 Re: 18F pure asm USB HID driver, Chen Xiao Fan
Next in thread:


Powered by ezmlm-browse 0.20.