Thursday, September 28, 2006

Why Windows Sucks

I am no more fan of Windows (any windows) because of many reasons. The first reason is it is resource-hungry operating system. My office laptop (it is IBM Thinkpad T42p with 2 GB RAM, 80 GB HD) is not as fast as at the first time I got it from IT department. After I installed many softwares, it became slower. I did try to shutdown some uncessary services, but not much help. Blame the growing registry! Many applications still leave artifacts in the registry, although you have uninstalled. Unlike Windows, Linux is still based on old fashioned plaintext of configuration files (but works perfectly!).

Another reason is that there is many copies of DLL files in my computer (either at home or at work). There are some common DLL files located in different folder. There is no concept of creating symbolic link in Windows. If you move the duplicate DLL from one folder to another file, the application from the folder where the DLL missing may not be working. In Linux (or Unix in general), you could just create a symbolic link, then the application will just treat the symbolic file as it is a real file.

Another reason is, it is not designed for automation. It is not common for people to write a script to do automation. Although Win2000 and up have this what so called "command shell, manytimes the Windows command shell is useless).

But, I still cannot get rid of my Windows (sigh). Many applications on my computer are windows-only. From tax reporting tool, games, to development software are still under Windows. Besides, Linux is still immature in its GUI (it is far to be a desktop GUI). I admit, from GUI perspective, Windows is much faster than Linux. This is because Windows is developed with GUI in mind from ground up, while Linux is actually a text based OS with GUI running just as another application in user level environment.

Wednesday, September 27, 2006

Embedded System Kit

My new embedded development kit arrived 2 weeks ago. It is based on ColdFire V2 5213 microcontroller made by Freescale. The development kit is made by Netburner (www.netburner.com). The reason I chose this uC was because it is 32-bit microcontroller and it was cheap ($99+tax+s/h) from NetBurner.

The package came with IDE software, debugger, loader, DB9 RS232 cable and adapter. The card is quite small compare to Rabbit RCM3000 I have been using. Amazingly, the core itself is made into 40 DIP so fits into regular 40 DIP. When we are ready for mass produce, just use the same module and insert it into the socket.

I was thinking to get the higher end (MOD52??) which has ethernet connection, but the price was too high for my pocket so I decided just go ahead with MOD5213. I was thinking that I may put an ethernet module (from somewhere) later once I get familiar with the system.

