Programming the K8055 using Masm32

I received one of Velleman K8055 USB interface board kits recently as a gift. Soldered all the components on her then ran the demo program that came with the software and she checked out perfectly!

I have been an assembly language programmer for some thirty years (Masm being my preferred assembler) and I was wondering if there would be any interest in an example on accessing the K8055 using Masm32?

I have a nice little example I made up for myself to play with the K8055 that shows how easy it is to access the functions within the K8055R.dll file using Masm32. I can supply all source code but you will need to install Steve Hutchinson’s Masm32 package to re-assemble the example source code. Assembled example would be included If you just want to see it in action.

Anyway, I would be happy to share.

Regards,
Bill

Nice to read that you are happy with your K8055.
Sorry, but I doubt that you will get many requests for assembly language routines.

Hi VEL417,

Come on, programming in assembly is easy! . . :wink:

Guess I assumed that the K8055 kit would be popular with computer programmers, no?

When you give a bit of thought to it there are many possibilities for the use of the K8055 when it comes to controlling things. I will no doubt explore those possibilities further.

Regards,
Bill

It used to be :slight_smile:

I never tried it with any x86 family CPU. Last time I wrote Assembler was on BS2000 (370 type Mainframe) and before that 8080 and Z80 on CP/M. I once wrote my own Forth compiler in 8080 Assembler (yeah, I had that much spare time on my hands back then).

Most people around here seem to use things like Visual-this or Visual-that. I seem to be the oddball doing things on FreeBSD, Linux and Windows in plain C (MinGW on Win) and Python.

Absolutely. And there are two projects here that aim at even adding more possibilities by replacing the microcontroller and firmware. Simon’s PCUSB project and my Open8055. As the name suggests Open8055 is completely open source. Firmware, client libraries/modules and demo programs are all on github. All the tools used are free software.

I personally believe that everything on the PC host side can be sufficiently done in languages like C, Python and Tcl/Tk. If you really must do it in Assembler, that’s fine too. But remember that the communication speed between the PC and the card is limited to one USB transaction per millisecond. I can’t even get an Atom-N270 netbook to show significant CPU usage when doing it all in Python.

On the firmware side on the other hand there is IMHO quite some room and good reasons for Assembly. Currently the Open8055 firmware is written entirely in C and compiles with the free Lite version of the MPLab C18 compiler. That Lite version has several optimizer features disabled. The compiler does support inline Assembly. Sooo … you get the picture.

Open8055 is currently in a slightly non-working state. The only thing working is the firmware and the Python demo. The C client library and the network server are out of sync with the latest HID protocol changes. I intend to have them working again next. Unfortunately this is hobby and I am not retired yet.

Replacing the PIC and the firmware opens up a ton of new things since it effectively turns the K8055(N) into a microcontroller programming experiment. One can not only use more advanced features of the newer microcontrollers, one can add completely autonomous behavior to the board. Think robotics. These things don’t really need a USB host to react to sensor input. All you have to do is move the logic from the PC into the PIC. They can then run on a cellphone charger. Or think of a hybrid, where the PC for example controls a motor but the microcontroller enforces that the motor stops when whatever it moves hits an end contact switch (even if the PC crashed in the meantime). As said, a ton of new things.

Have fun with your new toy,
Jan