Changes to Byte Craft supplied keyboard.c to to create a working example for the CY7C63743 enCoRe chip. I upgraded my compiler to V1.5.1, the most recent as of Nov 19, 2003. I didn't go back and attempt to compile with V1.2.0 which came with the development kit. Be sure to specify the correct files under project preferences, or the linker will fail. Choose Project->New Project, select Project->Properties, and be sure the correct files are entered under the "general" and "linker" tabs. The replacement 1.5.1 library files do not include everything. Had to move the original 1.2.0 port.lib file back into the lib subdirectory. Commented out: There is no port 3 on the encore chips, and port 2 is read-only: //PORT3 = AC | P3_LED_MASK; //PORT3 = PORT3_S; //PORT_WRITE(PORT3,0xf0); //PORT3IE = PORT1IE = PORT0IE = 0; /* disable port interrupts */ //PORT2IE = 0xFF; /* enable port interrupts */ //AC = PORT3_S; There is no register of this type on the encore chips: //GPIO_CONFIG = PORTS_RESISTIVE; //GPIO_CONFIG = NORMAL; //GPIO_CONFIG = NORMAL; There is a problem with the PORT_WRITE macro in port.h on chips that only have 2 ports. This turns out to be a simple error in the port.h file, but I replaced with port_write_port0 anyway. For example: PORT_WRITE(PORT0,0xff); becomes: port_write_PORT0(0xff) Need to add this statement to the source file to enable info that the debugger needs: #pragma option INSTRUCTIONTIMING There is no interrupt vector at this address, so remove: //#pragma vector RESERVED @ 0x0018; Set the device address enable bit in usb_device register on startup: USB_DEVICE_A.DEVICE_ADDRESS_ENABLE=1; Set VREG_ENABLE bit. This is essential for enCoRe parts, or the HUB will not send a USB reset, and enumerate: //Vreg enable: USB_STATUS.6 = 1; This finally made the device enumerate; It was recognized as a keyboard by Windows, you could see it appear and disappear from the Device Manager when it was plugged/unplugged. Removed code that scanned the ports for key presses, etc. port 0 and port 1 configuration settings had to be changed, there is no GPIO_CONFIG register, there are instead two registers for every port: e.g. PORT1MODE0 and PORT1MODE1. The port latch must also be set to a zero or one depending on the desired config: // GPIO_CONFIG = NORMAL; //Set port1 to be resistive pullup PORT1MODE0 = 0x00; PORT1MODE1 = 0xFF; port_write_PORT1 (0xFF); Added simple code to debounce a pushbutton. Made the program send the keycode for 's' key, followed by 0 keycode. If a packet with all zeroes is not sent, the host will think the key is still being held down. The program loops waiting for mode bits to change for endpoint 1, to avoid overwriting the FIFO. ENUM LED is lit when device enumeration is complete ACTIVE LED is lit when the pushbutton is held down still todo ========== Be sure the unit goes into suspend mode properly Make remote wakeup stuff work, set pushbutton I/O line as an interrupt Remove unused variables.