GenPIC Second Code Release

A minor code revision as I slowly get everything working properly. I am adding new modules as I need them for other projects.

GenPIC Processor
The microprocessor on a GenPIC PCB assembly
The latest GenPIC deployed will be a coolant valve controller that allows remote control of some glycol valves in the AO bench. It is a pretty simple device, just four relays with some automatic timing rules and a serial control interface.

In the process I added support for the service connectors including parallel and simple serial modules to the GenPIC code base, may as well release it. Thus you get code release 0.2…

GenPIC Code 0.2

Along with the new modules I removed the copyright notices that I had left in the code, replacing them with a Creative Commons Attribution-ShareAlike 4.0 (CC BY-SA 4.0) license, just something I overlooked when releasing everything as open source.

Next up will probably be SD card support, I have a project that needs to be finished requiring some reasonable data storage. Just ordered a few micro-SD card breakout boards from SparkFun

GenPIC First Code Release

I have had hardware for a while now, it is about time I release some firmware that actually runs it.

GenPIC Development Setup
The development setup in use generating the first software release for the GenPIC utility PCB
Here it is!

The first GenPIC code revision is a test and demonstration release. It contains support for one serial port, an LCD character display, user input including the encoder and pushbuttons, the indicator LED’s, timer generation, analog input including onboard temperature readout.

Also included is a serial command interpreter implementing a serial interface usable with any serial terminal. There is also a user interface system with a state setup that provides multiple input screens. This should handle a wide array of basic control capabilities, either using the serial port or through using the LCD screen and the encoder.

The code allows you to exercise many of the basic functions of the hardware and provide a framework on which a real application can be built.

It works, it runs, it looks fairly good. Now time to make something useful with it…

First code release
11Feb2017
Code Rev0.1

There will be additional code releases as this project continues, as always check the GenPIC main post for the latest!

Taming a Rotary Encoder

The rotary encoder is a popular input device for many microcontroller devices. A knob that can be used to increase or decrease a setting with a nice tactile click for each increment. You can even get an integral pushbutton, just rotate for the setting then press the same knob to enter. With some clever programming you can create a one device user interface using only the encoder.

GenPIC Development Setup
The development setup in use generating the first software release for the GenPIC utility PCB

I have integrated a rotary encoder in the GenPIC utility board. With the combination of an LCD display and the rotary encoder you have all the ingredients for a functional user interface arranged neatly for a panel mount unit.

In the past I have simply set an interrupt to fire on the edge of one channel, then sampled the opposite channel to detect the direction. With the addition of a small delay to debounce the result. This worked well in previous devices, but this time I encountered trouble, the direction sampling was erratic, the value going up when it should have gone down and vice-versa.

Breaking out my logic analyser I found out why, this particular encoder proved to be somewhat noisier than I had seen in the past, with notable periods of bouncing signals.

Continue reading “Taming a Rotary Encoder”

Some Blog Changes Coming

You may have noticed that DarkerView got hacked back in late March. Somehow malicious files were inserted that sent search traffic to various less than reputable websites, of course that means mostly sex sites. Sorry about that.

GyPSy in the Night
The 11″ NexStar GPS telescope, GyPSy set up at Ka’Ohe
Only search traffic was affected, those who went directly to the site saw the correct webpage, thus I did not notice right away as I use direct links. As a side note, getting hacked does result in a huge spike in traffic volume, that was the first sign. This sort of hack is apparently called conditional redirect hack, essentially borrowing a reputable website’s reputation with the search engines to send traffic towards certain websites.

As a result I have been tightening up security around here. Removing some old plugins, changing things around and checking for known vulnerabilities. One thing you will soon see is that the old theme will be replaced for an entirely new look for DarkerView.

The old theme is just that… old. Also probably insecure as there has been no maintenance on it in years. As I really do not know how the attacker got in I need to look to everything that could have been the weakness. Time to update the look and update the code to something that is modern and supported.