The software is based on GNU GCC, so it is free and opensource. The module even comes with RTOS. Loading the software is easy. Just run the software "serialload", select the proper COM port and baudrate, select the S19-format file to load, click OK and ..that's it. The software works on Win95 as well as Win2000 or WinXP. Because my other newer laptops don't have RS232 port, I use my old Toshiba laptop (it is really old, it's only Pentium 100 MHz with 16 MB RAM and 1.5 GB hard disk). The software works perfectly, well, except it it so slow. It took many seconds just to compile a few lines of code.

There are many examples that come in the CD, but only a few for MOD5123. The rest are for higher end MOD5xxx modules (the ones that have ethernet port). Many of these I-cannot-run softwares use TCP/IP for communication (e.g., making an embedded-system web server, SMTP client, TFTP etc.)

The uC itself is really cool. Features such as 12-bit 8 channel ADC, General Purpose I/O (GPIO), I2C connection, CAN connection, UART/QSPI, DMA, one 32-bit timer and three 16-bit timers are included in the chip.

A few days ago I ordered some components from www.futurlec.com. They have some very good deal stuff, such as 100 resistors with various resistance for $2.95, 50 linear ICs for $4.95, 50 various transistors for $4.95, and 16x4 LCD for $12.9 and so on. I ordered many of these and perhaps in the next few weeks will come so I can start doing my projects. I've not decided what project I should do first, but very likely to connect the LCD display, connect some sensors to the ADC inputs and do some measurements.

I will post again once there is some progress.

Wednesday, September 13, 2006

74XX Logic IC

Different kind of 74 logic device Families:


TTL (74xx) True TTL
74L Low power
74S Schottky
74H High speed
74LS Low power - Schottky
74AS Advanced - Schottky
74ALS Advanced - Low power - Schottky
74F(AST) Fast - (Advanced - Schottky)
74C CMOS...................check Vcc levels
74HC (U) High speed - CMOS (Unbuffered output)
74HCT High speed - CMOS - TTL inputs
74AHC Advanced - High speed - CMOS
74AHCT Advanced - High speed - CMOS - TTL inputs
74FCT (-A) Fast - CMOS - TTL inputs (speed variations)
74FCT (-T, -AT) Fast - CMOS - TTL inputs (speed variations)
74AC Advanced - CMOS
74ACT Advanced - CMOS - TTL inputs
74FACT AC, ACT (Q) series
74ACQ Advanced - CMOS - Quiet outputs
74ACTQ Advanced - CMOS - TTL inputs - Quiet outputs

Bus Driver Families

74ABT Advanced - BiCMOS - Technology
74ABTE ABT - Enhanced Transceiver Logic
74ABTH Advanced - BiCMOS - Technology - bus Hold
74BCT BiCMOS - TTL inputs
74BTL Backplane - Transceiver - Logic
74GTL Gunning - Transceiver - Logic
74GTLP GTL Plus

Low Voltage Families

74ALB Advanced - Low Voltage - BiCMOS
74LV (U) Low - Voltage (Unbuffered output)
74LVC (R) (U) LV - CMOS (damping Resistor)(Unbuffered output)
74LVCH Low - Voltage - CMOS - bus Hold
74ALVC Advanced - Low - Voltage - CMOS
74LVT (R) (U) LV - TTL (damping Resistor(Unbuffered output)
74LVTZ Low - Voltage - TTL - High Impedance power-up
74ALVC (R) ALV - CMOS (bus Hold) (damping Resistor)
74ALVCH Advanced - Low - Voltage - CMOS - bus Hold
74LCX LV - CMOS (operates with 3v & 5v supplies)
74VCX LV - CMOS (operates with 1.8v & 3.6v supplies

4000 True CMOS (non-TTL levels)

ECL Device Families:

MEC I 8nS*
MEC II 2nS*
MEC III (16XX) 1nS* .......* = Rise & Fall Times
101xx 100 series 10K ECL, 3.5nS*
102xx 200 series 10K ECL, 2.5nS*
108xx 800 series 10K ECL, voltage compensated, 3.5nS*
10Hxxx 10K - High speed, voltage compensated, 1.8nS*
10Exxx 10K - ECLinPS, voltage compensated, 800pS*
100xxx 100K, temperature compensated
100Hxxx 100K - High speed, temperature compensated
100Exxx 100K - ECLinPS, temp, voltage comp., 800pS*

Friday, July 21, 2006

Some Info regarding PS, PCL etc.

PostScript is a programming language optimized for printing graphics and text.

Here is some links about printing, especially in Linux:

http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/III.PostScript-and-PPDs/III.PostScript-and-PPDs.html

http://www.cs.indiana.edu/docproject/programming/postscript/postscript.html

Host-based Printer

I had just got my new printer, HP LJ1020, 2 days ago and tested from my PC. My old printer (HP color DeskJet 930c had been dead for about 2 months now and I desperately needed to get a printer). My 5-year old 930c printer was actually good for casual uses, eventhough the printouts were not good enough against water (caused smearing). The reason I bought the new one was, after my wife's friend brought her two toddlers came over our house and messing around (nobody noticed that they also played around my printer, turned it on/off several times and only-God-knows-what-they-did stuff)

The only major con of this printer is that it uses PC (with Windows only) to render printing, and sends the raw data to the printer using HP proprietary protocol via USB cable.

After installing the driver, I noticed there were 2 virtual USB ports created. These two ports were proprietary ports and unconfigurable. Print server could not use the port. That's the reason why this printer is not for people who want to network their printer thru print server. Anyway, the print quality of this LP 1020 is really good and comparable to higher-end and more expensive ones.

I think the only way to make it networkable is making the USB-connected PC to share its port. But then, this PC has to be up and running Windows all the time to make the printer available.

For the same reason, printing process is very fast, because half part of the printing process is done on the PC (which in general nowadays is much faster than even RISC processors usually deployed on various laser printers). From a few tests, I could see the printer started to print a second after I press print.

This printer is in the family of "host-based printer". I found a definition of "Host-based printer" on the net: "A printer that relies on the computer's CPU to do the rasterization of the pages. Non-host-based printers accept a command language from the computer, such as PostScript and PCL, and perform the rasterization internally. GDI printers are an example of host-based printers, which rely on the CPU's processing power to do the work." I believe this printer uses Windows' GDI (Graphical Device Interface) commands to rasterize printing. Does anybody have come up with a brilliant idea on how to hack it and make it work on Linux machines? And, here is more definitive information about it: http://www.laserquipt.com/support/idx/26/083/article/Host-Based-Drivers.html

Host-based printing is a cost-efficient printing technology that enables printers to utilize the processing power and memory resources of the PC (or the Host). In comparison, PDL-based (printer description language) printers use the processor and memory resources of the printer. Host-based printing allows HP to minimize the cost of the printer by significantly reducing the capabilities of the formatter of the printer and relying on the customer's computer processing power.
Host-based printing works by converting Windows GDI commands (graphics commands) generated by the application to the dot pattern to be created on the page. This dot pattern is then compressed and sent from the host PC to the printer, which stores the image of the page before printing. The data MUST be rasterized (converted into dots) when sent to the printer. This function is usually performed by the application itself. There are, however, some high-end graphics applications such as Quark™, Adobe PageMaker™, Adobe Indesign™, or Macromedia Freehand™ that do NOT rasterize data before sending to the printer.

Output from these applications to a host-based printer is typically very poor. When you print to a PS printer, PS commands are sent from your computer in the form of text commands. This text contains exact information about what is on the page. The text is received, understood and translated by a PS interpreter in your printer. Because of the simplicity of text commands and the consistency of PS interpreters, any PS printer will print the text information in the same way. Sending the same PS information to 560 different printers would yield the same results. PS is an invaluable graphics language because of its consistency and portability. Workarounds such as saving EPS files to different file formats such as JPEG’s or TIFF’s aren’t acceptable to users of high-end graphics applications who rely on PostScript specifically for the reasons above. In comparison, PDL-based printers require a more extensive formatter with higher RAM and ROM requirements, as well as a more powerful processor on board the printer.

Benefits of Host-Based Printing: A host-based printer utilizes the host computer’s processing power to convert the software application’s page information into a raster format to be printed by the printer. Since newer computers process at much faster speeds than most printer processors, complex jobs can often print faster when utilizing a host-based printer driver. Most host-based printers utilize USB ports which typically print much faster than parallel ports. Host-based printing requires a software print engine in the host operating system, and unlike a PDL (Printer Description Language) printer, cannot accept ASCII text direct from a computer. This means that the Host based printer will only work in the Windows and Macintosh environments that are specifically supported with the print engine written for that environment. Users of unsupported Windows and Macintosh environments, as well as users of Linux, Unix, OS/2 should consider a PDL printer like the HP Color LaserJet 2550 or CLJ3700.

Limitations of Host-Based Printing: Host-based printers are excellent small workgroup printers suitable for Windows and limited Mac printing to include internet and typical office printing but NOT EPS file printing. The drawback is that it is not possible to network such printers. A printer needs a steady flow of data, which is easily accomplished when it is connected directly to a PC, but cannot be guaranteed when the printer is connected via a LAN. Also, these technologies require intensive handshaking between the driver and the printer. However, the communication will time-out often enough over the LAN to make the solution impractical.

No wonder if you have a very fast PC (mine is not considered very fast anymore, eventhough it uses AMD 64-bit 2.4 GHz Athlon w/ 1 GB RAM and USB v2.0), it prints very fast. I haven't tried with USB1.0, but by just looking at the ratio of the rate between USB1.0 and USB2.0, we can tell roughly how it will behave. Sad to know there is no practical way to network the printer, except maybe by spending a couple of hundred $$ to buy a dedicated PC (with Windows) to be its "print server" (well, it is not going to be a real print server, it may only be "a shared port" PC.

Wednesday, June 7, 2006

Keeping your files secret

There are many ways to store our files safely and securely. One way is to just encrypt each file with a strong encryption method (e.g 256-bit AES). Another way is to create a virtual drive that encrypt the whole files in it. There are some softwares for the second method. One of them is PGP Desktop (non-free), and another one is TrueCrypt (GPL, downloadable from http://www.truecrypt.org/)