The K8055M Open Source Project is at this point emulating everything, the original PIC16C745 did. So far, so good.
I would like to get input and collect some kind of feature wish list. Having an 18F PIC running on the board is like having a hybrid. It is still a USB interface board. But it is also a microcontroller experiment board. So we could offload parts of some complex tasks, that are impossible to implement via HID USB protocol, more or less to the PIC.
The following wish list will be updated, as this thread progresses.
[ul][li]Use Digital Input as frequency counter
At this point, the main loop of the PIC is still capable of running in under 100 microseconds. This means it can reliably maintain counters at up to 2 kHz speed. The problem is that this causes a flood of HID protocol packets, that are relatively useless. I propose to be able to switch a digital channel to a different mode, where it stops reporting on/off status changes and its “counter” represents the current frequency in Hz. This frequency will be counted inside the PIC and reported to the PC every second.
[/li]
[li]Use Digital Output to control a standard servo motor
Standard Servo Motors, like those used in hobby RC models, use a PWM protocol to control their angular position. A pulse between 1.0 and 2.0 milliseconds long, send up to 40 times per second, represents “full counter clockwise” to “full clockwise”. With the HID USB communication it is impossible to switch the ports fast enough to do that.
[/li]
[li]Register a callback function to signal input state changes
In the current implementation, the application has to call k8055m_poll() or read inputs in timed intervals to notice input state changes. Add the ability to register a callback function that the library will call, whenever any input state data has changed.
[/li]
[li]Saving power-up and reset default settings
The 256 bytes of EEprom memory should be more than enough to store all configuration settings and output values and use them at power on and when the reset command is issued. Since the data sheet claims that the EEprom area is only good for about one million write cycles, it is not a good idea to automatically store the information on every change of a port setting. An explicit API function k8055m_save_config() would be more appropriate.[/li][/ul]