Monday
Jun012015

Retro Computer: Arduino Pro Mini stuffed in a keyboard

WP_20150325_16_25_02_ProSo, during the Half-Byte Console project, I purchased quite a few PS/2 style PC keyboards.  Since the project is pretty much over, I have a few of these keyboards still. They are actually fairly decent keyboards for the price.  Well, I had envisioned a future Half-Byte Computer living in something like a keyboard, like the old Commodore 64 or Vic 20.  So, I set out to build one.

I wanted to use one of my Half-Byte Console boards, alas, though, it is too big. Since I ordered a truckload of Arduino Mini Pro’s, and they are really small, I used one of them.

The first thing I had to do was figure out what I wanted in this thing and where to put the parts.WP_20150325_15_44_57_Pro

I grabbed one of the keyboards and took it apart. It is really simple, a standard membrane matrix with full travel keys.  However, even though it is a full size keyboard. there isn’t much room inside.  However, there’s enough for the mini pro, wires and not much else.  I had to cut holes for the power connector and video out.

WP_20150325_15_44_49_ProWhat I was not going to do this iteration was include sound, nunchuck or FTDI connectors.  That can all come later. I’m putting HB Tiny Basic  on the this one, so I won’t need to be programming it often. The nunchuck will be easy enough to add later, as will sound. Just not that industrious at the moment.

I cut the cable from the keyboard as the pc board inside is marked and easily accessible.  I wired it directly to the pro mini: data to pin 5 and clock to pin 4.

I decided to put the video jack on the left side,  but first had to cut a hole for the connector.WP_20150325_16_24_37_Pro  Next, I put the power jack on the bottom, where the keyboard’s cable came out. I had to enlarge that opening and super glue the connector.  Next, I wired up the video out jack and the two resistors (470 ohm and 1kohm) to the pro mini (470 ohm to pin  9 and 1k to pin 7 see my previous postings on the video out subject.)  Then the power was wired up and I tested the whole thing.  Amazingly, it worked.  It took two attempts at laying out the wire and board to get the case to  go back together and for all of the keys to work.

WP_20150325_16_20_05_ProI now have my true retro computer, complete with Tiny Basic and blocky graphics.  Truly, an awe inspiring device.  Yep. Awe inspiring.

NOTE: yes, the wiring  is a bit sloppy, but I’m no Ben Heckendorn and this was for me.  I will clean it up when I add the other connectors.

Monday
Jun012015

Windows 10, coming July 29…what you need to know

edgenewtabWindows 10. Microsoft’s apology for Windows 8.  Currently in testing and ‘Insider Preview’ modes, the operating system from Redmond now has a date…and a price.  The date? July 29,2015. The price, err prices? $119 for Home and $199 for Pro for consumers who are purchasing the operating system for a system that does not have Windows 7 or Windows 8.1. If it has Windows 8, the user will need to update it to Windows 8.1 (a free upgrade) and THEN to Windows 10.  The $119 would be for people who:

  • built a computer
  • got a computer with no operating system
  • has a computer with Linux or Windows XP
  • An Intel Macintosh that does not have either Windows 8.1 or Windows 7
  • Wants to use it in a virtual machine

These same scenarios also work for PRO. 

You CAN upgrade your tablet or PC to Windows 10, in its first year of release, for free IF you are ALREADY running Windows 7 or Windows 8.1 

Now that we cleared that up…

Here are some things you will LOSE IF you upgrade from Windows 7 and, in some cases, Windows 8.1:

  • Windows Media Center
  • Windows DVD Movie playback (third party applications are not affected, ONLY Microsoft applications, like Windows Media Player and XBox Video will lose the DVD playback. Gabe Aul of Microsoft says A Microsoft alternative ‘may’ arrive later.)
  • Windows 7 desktop gadgets
  • The ability to hold off updates for Windows Home users (pro and Enterprise will have full control)
  • The Windows LIve OneDrive application
  • Solitaire, Minesweeper and Hearts. These have been replaced by Windows Store versions. You will have to download them.

So, Which version will you get? Well if you have…

  • Windows 7 Starter, Windows 7 Home or Home Premium, you get Windows 10 Home. If you have Windows 7 Ultimate or Pro, you get Windows 10 Pro.
  • Windows 8.1, Windows 8.1 with Bing, you get Windows 10 Home. Windows 8.1 Pro and Pro for Students, get Windows 10 Pro.
  • Windows RT…sorry, you get a minor update to RT and that’s it.

