Picoscope Beta for Linux

Picoscope for Linux

Tux logo by Larry Ewing, Simon Budig, Anja Gerwinski

I’ve been a big fan of Picotech’s USB connected PC oscilloscopes ever since I purchased my first PicoScope 2204 almost two years ago. I liked the compact form factor on my desk a lot, and the powerful Picoscope software for Windows – Picotech makes only one version of this software so you get the same functionality with a £159 ($260) 2204 scope as a £5,995 ($9,900) PicoScope 6407 user would – although of course the scope features would be wildly different.

Now Picoscope is a great piece of Windows software and as I generally use Win7 to avoid reboots every time I want to use Photoshop or play a session of Mass Effect, it’s been perfect for me. However, quite a few of electronics enthusiasts are also big advocates of open software movement, and while Picotech has had drivers and SDK for Linux for a while to implement things like my realtime composite decoder, the fact that there is no Linux version of the oscilloscope software has been unfortunate. So when I noticed in the latest Picotech newsletter that there is now a beta of Picoscope for Linux, I knew I had to take it for a spin.

Installing Picoscope on Linux Mint 15

Picotech’s installation process is built on apt packaging system, so a Debian-based Linux distro is the easiest installation target. This includes the wildly popular Ubuntu and Linux Mint distros, which means mainstream Linux users are well catered to. In Picotech forums, the beta thread had at least one user who extracted necessary stuff from the .deb packages and installed the software for Fedora, too.

In Debian-based Mint, the installation went without any hiccups just by following the instructions at Picotech’s Linux Drivers page. Note that sudo apt-get install picoscope also installs all drivers so you don’t need to install your model-specific driver separately. Essentially the installation is just:

sudo echo deb http://labs.picotech.com/debian picoscope main >> /etc/apt/sources.list
wget -O - http://labs.picotech.com/debian/dists/picoscope/Release.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install picoscope

Continue reading Picoscope Beta for Linux

Unzip Library for C

Christmas holidays are a wonderful time to invent new projects. I decided I’d do some desktop coding for a change, and try to code an optimized image viewer for my old zipped pocket camera photos. First task of course was to read a zip file.

To my surprise, there wasn’t a “GNU standard library” available for this task like there is zlib for general compression, or libjpeg and libpng for images. Best match for my simple needs seemed to be Minizip, but at 7378 lines of code, and 2125 for just unzip.c (utilizing zlib so basically just file handling), I was not convinced, especially because I knew I had some very specific requirements to cater for (namely uncompressing all JPEGs to memory for fast rendering and thumbnail generation).

Zip File Structure – The Essentials

The ZIP file format turned out to be surprisingly simple, especially since I decided I would be sticking to bare essentials and skipping zip64 support, encryption, multifile zips, and all other compression methods than “store” (no compression) and “deflate” (easily decompressed with zlib, see below). Even with barebones setup, my zip routines would handle about 99.9 % of zips out there just fine.

Drawing on excellent ZIP format documentation from InfoZip’s latest appnote, the file structure I needed to parse seemed to have the following structure:

  • Local file header 1
  • File data 1
  • Data descriptor 1
  • Local file header N
  • File data N
  • Data descriptor N
  • … optional decryption / extra stuff …
  • Central directory
  • … zip64-specific extra stuff …
  • End of central directory record

Continue reading Unzip Library for C

HHKB Professional 2 Keyboard Review

HHKB Professional 2

The keyboard is something that I use daily, and whether I’m writing e-mails or coding, I’ll likely do several hours of typing a day. Last summer when I switched to US layout in coding and started using Vim, I started thinking that maybe I should upgrade my seven year old Logitech keyboard to something hopefully better. And when I get such a project, I did what I always do: Went totally overkill with research and ended up spending a few hundred euros once I had made up my mind on the “most optimal choice” for me. :)

Update: If you’re interested in this review, you might want to check out my continuation with the Topre Realforce 88UB.

Keyboards: 101

My worldview after 2000 was essentially that laptop type flat keyboards are the way of the future, and keyboard choice mainly depends on whether you buy a Logitech or Microsoft one, and do you get the top of the line model or an OEM version for 15 euros. Enter Geekhack and some interesting discussions at Stack exchange, and it quickly became apparent that there is more to it.

First choice one needs to make is the layout of the keyboard. Kinesis makes some weird looking ones that some people swear by, and there are matrix-type layouts, I decided I would continue to risk carpal tunnel syndrome with a “normal” layout for the time being, as I don’t want to optimize my brain for a keyboard type that would only be available at home.
Continue reading HHKB Professional 2 Keyboard Review

Vim Colorschemes with Putty aka. GUI vs. xterm-color256

256 color Vim in Putty

I made a big step in coding geekdom this summer by upgrading the most low-level part of my programming workflow. It started when I got frustrated with Mac keyboard shortcuts on Scandinavian keyboard layout (they Just Don’t Work for most apps), and switched to US layout in coding. Once I made that transition, I started thinking that maybe I could improve my coding speed a bit more, and see what all the fuzz is about Vim.

