Make a printer-port EEPROM programmer and dongle

You can easily use a PC's printer port for serial-EEPROM programming. You can use a device-programmer circuit used to program the MicroWire serial EE-PROM 93CXX (Figure 1). The circuit is so simple that any further simplification seems impossible. This programmer circuit contains no microcontroller, as most device programmers do. It needs neither a separate power supply, or "wall-wart," nor a cable. When in use, it directly plugs into the PC's printer port. However, you still can use a cable if convenient—for PC printer ports behind the PC, for example. The circuit also requires neither a resistor nor a decoupling capacitor.

These advantages come from the PC's printer-port resources and the architectural simplicity of the MicroWire serial EEPROM. The printer port comprises the 8-bit data, status, and control registers. Each register has its unique address. On the classic IBM PC, the data port serves solely for output, but the control port can serve as either input or output. The eight-pin, tiny, serial EEPROM consumes less than 1-mA current in the active state, and the printer port's data pin can supply a few milliamps, so this design uses D7 (Pin 9) as a power-supply pin. No decoupling capacitor is necessary in practice.

The MicroWire chip uses the CS (chip-select), SK (clock-signal), DI (data-input), and DO (data-output) pins to control its read/write operations. This design uses the chip-select signal from the reverse level of the control bit  (Pin 17). It also ties together pins DI and DO and connects them to the Control bit  (Pin 1), which can serve as input or output, thereby saving one pin. These selections caused no problems in practice. Because control Pin 1's logic is the reverse of the logic level on bit C0, the software must take care of the inversion. The MicroWire interface normally requires a pullup resistor on the DO pin, but such a resistor is already inside the PC, so it's unnecessary.

Once you settle on the hardware design, the main task is to write software. This task is not difficult. For many embedded-system-software engineers, it's routine and interesting. A freeware executable program, Pseep2.exe, is available for this purpose. A sample demo program, secret.bin, allows you to practice the programming. Click hereto download the software for this Design Idea. It handles only one MicroWire device—the popular 93C46's read/write operation as an example. Another important feature of this circuit is that, once you program the 93CXX device, the system becomes a primitive dongle. You can then use it as a hardware-protection device for your valuable software. Only you know whatever was programmed in the device.

When the protected software runs, it first checks whether the device is present at the printer port and whether the code matches what you programmed. If a match doesn't exist, the software refuses to continue and exits. The dongle is primitive, but it does illustrate the basic principle of dongle-protection technology. You can build the circuit using wire-wrapping or point-to-point soldering techniques on a solderless breadboard, in which case you'll need a cable, or with your own pc board. It's a one-evening project.

 

posted @   IAmAProgrammer  阅读(1394)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示