How to get the upgrade…

Microsoft has an application that allows you to ‘reserve’ your copy of Windows 10.  You will do so via a dialog box that explains the benefits of the new OS and allows you to enter your email address.  Microsoft will send you an email when the OS becomes available (July 29) and will pre-download the install files for you.  How sweet of them, eh?

This is all great, but will my computer run the new OS?

Yes, if…

  • You are running or capable of running Windows 7 SP1 or Windows 8.1
  • A 1 gigahertz or faster processor
  • At least 1 gigabyte of RAM (2 gigabytes for Windows 10 64bit)
  • At least 16 GB HDD Space for 32 bit, 20 GB HDD Space for 64 bit
  • Direct X 9 or higher and WDDM 1.0 graphics driver and video card
  • Graphics card capable of 1024 by 600 minimum

In addition, your configuration and location will have an affect on features that get installed:

  • Cortana is only available in the US, UK, China, France, Italy, Germany and Spain at the time of this writing
  • Windows Hello requires special hardware
  • Continuum is for tablets
  • Audio and Video streaming via XBOX Music and Video applications are only available in certain regions
  • Speech recognition will vary by hardware quality
  • Application snapping is resolution dependent
  • A Microsoft account is required for some functionality
  • Secure boot requires UEFI 2.3.1
  • Bitlocker requires TPM 1.2, 2.0 or a USB flash drive
  • Hyper V requires a 64 bit system and an extra 2 GB of RAM
  • Miracast requires a display adapter which supports WDDM 1.3 and a Wi-Fi adapter that supports Wi-Fi direct
  • and more. See Microsoft. com for a more complete list.

There you have it, important things to know about the forthcoming operating system.  I’ll show you some of the new features in upcoming posts.

Tuesday
Mar172015

Coach Wayne Hoy

I have been fortunate enough to have met some truly great and influential people in my life.  People such as Oliver North, Chuck Robb, Richard and Kyle Petty, Ward Burton and Wayne Hoy.  If you are into politics, you know the first two. I had the honor to see Mr. North up close and shake his hand. Mr. Robb I met during a meeting of a handicapped persons advocate group.  Richard and Kyle Petty, of NASCAR fame, I met at a visit to Victory Junction Gang Camp and Mr. Burton, another NASCAR driver, I met at a race.

And, then, there is Coach Hoy.

This is a man who not only rose above those five gentlemen, he was, truly, a very special person who touched many lives. Now, you may not have heard of him, and that’s OK. Coach Hoy was a teacher at Douglas S. Freeman High School in Henrico County, Virginia.

Mr. Hoy, who was a coach at that High School as well as a physics teacher, was one of those rare people who, no matter what was thrown at him, manage to smile, tell a joke and make you feel good.  And, he was thrown many curve balls. 

He had diabetes that pretty much took over his body and slowly killed him. It cost him, at first, a foot and then part of a leg, much of his sight, his kidneys and put him on dialysis. Ultimately, coach paid the ultimate price.

Before all of that, however, he was a very active man.  A Mason-a clown, to be specific, he was one of the most honorable people I have ever met. He rarely, if ever, said an unkind word about anybody and whenever I needed advice, I knew exactly who to go to.  As did most people.

Because he taught, he touched many lives and people never forgot him.  I’m telling you, the man could anywhere on the planet and meet someone he taught or worked with or just knew.  ANYWHERE.  And, those people treated him with the utmost respect.  His son is very much like him in this and many other respects.

As we come up on the eighth anniversary of his death, I have thought, quite a bit, about what we lost.  The coach was my father in law but I always considered him my second dad.  I miss our talks, his jokes (and, yes, those dreadful cornball jokes too) and his advice. I could always count on him giving me sound advice.

Most of all, however, I just miss him. 

Sunday
Mar152015

PROGMEM issues with Arduino 1.6.x and how to fix them

WP_20140826_22_20_46_ProThere is a new version of the Arduino IDE out, version 1.6.1. If you do not have, you can go to the Arduino web site and grab yourself a copy.  It is much faster than the older versions.  Overall, it seems to be better in most aspects. Except for one…the new compiler breaks some of your code.

