Generic HIDmaker FS Sample Projects:
Exactly As Generated

Instructions

The sample projects that you can download from this page are all generic: they don't try to read any buttons or do any other I/O that would be specific to a particular PC board. They should be able to run on any properly-working demo board that is compatible with the PIC18F4550 family, such as the Microchip PicDem USB FS board, the PicProto USB or the new Lab-XUSB board from microEngineering Labs. You can even use an older Microchip PicDem USB board, originally designed for the low speed PIC16C765 family, but which has been suitably modified for use at full speed with the PIC18F4550 family. (Click here for instructions on how to modify a low speed Microchip PicDem USB board for full speed use.)

 
AryTst (246 KB) Demonstrates arrays and Buffered Bytes
BigRpt (247 KB) 320-byte Input Report. (Hey, that's big for a PIC!)
Feature (245 KB) Uses bi-directional Feature Reports
Variety (248 KB) Uses a variety of data item sizes
BInOut (245 KB) This is a HIDmaker FS "Composite" device type: two HID Interfaces, each with its own Input and Output Reports
SoftD (245 KB) This is a HIDmaker FS "Soft Detach" device type: when PC sends an Output Report, device disconnects and reconnects in a new Identity. PC program can talk to either Identity.

Each sample project is a WinZip file that contains a PIC18F4550 family HEX file, a matching PC side EXE file, and a small text file with instructions. The HEX file for the PIC has been compiled for a PIC18F4550 processor with a 20 MHz crystal, with configuration bits set to run the MCU at 20 MHz. Use your device programmer or ICD to program a device in a demo board, and run the peripheral by connecting the USB cable to your board. (Depending on which version of Windows you have, there might be some delay the first time you run the project, while Windows adds the device to its database.) Then, once you are sure that Windows has successfully recognized your device, run the matching PC side program.

These Generic project files are compiled and provided exactly the way HIDmaker FS has generated them: NO hand edits have been applied at all! This means that you have the chance to see exactly what HIDmaker generates, in runnable form.

 

Things You Should Notice:

All the capabilities that we point out on this page are standard features of all HIDmaker FS projects. You do not need to do any work or add any extra code.

HIDmaker FS generates complete, runnable programs on both the PC and peripheral sides.
You can test your HIDmaker project right away, to verify that your connection works, without having to do any extra work.

No silent failures.
HIDmaker FS creates programs that always tell the truth. If your peripheral device has been disconnected or malfunctions, the PC program knows this, and tells the end user. It will not give misleading information.

HIDmaker FS generates programs that MULTITASK.
Even the peripheral knows how to do multiple tasks at once, so it is always responsive, never "busy" or locked up.

You can send and receive data in any order, any number of times, and the device never deadlocks.
Most of those "demo programs" you see in books, compiler examples, and on the web, will fail this test. Either they lock up as soon as you try to send data twice in succession, or they tell you that the data is going in and out when it's actually not.

Both the PC and peripheral device automatically understand your data.
HIDmaker FS's programs don't just give you raw buffers of bytes, that you have to load and unload and figure out what to do with. Instead, both programs are given convenient sized variables whose names are the names you gave them in HIDmaker FS's Visual Data Designer. This makes you more productive, and your project more reliable.

Reports can contain variables of a wide range of sizes.
Simple data items can range anywhere between 1 bit and 32 bits in size. (Need a 13-bit data item? No problem!) Arrays of variables can have 8-bit, 16-bit, 24-bit, or 32-bit data items. They are automatically packed and unpacked by HIDmaker FS's code at each end. These data items are described to, and understood by, the PC host. They can be read or written by any program that needs to. This is a crucial test of a good USB HID class device.

Data Reports can be much larger than a single packet.
You can define your Input, Output, or Feature data without having to worry about whether they will fit into a single packet. HIDmaker FS packetizes the data for you, completely automatically.

The PC program is matched to your device.
If you try to run the PC program without attaching your device, the program knows this, and prompts you to connect your device. (You can change this behavior in the generated PC source code if you want, but the intelligence to find your specific device is built in.)

 

Things You Should Try:

Try a surprise disconnection.
Run the PC and peripheral programs for awhile, and check the "Update Continuously" checkbox, to make the PC program send and receive data over and over. Now, while this is happening, suddenly disconnect the USB cable from the device. You'll see that the PC immediately knows that your device has been disconnected: it stops sending and receiving data, and tells you that your device has been disconnected.

Then, reconnect your device again.
The PC program will notice that your device has been reconnected, and will tell you so. You can now check the "Update Continuously" checkbox, to resume talking to your device over the USB.

Try running two instances of the PC program at the same time.
You'll see that each program can talk to your peripheral device, and each one can send and receive data in any order, without ever deadlocking the device. Each PC program has its own independent conversation with the peripheral device.

Try connecting two identical HIDmaker FS peripheral devices at the same time.
If you happen to have a second demo board, try programming the same HIDmaker HEX file into a processor on a second board. Then, plug that second board into the PC as well. The PC will recognize and talk to both devices at the same time, yet always know which one is which. You can disconnect one, but the PC can still talk to the remaining peripheral.

 

 

Order Now!