Tag Archives: Windows

Excuses

I made a promise that I would have some extra info on stepper motors, and clearly this isn’t it. I got very distracted with the parallel port work. Parallel port stuff used to be easy in Win98 and earlier, but got more difficult in XP. By more difficult I mean I had to install “inpout32.dll” and do some funky stuff in C#. But to use “inpout32.dll” you have to know the I/O start address, so I started blindly running towards what I thought the solution was.

To find out your start address you can simply head to Device Manager, open up the LPT tab, and click on Resources. For me, the I/O range starts at 0378. This is not the value you want, as it is the HEX representation of the address. As it turns out the integer address is 888. To save the user from going through these steps I had to dip into WMI and extract the information from there. Now there is no one place where you can tie together “LPT” and port address, so I had to connect them together using the PnPDeviceID. This took me ages to figure out as I had never used WMI before. Long story short, I have got the stepper turning controlled from the parallel port and also from a PIC from RS232.All I need to do is write the article, and generate some usable schematics.

However, I got distracted by designing something for my kids to play with. As an engineer I can’t help but be critical of a large number of children toys. I am not including things like Mindstorms, but I guess you get what you pay for. I want to show my children that electronics isn’t magic. They all use technology in one form or another, but I don’t want them to take it for granted. I want to show how a TV remote works, and how they can use something instead of the remote to change channels.

At the moment I have specced out some features, and it has already suffered from significant feature creep:

  • Fit inside a dual gang back box (850x1470x35mm)
  • Clear acrylic lid to show electronics
  • Attempt to route everything on top layer
  • 16 red/green LEDs
  • 16 tactile switches
  • 16×2 LCD display
  • Rotary encoder
  • Powered from 4 rechargeable batteries
  • Small prototype area

I want to make sure this will grow as they do, and have features so it will entertain all of them (20months – 6 years). There is little doubt that it will remain interesting for all of 5 minutes, but that is no different from any of their toys. Currently I am deciding whether I should include any IR LEDs for controlling the TV, or  Sparkfun’s 3-axis gyroscope. I’ve even got a small touchscreen digitizer that could make its way inside. And of course there is always room for a little speaker.

Clearly, there is some more feature creep to go.

 

The Perils of Windows Update (Error 80070002)

I switched my PC on this morning, and a little message popped up asking me to update my Windows 7 machine. I have configured my machine to notify me when an update was available and to not install it itself – and those wishes were indeed complied with. Now an up-to-date machine is a happy machine so I went through the motions only to be greeted with this…

Apparently Error 80070002 is caused by a mismatch in update databases, and a resolution is to stop the update service, delete some temporary update files, and resume the service. Well, I don’t need to tell you that this did not work.

If stopping and restarting services isn’t your idea of fun, then don’t worry as there is a nice and easy solution known as Fix It. This will run through the process automatically and should fix whatever problem it thinks you have. Once again, this not work. I suspect it was due to the Fix It solution being identical to the advice I had already received. I blame this on Microsoft’s continued attempt to make things “easier” for the non technical; a side effect being everything is harder for the technical.

If you recall, I have already had issues with Microsoft’s decisions regarding the move from Windows XP to Windows 7. The first being the lack of HyperTerminal, and the second is the requirement to use Windows Update (located in the Start Menu, or in Control Panel) when installing updates. There used to be the option to install updates using Internet Explorer, but not any more. users are forced down either a single path or off the road entirely.

Finally I found Autopatcher. Released in 2003 this is a free alternative to Microsoft Update. I think it is worth mentioning that Autopatcher originally used a separate server to host the updates, and was subsequently informed by Microsoft Legal to stop, due to concerns about unauthorised updates and malware. Since then, an agreement was made for Autopatcher to utilise Microsoft’s own servers to retrieve the updates. One important feature of this for network managers, is that it allows the update to be downloaded once, and installed to many PC’s. Autopatcher first gives you a list of update modules you might want to use and then allows updates to be selected, indicating already installed updates in blue. Once the appropriate updates are checked, they will be installed.

Unfortunately my “Error 80070002″ still exists, but I am happy with the knowledge that my PC has current updates. Additionally, I can archieve these updates speeding up the inevitable rebuild that accompanies Windows machines. Happy days.