I installed it and then tried to compile Half-Byte Tiny Basic.  Expecting a clean compile, I was surprised by the errors it generated.  Upon investigation, I found that the references to PROGMEM was the cuprit. Further research revealed a fairly easy remedy, but one that was difficult to find, so I thought I’d make it easier.

Error:  variable 'message' must be const in order to be put into read-only section by means of '__attribute__((progmem))

So, this was the first error, which led to a second error that isn’t really an error (it goes away when you fix this) so I’m not going to talk about it, it is one that is safe to ignore.  Now, simply changing ‘Static’ to ‘Const’ does not actually fix the problem. No, like the error says, you need to specify the SECTION to put it in.  Look at the old way below, then check out the new way.

OLD WAY:
/***********************************************************/
// Keyword table and constants - the last character has 0x80 added to it
static unsigned char keywords[] PROGMEM = {
'L','I','S','T'+0x80,
'L','O','A','D'+0x80,
'N','E','W'+0x80,
'R','U','N'+0x80,
'S','A','V','E'+0x80,
....
'S','C','R','O','L','L'+0x80,
0
};
NEW WAY:
/***********************************************************/
// Keyword table and constants - the last character has 0x80 added to it
static unsigned char __attribute((section(".progmem.data"))) keywords[] = {
'L', 'I', 'S', 'T' + 0x80,
'L', 'O', 'A', 'D' + 0x80,
'N', 'E', 'W' + 0x80,
'R', 'U', 'N' + 0x80,
'S', 'A', 'V', 'E' + 0x80,
...
'S','C','R','O','L','L'+0x80,
0
};

Fixing this killed the second error that was showing up.  BUT…

ANOTHER error (third overall) reared its head:

Error: <variable> causes a section type conflict with <section>

Specifying the attribute did the trick, simply using PROGMEM causes issues. While the original error went away (along with that secondary error), the section type error appeared.  This one, though, was simple. I was stuffing two TYPES into the same section and that is a no-no in the new world.  Just adding the code below AND specifying a different section of PROGMEM did the trick. This way allows you to segment your data as well.

// Workaround for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734
‪#‎ifdef‬ PROGMEM
‪#‎undef‬ PROGMEM
‪#‎define‬ PROGMEM __attribute__((section(".progmem.vars")))
‪#‎endif‬

Once I made these changes, my code compiled and uploaded just fine.  I hope this saves you some time.

Sunday
Mar152015

PS/2 Keyboard and Video Out support for Arduino UNO and compatibles (and the Half-Byte Console)

While this information is readily available on the Internet, I have, nonetheless, received requests on how to do this. The most recent was from Dave in the form of a question on a post about Tiny Basic.  So, I thought I’d write a post-with pictures-on how to connect these things to your UNO or compatible.

PS/2 Keyboard

Connecting the keyboard was a challenge for as I have dsylexia. See! Anyway, I had the hardest time figuring out how to wire up a PS/2 keyboard connector, but, I did and here’s how you can too!

WP_20150315_00_11_58_ProPINOUTS
  • Pin 1 to Pin 5 on chip (ATMEGA 328)
  • Pin 2 to GND
  • Pin 3 to Pin 4 on chip (ATMEGA 328)
  • Pin 5 to +5

Click on the image to see the PS/2 Keyboard connector from the BOTTOM. Pin 1 is on the right, pin 2 above it, pin 3 to the left, pin 4 to the left, pin 5 to the left and pin 6 to the left and down.

VIDEO

Video and mono audio can also be achieved.  Video is generated by soldering two resistors together on one end and then connecting the other ends to different pins on the chip.  Audio imagecomes directly from pin 11 on the 328 chip. Refer to the diagram.  For UNO and compatibles, you will need a 1k Ohm resistor connected to pin 9 for the sync signal and a 470 ohm resistor connected to pin 7 for the video itself. Software controls the actual generation of the signal.  The other ends of the resistors should be soldered together and form the composite video and goes to the center pin of the video connector. The other (or outer) pin of the video connector goes to ground. 

AUDIO

Audio is also generated by software and consists of Atari Pong style beeps.  Connect the center pin of the audio connector to pin 11 of the chip and the ground to the outer shell or other pin of the audio connector.

Libraries

You need the following libraries:

  • TVOUT (Google has announced that they are shutting down google code, so grab this while you can. I do not know where it will end up.)