Finally got Crystal-Free USB working. I'm using the stock USB HID Keyboard demo from the June 15, 2013 edition of Microchip Libraries for Applications (MLA). On my PC, with the MLA folder installed at root level of C:\, it's the folder:
C:\microchip_solutions_v2013-06-15\USB\Device - HID - Keyboard
I use the PICDEM_FSUSB_K50 configuration and C18 (not XC8) compiler. Microchip's excellent online ticket support pointed me to this folder and helped me find an evaluation copy of C18.
Instead of searching for the schematic of the target board, it was actually faster to just read the source code and infer the schematic. I skimmed it quickly, and replicated LED1, LED2, LED3, and LED4 at RD0, RD1, RD2, and RD3, respectively, as well as SW2 on RB4 and SW3 on RB5. There is also a potentiometer that I ignored. It turned out though that only two of the LEDs and one of the switches are used, so I could've breadboarded less had I waited and read more of the code. The potentiometer that I ignored is not used in this demo, so ignoring it was correct.
I have not changed the code at all, but running the stock code on my breadboard has convinced me that Crystal-Free USB really does work. I also now have a starting point from which to make software changes.
The circuit is bus-powered. For now, I make use of a USB connector breakout board from SparkFun (the small red board into which I plug the cable).
The demo code emits a keyboard key everytime SW3 is pressed. It sends 'a' the first time, then 'b', then 'c', etc. Here's a video... Look, Ma, No Crystals!
Instead of searching for the schematic of the target board, it was actually faster to just read the source code and infer the schematic. I skimmed it quickly, and replicated LED1, LED2, LED3, and LED4 at RD0, RD1, RD2, and RD3, respectively, as well as SW2 on RB4 and SW3 on RB5. There is also a potentiometer that I ignored. It turned out though that only two of the LEDs and one of the switches are used, so I could've breadboarded less had I waited and read more of the code. The potentiometer that I ignored is not used in this demo, so ignoring it was correct.
I have not changed the code at all, but running the stock code on my breadboard has convinced me that Crystal-Free USB really does work. I also now have a starting point from which to make software changes.
The circuit is bus-powered. For now, I make use of a USB connector breakout board from SparkFun (the small red board into which I plug the cable).
The demo code emits a keyboard key everytime SW3 is pressed. It sends 'a' the first time, then 'b', then 'c', etc. Here's a video... Look, Ma, No Crystals!
RSS Feed