On Wed, 16 Jun 2004 16:40:10 +0100, "Alan B. Pearce" wrote: >>I notice that the pic16c745 sells for prices comparable to things >>like the FTDI chip. Open source code for turning a 16c745 into a >>general purpose USB IO device would probably be pretty useful, even >>if it isn't available as a flash device. > >As others have already pointed out, the code to get a 16C745 to do these >things is already available on the Microchip website. Be careful using the USB code that Microchip supplies. I haven't checked yet to see if there's a later version available but the version 1.22 usb_ch9.asm code has a skip instruction immediately preceding a 'pagesel CmpLowerByte' directive. Skipping one of the two PCLATH bit operations threw me off into the wrong page. I just got bitten by this bug yesterday. The MPLAB 6.5 linker put some code in diferent pages than the MPLAB 5.7 had been doing for the past four years. This bug had been masked because the two modules involved had always been located in the same page so that the skipped operation hadn't made any difference. The linker under MPLAB 6.5 also allocates RAM differently than 5.7's linker does. You can't be certain you'll get the same checksums from the same source code when you upgrade from MPLAB 5.7 to the 6.5 version. Regards, Bob -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics