Search This Blog

Tuesday, February 25, 2014

Hex to Binary JTAG Register Decoder tool

While programming JTAG registers I frequently have to fill out binary bit maps to select settings, and then convert the pattern into a hex number to enter in the JTAG programming tool, or decode a register I read into the component bit pattern to see what mode is set.  There are certainly a lot of ways to get this job done, including the windows calculator and excel.   However most of them clip leading zeros and require counting and grouping the bits..

I wrote a quickie Java program to do the conversions in a clear way that I can just click the 16 bits, all numbered, and view the hex code and vice versa.  I threw in the decimal value readout because that often comes up too.   For example, read a register value and flip bit 10 from 0 to 1 and write the result back in.  This is the tool for that job!

I'm posting the tool on google drive, now that is dead.  This is trial mostly to see if it will work:

Just download and click on it and it should run without any setup, assuming you have basic java JRE installed on your computer, which I think everybody does.


Saturday, February 8, 2014

Ubuntu computer on a USB 3 drive

With the advent of USB3.0 5Gbps thumb drives, it now makes sense to install Ubuntu onto a USB stick and carry it with you.    This is different from putting a live CD install onto a stick, this is actually installing the OS to the stick as if it were a hard drive, and expecting the computer to not be slow as a pig.   Files and settings are all preserved from boot to boot and you can plug it into most computers you encounter and have your stuff with you.

This is valuable to me on business travel.  My company locks down our PCs hard and fills them with corporate spyware.  If I want to do personal business, side business or coding in my spare time I don't want to do it on my work laptop.

However to make this work, there are a couple requirements

  • Need a windows FAT32 partition that is readable by both windows and linux boot.  This is so I can transfer files back and forth when the host machine is booted in windows.   Windows can't read linux file systems.

  • Linux files should be encrypted so that if I lose the stick, all my personal information is not at risk

    This is the USB3.0 stick that I bought.  32Gb is more than enough to have a 16G FAT32 partition for general use and 16G for Ubuntu apps and OS.




Downloaded the Ubuntu Live CD install .iso

Burned it on a regular 4GB USB2.0 stick, since my computer doesn't have a CD drive using

Booted the computer from the install USB.  This requires pressing F11 on my Sony VAIO laptop

Inserted the USB stick and used gpart to partition as follows
First 16GB as FAT32 for windows
Next 2GB as linux-swap
Final 14GB as /ext2

When installing Ubuntu 12 pick "something else" when it asks where to install it.  Chose the USB drive, in my machine it was /sdc.  Name the /ext2 partition / and the linux-swap partition swap


Shut down and remove the USB stick with the install .iso on it, and put in only the new USB3.0 stick.  Boot and press F11.

Ba da bing.  Comes up in Ubuntu with a handy USB stick drive to put files on that a windows machine will be able to see.

Sunday, February 2, 2014

Upgraded PC for video streaming

Upgraded another teen machine in the house.  It is used for web, video streaming and some video game play.   I'm currently using Intel instead of AMD.  They are a little more $$, but they run a lot cooler and I can use the stock fans with no issues.    I've been happy with the performance of the last couple Intel builds.

A decent processor from New Egg or Amazon now, I bought it in December and just now got around to using it...

Intel Core i5-4570 Haswell 3.2GHz LGA 1150 84W Quad-Core Desktop Processor Intel HD Graphics BX80646I54570 
$189 from NewEgg after promo code. $30 cheaper than the i5-4670. 3.2G vs 3.4G. Nobody will notice the difference. 

Upgraded the memory to 8Gb with a fairly low end module. I'm no longer buying Gskill, I've spent too many long hours debugging systems that turned out to have bad memory.
Kingston HyperX Blu 8GB (1x8 GB Module) 1600MHz 240-pin DDR3 Non-ECC CL10 Desktop Memory KHX1600C10D3B1/8G
Gigabyte Z87 LGA 1150 CrossFireX HDMI DVI ATX Motherboard (GA-Z87-D3HP)
1 of: Gigabyte Z87 LGA 1150 CrossFireX HDMI DVI ATX Motherboard (GA-Z87-D3HP) [Personal Computers]
Condition: New
Sold by: LLC

Transferred over the video cards. This machine has two. One for the dual PC screens, and another for the HDMI TV monitor.   The new mobo will allow two full length PCIe video cards.  One of these is a PCIe 1X card.   I'll keep it anyway for now, there are 1x slots on the mobo.

XFX AMD Radeon HD 6770 1GB GDDR3 2DVI/HDMI/DisplayPort PCI-Express Video Card HD677XZAF4;HD-677X-ZAF4
PLACED March 17, 2013
HIS ATI Radeon HD5450 Silence 1 GB DDR3 VGA/ DVI/ DisplayPort Low Profile PCI-Express Video Card H545H1GD1
PLACED March 11, 2013

On first boot I got a fail.  The machine lit up, spun the fans for two seconds, stopped for two seconds and repeated in an endless power cycle.   Sometimes this is the processor finding the right speed and it will recover, but this did not.   Next usual cause is the 12V CPU power plug is not installed.  Nope it was plugged in.   Next thing is the memory modules.  I had started with the new 8GB and the 2x2GB gskill modules that were in the old mobo.  Reseated them, no improvement.  Removed the old modules and left just the new one.  Bingo!  Machine boots.  There is no speaker on this mobo so there were never any beeps.   I was hoping to leave 12GB in the machine but I decided to throw out the old 4Gb, it was 1333 instead of 1600 anyway.  I'm not sure what the issue was, didn't debug it.  8Gb of memory it is.  Still a 2X upgrade from the previous rig.

Kept the old 500G hard drive. I did NOT re-install windows now that I know the magic. The machine runs windows 7.  

Links to how to make windows accept the new mother board:

Copy the mobo driver CD to a USB on a working machine, and plug in the USB drive.  I've stopped using optical drives in most machines, since mine were all IDE and now mobos only support SATA.   Otherwise you can just put the CD into the new machine directly.

The gist is, boot the machine, let it try to do a startup repair and fail.  When it fails, click the link on the bottom of the form for advanced options.  The last is command line, pick that.

Type C: and dir, D: and dir, etc to find which drive is the windows install and which is the USB.  They won't be in the usual places.  On my machines the windows install is always on D: and the drivers on USB are on E:

Type this command, and watch the spaces.  Leave one out at it won't work.
dism /image:d:\ /add-driver /Driver:e:\ /recurse

Get a cup of coffee as it copies in all the drivers.  The machine should boot fine after that, and the motherboard drivers will all be installed an happy.

Machine came up and everything worked.  Sound, video, etc.  Windows experience for the processor moved from 6.5 to 7.6.