Archive for the ‘PC Hardware/Consumer Electronics’ Category

Selling a lot of IBM / Lexmark Model M keyboards

Tuesday, January 16th, 2007

These keyboards are awesome.
http://www.dansdata.com/ibmkeyboard.htm
http://www.preater.com/modelm/

If you ever see a bunch of them being tossed out as surplus, pick them up. They can be sold $20 apiece on Ebay easily. Shipping is quite easy via USPS Priority Mail: Simply take two of the long type flat rate boxes, and insert one into the other. Surround the keyboard with peanuts and it’s good to go! Use any keyboards which are physically broken or missing lots of keys as donors for key caps, key blocks and controller boards. The spring mechanism itself is difficult to replace properly so don’t sell any keyboards with stuck or mushy springs, use them as parts donors.

They clean up with laundry detergent and a rag. Do not simply put in the dishwasher unless you open it up and allow to completely rinse and dry the controller board. The buyer can be responsible for this.

If they have AT cords, AT-PS2 adapters can be had for $1-2 (http://www.sfcable.com/catalog/wholesalecables/30D5-4A.html) or the buyer can purchase his own PS2 cable (http://pckeyboards.stores.yahoo.net/cabdetmin.html) You could also make your own cord, the weird connector is a SDL “Shielded Data Link” jack and is available at Mouser and friends.

Some Pentium 4 and faster systems require resistors to be added to the data and clock lines: http://www.geocities.com/jszybowski/keyboard/

Unicomp provides warranted repair services: http://www.pckeyboard.com/repair.html and also sells newly manufactured buckling spring keyboards: http://www.pckeyboard.com/

Clickykeyboards sells new old-stock Model M keyboards: http://www.clickykeyboards.com/

Viewsonic G810 missing colors

Saturday, December 30th, 2006

Common failure point is Motorola MHW3628 triple CRT driver IC on the HV8SA neck board (big IC in blue package). To verify, swap colors at connections with video board. The IC is very expensive ($75) from parts vendors. The one purchased by “customer” turned out to be defective, but no returns were possible. With the “new” IC, the monitor would not power up if the neck board was connected. I ended up sourcing another used neck board for around $25 (make sure it is the same part number) and this worked in the end.

Fix a dead TI-8x

Sunday, December 3rd, 2006

So you pull your trusty TI-83, TI-85, etc calculator out of the closet only to find that it is apparently no longer working. Powering on displays nothing on the screen. Changing the AAA batteries and the lithium battery improves nothing.

Before giving up and junking the calculator, there are two things you should try.

1. Adjust the contrast. For some reason, TI-8x calculators seem to be prone to having their settings corrupted and the contrast zeroed. This is probably the case if you can still communicate with the calculator through the parallel link. To adjust the contract, power the calculator on, then (blindly) hit 2nd, then hold down the up arrow. It should take about two seconds for the screen to become visible. If not….

2. Reset the calculator to factory settings. One way to do this is to remove one battery, and hold ON for 10 seconds. You can also remove all the batteries and wait several hours.

3. Reset the calculator using self test. Press 2nd, Mode, Alpha, A, Enter. This will wipe the calculator memory.

If for some reason you need to open the calculator to try component swapping, there are exactly three screws; two short ones at the bottom, and one long one for the lithium battery. After removing all the batteries, the calculator will pop open with some effort.

OPC power and dying/dead CD Recordable drives

Saturday, December 2nd, 2006

You might notice that one day you get the dreaded OPC Failed or Power Calibration Failed on your trusty CDR drive when no other software, hardware or media has changed. You go through several discs wondering what to make of this, then change to a different brand of media with the same result.

The laser diode in a CD drive has a finite lifetime during which the laser output for a given amount of power flowing through it will gradually decrease. The useful life of the laser pickup depends upon the average power flow through the diode; a high power flow accelerates the degeneration of the laser beam. Eventually, this renders the pickup unusable because the circuit has a laser power ceiling at which point it will refuse to increase the power through the diode any more so that it avoids immediately burning out the diode. If your deck has reached the laser power ceiling, but the laser output is still low enough to render your discs unreadable, it is time for a new deck.
A CD pickup has a compensation circuit that sets the laser power to the minimum necessary to get a clean read. The laser power is increased when the disc is dirty or the lens is dirty. Cigarette smoke and dust from a poorly sealing drive will dirty the lens and increase the average laser power, thus shortening its life.

You might notice that even though your burner no longer writes discs, it will still read them. This is because the laser requires far more power to write a disc than to read it. Therefore, a weak pickup (one which has a low laser output to laser power ratio) will very often still function as a reader even when it is no longer useful as a writer.

Another fact to note is that the laser requires more power to write reliably at higher speeds. This means that a higher average write speed will mean a shorter laser life. It also means that if you have a CD writer that is failing power calibration at its maximum write speed because it is nearing the end of its useful life, you may be able to get extended service from it by simply lowering the write speed. If the OPC passes at a given speed, it is quite likely that the disc will be successfully written.

Also, just because a disc failed OPC does not mean it must be discarded. CD recordable discs have 100 OPC segments. So a disc that fails OPC in one recorder can simply be reused in another one, or in the same recorder at a sufficiently lowered speed.
http://www.mscience.com/fastcdr.html

Consumer electronics repair

Saturday, December 2nd, 2006

Manufacturers currently do not have any incentive to supply repair parts and service literature for consumer electronics. Their profit is maximized if the unit fails immediately after the warranty runs out and they have a new product cycle at that point to replace it. Unfortunately this approach creates an environmental load as well as a broken window economy, all because some information is hidden from the consumer when they buy the product.

I propose a consumer electronics labeling scheme that gives the consumer several critical pieces of information:

– How long the manufacturer pledges to make service parts available- Maximum cost of each major service part for a given class of device
– If the manufacturer provides service literature to independent technicians covering at least several key topics, defined per class of device

Get rid of Arctic Silver heatsink grease

Thursday, November 30th, 2006

Replacing a heatsink on your NVIDIA monster? The compound that’s on there might be a mess. Also, it might have migrated around/underneath memory chips, wreaking havoc along the way. Wiping the stuff just gets it all over your fingers and messes up a good microfiber cloth (since paper towels tear and other cloths leave lint).

Acetone and rubbing alcohol mitigate that a bit, but leave something to be desired.
The real solution is Goo Gone or Goof Off or a similar product, and a toothbrush.

Pour the Goo Gone over the ram chips and/or GeForce core, and use the toothbrush to scrub them clear of the heatsink goop. Rinse with water, making sure not to allow the goo to drip onto the other side of the card, and allow to thoroughly dry (24 hours) before reinstalling heatsink.
And for deity’s sake, use less goop next time! It does NOT take much.

You can use the same technique to remove goop from the cooler’s heatsink. I recommend removing the heatsink from the cooler first, because when you wash the solvent + goo off the heatsink, it has an uncanny attraction to plastic and will end up coating the plastic housing of the cooler with a sticky, cloudy layer. It doesn’t affect cooling but looks terrible.

Implementing a software modem

Tuesday, November 28th, 2006

To test the protocol, use two sound cards, line out on one to line in of the other. Use symbol rate between 2400 and 3200 baud to approximate telephone line conditions.

Modulation protocols:
Bell 103 (300bps)
v.21 (300bps)
v.22 (1200bps)
v.22bis (2400bps) – Patents on v.21/v.22/v.22bis expire 2008
v.23 (1200bps/75bps half duplex)
v.32 (9600bps)
v.32bis (14.4kbps)
HST (9600bps, 14.4kbps, 16.8kbps, 21kbps, 24kbps, proprietary)
v.32terbo (19.2kbps/12.0kbps, proprietary), 19.2ZYX (19.2kbps, proprietary)
v.FC (28.8kbps, proprietary)
v.34 (28.8kbps)
v.34bis/v.34plus (33.6kbps)
K56Flex (56kbps PCM downstream, v.34+ upstream)
X2 (56kbps PCM downstream, v.34+ upstream)
v.90 (56kbps PCM downstream, v.34+ upstream)
v.92 (56kbps, PCM downstream/upstream)

Error correction protocols:
MNP (2-4, 10)
v.42 (LAPM)

Data compression protocols:
MNP5 (RLE, Huffman), MNP7
v.42bis (BTLZ)
v.44 (LZJH)

Handshaking protocols:
MNP6,MNP9 (Universal Link Detection)

http://en.wikipedia.org/wiki/Fax
http://www.vocal.com/data_sheets/v44.html
http://www.vocal.com/data_sheets/v42.html
http://www.vocal.com/data_sheets/v22.html
http://www.algotron.com/pages/v42ds.html
http://www.floreatinc.com/modem_protocols/modem_protocols.html
http://www.3amsystems.com/wireline/hmo.htm
http://www.ncoretech.com/modem/algorithms.html
http://www-users.cs.york.ac.uk/~fisher/modembook/
http://www.linmodems.org/#linmodems

Geforce2 passive cooling replacement

Tuesday, November 14th, 2006

If you have an older Geforce 2 GTS or MX card that came with a fan on it, chances are the fan is dead by now. The sleeve bearing fans they typically ship on video cards do not last. What to do?

If you can replace just the fan and avoid removing the heatsink, do that. Unfortunately, many chip coolers are sold exactly as that, so buying only the fan as a replacement is impossible. And the chip cooler itself is rarely sold at a reasonable price considering the age of the video card. Otherwise, a solution with more longevity is passive cooling. You can buy a part number HS325-ND heatsink from Digi-Key.

Remove the existing chip cooler by CAREFULLY prying between the chip and heatsink on the side where there is the least amount of glue. You have to be careful here for two reasons. There are small surface mount components and traces on the circuit board that could be damaged if you are not careful. Also, the chip package itself has tiny traces that lead from the chip core to the BGA contact points. If even one of these is damaged, the card is ruined.

Use a medium grit sandpaper and sand off the thermal glue that remains on the chip. You don't have to get rid of all of it, but you do need to get rid of as much as possible so that the chip with sanded glue is as flat as possible. Here again, avoid accidentally sanding the BGA traces on the outer diameter of the chip.

Wipe the chip down and attach the heatsink using the provided thermal tape, or glue a new chip cooler onto it. If you go with the thermal tape or pad, it would be advisable to secure the heat sink with a zip tie or something similar, because the tape or sticky pad has about a 50/50 chance of letting go at some point, which will then lead to a fried GPU.

Monitor the chip temperature for a while to make sure the cooling solution is effective. On a GF2, I have no problems with normal desktop use with passive cooling.

Check those capacitors for bulging and/or leaking while you are at it!

Parallel ports

Monday, November 6th, 2006

Parallel switchboxes
Don't use a parallel switchbox if you want to do high speed transfers. I have not yet found one, manual or automatic type, that is reliable at high byte rates.

PS/2
PS/2 (or Extended) mode takes the standard parallel port (SPP) and introduces an output latch and direction control for bidirectional port operation. Contrary to ECP/EPP mode, the behavior of the nACK interrupt is also changed so that the IRQ becomes active on the trailing edge instead of mirroring the pin; also, bit 2 of the status register reflects the status of the ACK interrupt (latched when IRQ generated, cleared on read) – a violation of ECP spec.

EPP
The difference between EPP 1.7 and EPP 1.9 as set in a system BIOS is one trivial difference in the EPP handshake. EPP 1.9 is equivalent to IEEE 1284. The only purpose for the EPP 1.7 setting is for any particular EPP devices built before IEEE 1284 that malfunction with the IEEE 1284/EPP 1.9 handshake. Note: IEEE 1284 defines the electrical characteristics and handshake protocols of an EPP port, not the register definition.

ECP
An ECP-capable port is a functional superset of IEEE 1284. An ECP-capable port in ECP mode is incompatible with non-ECP devices, however.

Many ECP ports do not implement the full ECP specification. Common elements to leave out are:
– nFault IRQ generation (full/empty FIFO can still generate IRQ though!)
– Hardware RLE compression (not required by spec)
– DMA (PCI cards cannot implement ECP DMA and generally do not need to since PCI write buffers provide sufficient speed)
– IRQ/DMA resource configuration (PCI cards cannot implement this)

Handling a parallel port interrupt
By definition, when sharing interrupts it is necessary for your device driver to be able to determine whether your device is the source of the interrupt or not (so you can pass the interrupt on unclaimed to other drivers if it is not). This is exceedingly difficult to do in a generic fashion for PCI parallel cards. Whether or not an interrupt is delivered in a particular operating mode, and where the status of that interrupt is reflected, is highly implementation dependent.

There are three places where an interrupt can be enabled:
– Control register bit 4 (~ACK interrupt)
– ECP Extended Control register (ECR) bit 4 (~ERR interrupt)
– ECP Extended Control register (ECR) bit 3 (DMA interrupt)
– ECP Extended Control register (ECR) bit 2 (FIFO interrupts)

There are five places where an interrupt can be generated:
– ~ACK transition
– ECP ~ERR transition
– ECP DMA completion
– ECP read FIFO filling
– ECP write FIFO emptying
– Some devices (NS) generate an interrupt on an unexpected EPP read

There are at least three places where an interrupt can be detected:
– Status register bit 2 (latched after ~ACK transition)
– ECP Config B register bit 6 (follows interrupt pin on bus)
– ECP Extended Control register (ECR) bit 2 (check for 0->1 transition)

PCI multifunction cards usually also have a global control register, which has some location outside of the usual parallel port register set that reflects the status of a parallel interrupt.

We don't really care what in particular caused the interrupt, but we do need to find some proof somewhere in the registers that this card was the one responsible for the interrupt, or things will go horribly wrong.

Problems:
– ~ACK transition is only latched to Status[2] in PS/2 mode by many cards. In SPP and other modes, it either reads 1 or follows the IRQ pin. Since a spec-conforming PCI card will use a level triggered interrupt, we can in theory use this to test for the interrupt (but only on PCI cards!)
– ECP Config B register can be used, but first the port has to be switched into Test mode to read it, which means the ECP FIFOs must be flushed and current ECP transaction terminated, possibly too high a cost for interrupt handling.
– There is no way to determine whether a ~ERR transition caused the interrupt or not. On an ISA card or one without a shared interrupt, it can be determined by a process of elimination (since a spec-conforming driver disables the ~ACK interrupt when in ECP mode), but on a shared interrupt it is impossible.
– ECR bit 2 is only useful if in ECP mode and FIFOs are being used.

Basically, the most useful parallel interrupts (those generated by external events) give us no reliable way to determine which card owns the interrupt. The ~ACK interrupt could be probed, had the PC parallel port's designers thought to put in a loop-back test, but they did not.

The best thing you can do to handle PCI parallel interrupt sharing in a generic fashion is to:
– Disable the ~ERR interrupt.
– The DMA interrupt is not an issue on PCI cards since they don't support it anyway.
– Keep track of the state of the ECR bit 2 when you set it to 0 (unmasks the ECP FIFO interrupt) so that you can check if it changed in your interrupt handler (meaning we generated an interrupt).
– Ensure that your card cannot both have the ~ACK interrupt enabled AND be in a mode that will not latch that interrupt in Status[2] (reflecting the pin state is not enough!). Then you can assume that a Status[2]==0 event means that we generated the interrupt. Note: On most/all PCI cards, the status register must be read in order to clear the level-triggered interrupt.
– Assure yourself to whatever degree of confidence required that your card will not produce ANY other type of interrupt (vendor's logic equation for IRQ event helps)!

If you are lucky enough to have a global interrupt flag for the parallel port on your PCI card, USE THAT INSTEAD! Then you can use ~ERR and ~ACK as external interrupt sources without worries, and you can also handle spurious interrupts with a high degree of confidence! Only use the above “generic” mechanism as a last resort. If someone would look into using the ECP Register B to check for the interrupt and see how well that works, that may be an even better “generic” solution for PCI parallel cards.

Simple PC parallel port detection in DOS


unsigned short lpt_base;
char lpt_irq;
unsigned char lpt_vector;
unsigned char lpt_pic; /* 0 = pic1, 1 = pic2 */
unsigned char lpt_mask; /* bit in PIC OCW to unmask/mask */
unsigned char received; /* The last byte received */
char is_ecp;
void interrupt(*old_lpt_irqhandler)(__CPPARGS);

// The following code should be inserted into a setup function, and allow
// user to override base address and IRQ
{
	// setup parallel port
	if (lpt_base == 0) {
		// Use BDA to find base address of system's first parallel port
		unsigned short far *bda_lpt = (unsigned short far*)MK_FP(0x40, 8);

		lpt_base = *bda_lpt;
		//printf("lpt_base %0.4x", *bda_lpt);
		assert(lpt_base == 0x3bc || lpt_base == 0x378 || lpt_base == 0x278);
	}

	if (lpt_base == 0x3bc) {
	  // We can assume a port at 0x3BC has IRQ 7 unless we find otherwise
	  lpt_irq = 7;
	}
	// Detect ECP port according to ECP spec p.31
	// ECR is at lpt_base + 0x402
	unsigned char test = inp(lpt_base+0x402);
	if ((test & 1) /* fifo empty */ && !(test & 2) /* fifo not full */) {
		// Attempt to write a read only bit (fifo empty) in ECR
		outp(lpt_base+0x402, 0x34);
		test = inp(lpt_base+0x402);
		if (test == 0x35)
			is_ecp = 1;
	}

	// If ECP port, read cnfgB to find parallel port IRQ number
	if (is_ecp) {
		// Put port into configuration mode
		test = inp(lpt_base+0x402);
		test |= 0xE0;
		outp(lpt_base+0x402, test);
		// Read cnfgB
		unsigned char irq = inp(lpt_base+0x401);
		irq &= 0x38;
		irq >>= 3;
		// irq0 means selected via jumper, user will have to hard code the irq
		if (irq != 0) {
			switch(irq){
				case 1: lpt_irq = 7; break;
				case 2: lpt_irq = 9; break;
				case 3: lpt_irq = 10; break;
				case 4: lpt_irq = 11; break;
				case 5: lpt_irq = 14; break;
				case 6: lpt_irq = 15; break;
				case 7: lpt_irq = 5; break;
				default: break;
			}
		}
		// Set ECP port mode to PS2
		test = inp(lpt_base+0x402);
		test &= ~0xE0;
		test |= 0x20;
		outp(lpt_base+0x402, test);
	}

	if (lpt_irq == -1) {
		fprintf(stderr, "Couldn't find interrupt for parallel port at 0x%x !\n", lpt_base);
		sleep(2);
		exit(EXIT_FAILURE);
	}

	// Convert IRQ number to interrupt vector
	switch(lpt_irq) {
		case 5: lpt_vector = 0x0d; lpt_mask = (1 << 5); break;
		case 7: lpt_vector = 0x0f; lpt_mask = (1 << 7); break;
		case 9: lpt_vector = 0x71; lpt_pic = 1; lpt_mask = (1 << 1); break;
		case 10: lpt_vector = 0x72; lpt_pic = 1; lpt_mask = (1 << 2); break;
		case 11: lpt_vector = 0x73; lpt_pic = 1; lpt_mask = (1 << 3); break;
		case 14: lpt_vector = 0x76; lpt_pic = 1; lpt_mask = (1 << 6); break;
		case 15: lpt_vector = 0x77; lpt_pic = 1; lpt_mask = (1 << 7); break;
		default: abort();
        }


        fprintf(stderr, "Parallel port at 0x%x, irq %d", lpt_base, lpt_irq);
        if (is_ecp)
                fprintf(stderr, ", ECP");
        fprintf(stderr, "\n");

        // set to data input mode using DCR
        outp(lpt_base+2, inp(lpt_base+2) | 0x20);

        // check that data lines are not driven by us
        int fail = 1;

        for (i = 0; i < 5; i++) {
                outp(lpt_base, 0x5a+i);
                if (inp(lpt_base) != 0x5a+i) {
                        fail = 0;
                        break;
                }
        }
        
        if (fail) {
                fprintf(stderr, "Parallel port does not appear to be bidirectional!\n");        
                sleep(2);
                exit(EXIT_FAILURE);
        }
        
        disable();  // cli()
        // grab IRQ vector
        old_lpt_irqhandler=getvect(lpt_vector);
        setvect(lpt_vector, lpt_irqhandler);
        
        if (lpt_pic > 0) {
                // unmask our IRQ
		outp(PICB_1, inp(PICB_1) & ~lpt_mask);
		// then unmask IRQ2
		outp(PICA_1, inp(PICA_1) & ~0x04);

	}
	else {
		// unmask our IRQ
		outp(PICA_1, inp(PICA_1) & ~lpt_mask);
	}
	// enable parallel port interrupt via ACK line
	outp(lpt_base+2, inp(lpt_base+2) | 0x10);

	enable(); // sti()
}

Simple bidirectional communication between two PCs with a standard parallel port cable
Swap STROBE and nACK pins on one end of the parallel cable. Ensure that the parallel port nACK interrupt is enabled on both ends (DCR[5] := 1). Then the communication looks like the following:


// Parallel port ISR, Turbo C++ 3.1 DOS code
void interrupt lpt_irqhandler(__CPPARGS)
{
  disable();

  received = inp(lpt_base);
  // Interrupt the sender, since STROBE on this end
  // is connected to ACK on the other end
  unsigned char tmp = inp(lpt_base+2);
  outp(lpt_base+2, tmp ^ LPT_STROBE);
  outp(lpt_base+2, tmp);

  old_lpt_irqhandler(); // chain old IRQ handler
  outp(PICA_0, EOI); // EOI
  if (lpt_pic > 0)
	outp(PICB_0, EOI); // also send EOI to PIC2

  enable();
}

I have found this to be a sufficient quick & dirty way of transferring bytes from one PC to another in interrupt driven fashion.

Gateway's OEM MS-6330 v2.1 mainboard

Friday, October 20th, 2006

If you go motherboard hunting on EBay, you may run across a lot of these OEM boards. They have a Gateway AMI BIOS, MS-6330 v2.1 printed on the board, and a custom case front panel connector header. The reason you run across a lot of them is because they were manufactured with defective CPU filter capacitors; the aftermarket has been replacing the capacitors and reselling the boards.

The boards shipped with a BIOS that is full of bugs. The 0AAVWP02 BIOS (8/21/2000) most annoyingly has a bug that causes a corrupted IRQ routing table when a PS/2 mouse is not connected. Linux does not handle this corrupted IRQ routing table, and crashes at boot as in this bug report: http://lists.suse.com/archive/suse-linux-e/2002-Nov/0229.html

But, though this is a MSI board (similar to K7T Pro), you cannot use a MSI BIOS on it (MSI does not mention a MS-6330 v2.1 on their site). The key to knowing how to find this BIOS is to know that Gateway's code name for the board is “Oxnard”. Then you can go here: http://support.gateway.com/support/drivers/search.asp?param=oxnard&st=kw in order to download the BIOS (7511677.exe 2/17/2003) The latest BIOS is 0AAVWP13.

If you are trying to figure out how to hook up the front panel or other connectors on the motherboard, go here:
http://support.gateway.com/s/MOTHERBD/MSI/2514182/2514182tc.shtml
http://support.gateway.com/s/MOTHERBD/MSI/2510174/251017422.shtml

These are the OEM specs for the board:
MOTHERBOARD MODEL:
Microstar K7T Turbo MS-6330
CPU SUPPORT:
AMD Athlon up to 1.4 GHz with “A” prefix on CPU
AMD Duron up to 1000 MHz with “D” prefix on CPU
CHIPSET:
VIA KT133A Chipset
VIA VC82C686B Chipset
FSB:
200/266MHz FSB
SYSTEM MEMORY:
3 X 168-pin DIMM sockets for 3.3v SDR-SDRAM
Maximum: 1.5GB
EXPANSIONS SLOTS:
1 AGP slot
5 PCI slots
ON BOARD IDE:
An IDE controller on the VIA VT82C686B chipset provides IDE HDD/CD-ROM with PIO, Bus Master and Ultra DMA 33/66/100 operation modes.
I/O INTERFACE:
1 Serial port
1 Parallel port supports SPP/EPP/ECP mode.
4 USB ports. (2 rear connectors/2 front pin headers)
DIMENSIONS:
ATX Form Factor. 12″ x 8″
BIOS:
AMI BIOS
Plug & Play Flash BIOS
Desktop Management Interface(DMI) function