Running the K8048 with an USB-to-serial adapter using cygwin

After installing and running k8048 on different laptops and with different USB-to-Serial adapters under Linux (Mint), I decided to give it a try on the only laptop I have left with a Windows OS.
The laptop is an overhauled HP DV2085 running Vista. Because I use Linux 99.999% of the time and procedures differ “slightly” from MS, I will give some details every now and then.

To start, cygwin has to be installed. The program can be found at http://www.cygwin.com
Just download the 32-bit or 64-bit version (setup-x86.exe or setup-x86_64.exe) and start the installer.

  • select under “Choose A Download Source” - “Install from Internet
  • select under “Select Root Install Directory” - “C:\cygwin
  • select under “Select Local Package Directory” - “C:\Users-your windows username-\Downloads
  • select under “Select Your Internet Connection” - “Direct Connection” (most common)
  • select under “Choose A Download Site” - a site most close to you p.e. “ftp://ftp.snp.utwente.nl

Download starts

  • search under “Select Packages” in the searchbox for:
    gcc
    and click on the + in front of “Devel”, left-click on “Default” to change it to “Install

  • search in the searchbox for:
    make
    click on the + in front of “Devel”, left-click on “Default” to change it to “install

  • search in the searchbox for:
    wget
    click on the + in front of “Web”, left-click on "Default to change it to “install

  • search in the searchbox for:
    vim
    click on the + in front of Editors, left-click on "Default to change it to “install

  • Click on “Next” to complete the installation.
    copy the cygwin “setup.exe”-file to C:\Cygwin\SYSINSTALL for later use (p.e. to install other packages)

Start cygwin (under programs)

Get the program k8048 by typing in the cygwin-window:
wget -q dev.kewl.org/k8048/k8048-2.17.tar.gz

Unpack the file by typing:
tar zxf k8048-2.17.tar.gz

Compile the program by typing:
make

Install the program by typing:
make install

Now the configuration file .k8048 has to be made in your cygwin home directory.
Here is one thing to be found out first - where is your USB-to-Serial adapter?

The easiest way to find out is by inserting your USB-2-Serial-adapter in your PC and type in your cygwin window:

“ls /dev/tty” followed by 2 times pressing the TAB-key.

There will be a short list like:
tty ttyS2 ttyS4

Now remove your USB-2-Serial-adapter and press TAB again.
One of the above will be gone (most probably ttyS4)
So now you know where the USB2Ser is.

The config-file for the program can be made as follows by typing in your cygwin window:
vi .k8048
i
DEVICE=/dev/ttyS4
SLEEP=0
BITRULES=0x001F
BUSY=0
press the ESC-key and type:
:wq!

that was it. the program should be installed and able to run

The documentation of the program can be found in C:\cygwin\home\your-windows-accountname\k8048\Doc

To test it quickly:
Take a programmed PIC (in this case a PIC16F627) and blank it by typing in your cygwin window:

k14 select PIC16F627 b

your PIC should be blanked after the cursor returns
instead of “select” a single “s” can be used.

programming a PIC goes as follows (using a demo.hex file)

k14 p demo2.HEX

All usable commands and usable PIC’s are in the documentation

Hope this little notice helped a littlebit to get your PIC’s programmed with an USB-2-Serial adapter and a K8048-kit

All USB-2-Serial adapters held a low-cost prolific PL2303 chip
The programs were tried on a HP Pavillion DV2000 and an ASUS EeePC
Tested under Linux kali, Mint and Debian

It should be noticed that I have a little trouble getting an i5-4570 working, probably caused by USB-speedproblems.

Berend