The greatness of Vim in coding comes from the fact that Vim has separate modes for editing text, and navigating around. While not editing, all normal keys become powerful commands, and you can do text manipulation like duplicating lines, indenting sections etc. without ever leaving this “normal mode”.

Well, Vim is great, but an additional bonus to its power is the fact that almost every *nix system has it preinstalled. So even if I’m not on my own computer, I can just launch an SSH client and use Vim to edit the piece of code I’m working on. No need to compromise. Except color schemes, which I just couldn’t get working over Putty. Today I solved that puzzle after one and half hours of googling, and thought to share the findings, maybe someone will find this the next time they face the problem.
Continue reading Vim Colorschemes with Putty aka. GUI vs. xterm-color256

A bit of audio tinkering

I’ve been quite busy the last two weekends, first on a weekend holiday trip to Tallinn, Estonia, and then playing in the Helsinki Casual go tournament which successfully took most of my time last weekend. This has somewhat delayed my continuation to the composite video decoder project.

However, I haven’t been resting on my laurels completely even electronics-wise. My trip to Tallinn had one good by-product, namely new Audiotechnica ATH-M50 headphones. They are a marked improvement over my previous HD-500 Sennheisers, and got me inspired to getting a headphone amp, a tube-based Little Dot mkIII to be more exact. The 32 ohm ATHs don’t necessarily need an amp, but now I’ll at least be prepared if I ever end up getting something like HD-650s.

While researching for a proper USB DAC I came across an amazing audio blog by NwAvGuy. Compared to a lot of “audiophile” coverage he seems to have a solid engineering perspective to audio issues, and he has put an amazing effort to long articles that deal with many issues that surround headphone amp gear.

In addition to great scientific info, NwAvGuy has also designed a USB DAC called ODAC, which I ordered from Head’n’Hifi (they conveniently ship inside EU so no customs). And while I was at it, I couldn’t resist getting a DIY version of NwAvGuy’s O2 headphone amplifier. Read on for my experiences on building it and pitting it against the Little Dot mkIII tube amp.
Continue reading A bit of audio tinkering

Donations, ATtiny2313 Breadboard Headers Left

In case anyone missed it the first time around, there are codeandlife.com ATtiny2313 breadboard headers still available for donations that exceed $10 ($10.01, $15, etc.) to the blog. If you want one, please send me an e-mail (jokkebk at codeandlife.com) with your postal address after donating, and I’ll ship one of these cuties to you as a small thanks!

All proceeds from the PayPal donations will go towards acquiring new interesting stuff to write about in this blog, so if you like the content, please consider donating!

Picotech sponsorship & Site updates

I have some great news regarding the site. As long time readers probably remember, I’ve done several hacks with my Picoscope 2204 in the past, including a $5 logic analyzer and the latest composite video decoding article. Since I really like their product, I contacted Picotech and asked if they would be interested in working together more closely.

To my delight, the friendly people at Picotech had also noticed the hacks and agreed to sponsor the Code and Life with the extremely capable Picoscope 3206B. In return, I’ve added a “Sponsored by” box to the right which features Picotech and their Picoscope products, and will continue to feature Picoscope-related stuff in the future, and they’ll also have the permission to use those articles on their own. My warmest thanks to Picotech for their donation!

The first concrete result of the new, beefier 200 MHz scope is that I was able to redo many of the measurements in my Raspberry Pi GPIO benchmark. While excellent otherwise, my older Picoscope 2204 with 10 MHz bandwith and 100 MS/s sampling rate was not capable of analyzing the 14-22 MHz waveforms generated by the Pi very accurately, while this was no problem for the 3206B which has 10x the maximum sampling rate: See Benchmarking Raspberry Pi GPIO Speed for details!

Now that I have a scope with more buffer memory, I’m also going to revisit the composite video decoding and see if I can get full resolution, maybe even colors out of my Raspberry Pi composite output using the 3206B. After I get some experience with the new scope, I’ll likely do a review similar to my previous Picoscope 2204 review.

New look for the blog (and sorry for any hiccups)

I’ve wanted a more unique look to the blog for quite some while now, but hadn’t found any creative talent to help me with the process. Luckily I heard about Freelancer.com, and used their service to find a designer to help me with the process.

AFter some consultation, plus 10 hours of my work time to convert the design from Photoshop file to HTML and CSS, and then another 10 hours learning to transform that into a WordPress theme, I now believe I’m more or less ready to roll out the new look.

There may be some hiccups for a few hours at most while I’m testing the theme, and the look may revert back to Suffusion while I iron out any remaining issues. Sorry for that.

On electronics front, expect some new material rather soon – the blog design work has taken my time for the last two weeks, but I should have two very interesting projects to announce quite shortly!