Sunday, July 15, 2007

Most Common and Generic PIC uC

The following is the best choice of PIC microcontroller for general purpose applications.
First, my criteria is a uC that is flash-based, cost-efficient, enough program space (>= 3 kB), has EEPROM, has I2C and SPI interface, programmable thru my PicKit2 programmer, has enough I/O pin (>= 8 I/O), has WDT, TTL-level voltage, low power usage, and able to communicate via asynchrononous serial port to PC. One of the most important thing is the PDIP availability, so I can develop it on my breadboard.

The intention of my future project is to develop home automation. The uC should be able to interface to sensors (thermal, humidity) as well as on-off microswitches (open-close sensors). It shall be able to communicate to my Linux PC via serial port, able to display status via 4x16 LCD display (Hitachi compatible) and still have some extra pins to do extra stuff (probably reading keypad, interfacing to darlington chip or LEDs).

Searched on MicroChip website (www.microchipdirect.com), I got this:


Chip: PIC16F690
Status = In Production
Volume Pricing = $1.20
Architecture = 8-bit (Harvard Architecture)
Program Memory = Standard
Type = Flash
KBytes = 7
KWords = 4
Self-write = NO
Data EEPROM = 256 bytes
RAM = 256 bytes
I/O = 18
ADC Channels = 12
ADC Bit = 10-Bit
ADC Sample Rate (ksps) = N/A
Comparators = 2
Timers/WDT = 2-8bit 1-16bit Yes
HW RTCC = No
Interface = EUSART, I²C Compatible/SPI
Max. Speed MHz = 20
Int Oscillator (MHz) = 8
ICSP™ = Yes
BOR = BOR
LVD = NONE
ICD - # of Breakpoints = 1
CCP / ECCP = 0/1
PWM Channels = 4
PWM bits = 10
Parallel Port = No
Nanowatt = Yes
Vdd Min. = 2.2 V
Vdd Max. = 5.5 V
Pin Count = 20
Packages = 20/SSOP 208mil, 20/PDIP, 20/QFN, 20/SOIC 300mil

The unit price (PDIP only):

Part Number: PIC16F690-E/P
Lead Count: 20
Package Type: PDIP
Temp Range: -40C to +125C
Packing Media: Tube

Pricing:(USD)
1-25
2.00
26-99
1.95
100-999
1.90
1000-4999
1.75 *
5000-9999
1.67 *
10000+
1.59 *


Availability:
200
Order Quantity:







Part Number: PIC16F690-I/P PIC16F690 view datasheet

Lead Count: 20
Package Type: PDIP
Temp Range: -40C to +85C
Packing Media: Tube

Pricing:(USD)
1-25
1.85
26-99
1.80
100-999
1.76
1000-4999
1.62 *
5000-9999
1.54 *
10000+
1.47 *


Note:
The "E/P" in part-number is to tell it is "Extended operational themperature" (Industrial standard). This might fit to auto-mobile applications, where operational voltage is more extreme than home application.

Saturday, June 9, 2007

Broadband Tester

Just found a very cool webtool to check our broadband speed.
Go to this website: http://www.speedtest.net

And here is a test on my broadband connection to a San Francisco server:


And this is a test to San Jose Server:

Sunday, June 3, 2007

VPN with Dell Wireless 1390 WLAN Mini-Card

My Dell work laptop recently failed to connect to establish VPN connection to my office on TCP port 10000. via WLAN The problem was that it always says "failed", although I was 100% sure the VPN gateway was up and running (I tested with wired connection, it worked).

Googling around did not help much either, except one email on a discussion site. The guy said he had the similar problem and fixed it by disabling VPN priority or something like that. But when I checked the property of the broadcom WLAN, there was no such thing. The only option with word "priority" is "VLAN priority" which was set "auto". After disabling this, my VPN worked!

Oh, forgot to mention that I also reset the MTU to default. It could help too. I dunno.

Wednesday, March 21, 2007

Bad Conotation can hurt your job!

Sometime ago I was going to apply for an interesting job position at some hi-tech company. I was too lazy to rethink about what I put long time ago in my resume. I just updated for the latest/ position I was working on only.

After I submitted my resume, a friend of mine working at that company were complaining with a word (that I put long time ago and stayed there for such long time): Hacking. One manager was even so allergic with the word and caused I never got called for even interview.

According to Wikipedia, a 'hacker' word is defined as a person who is dedicated to software programming and who builds elegant, beautiful programs and systems. From google, I found mostly positive meaning about this word. In general, "Hacking" means to break a code (as part of testing its stabilitiy, reliability and security), as well as to fix software in a quick way. The word itself originates from the top university in the world, especially in computer science, MIT. At the time, these experts popularized the word among themself and then through BBS (no web or email at that time). According to PcMagazina, the word has been interwined and mistakenly equalized with word "Cracker" (usually bad persons who try to get a free software or other illegal activities) mostly by computer illiterate persons (media). These "true" hackers then answered back with a new terminology "White-hat hackers". So a true hacker usually is a white-hat hacker.

Regardless of wrong interpretation of this word by these ignorant people (sadly, some of them even software managers!), I learned my lesson. Never make your resume more than 3-4 pages (eventhough you have such a long and various experience). Be careful with our resume, otherwise you will have to pay the consequences.

Monday, March 19, 2007

Airbus A380

Today, the biggest passenger aircraft has ever been made in history is making its first test flight from Frankfurt to New York. The test flight is supposedly to test air conditioning system, entertainment electronics and other comfortibilities. Most of the passengers are Airbus employees and reporters. They will be asked to give feedback about the performance during the flight.

I am always amazed with how sophisticated the aeronautics is. First, how could a pair of wings lift such a massive body of an airplane? The material used on the wings must be superstrong and must be precisely and carefully selected and the superconstruction must be very detail and thoroughly. Just look at how much weight they have to bear. Gas tank is resided there, four huge jet enginees hang there too. Not to mention the body (in case of A380, with no passengers it weights 252 tons).

The wheels are also very strong. If we look at how tiny the rods that holding the wheel, we can imagine what a pressure it has to support. As we know, pressure (P) is defined as Force divided by crossection of an area. If the area is small relative to the force, the pressure becomes higher. There is 3 wheel system on most airplanes. One is in the front, the other two are below the wings. If there is 500 passengers with weight of 60 kg each passenger, there will be 30 ton in weight. Baggages can contribute to about the same amount. With other stuff packed into the aircraft (foods, etc.), the total weight can be up to 100 ton. So the total weight is about 352 ton. Assume the pressure is spread evenly to the three wheels. So each wheel bears about 120 tons!

The wing is even more astounding. The span for for A380 is about 78 meters. With such a long span (of two wings), it has to bear massive load. If we look back to high school physics 101, the torc (or torque) is defined as a product of force times length. It is also called Moment of the Force. While flying, these wings experience constant vibration and shock, either from turbulence or others.

The last thing I am also wondered is its avionics, including its control system. With such a complex system, ofcourse we need to have very complex instrumentation and control system too. I recalled when I was still in college, in one of courses I took was Control System Theory and Digital Control System. Those courses made me got big headache. Lots of math involved: Fourier, Laplace, z-transform; higher level integral and differential (including differential equations), etc. Not only that, an aircraft has strict restrictions on how to carry weight. So engineers have to design and decide what materials and components to fit in the plane.

The last but not least, aircraft is one of the top-most and top-notch of all advancements and product of engineering and technolgy humans have ever invented.

Friday, February 2, 2007

Cheap Long Distance Calls

My friend pointed me to Google map that has a cool feature: phone call forwarder. The way it work is that after you find a company or any contact/address information with phone number on the left side of the map, we click "call" link on the right of the phone number. A textbox will appear asking us to enter our phone number. Once we enter our own phone number and press "call", our phone will ring. Interestingly, when I tried it, I got call from the destination which I was calling to. When I picked up, I heard voice "connecting.." and then a dialing tone was heard. I guess, if there was somebody had picked up my call, I would made a call.

In this case, Google VOIP gateway intermediates connection from my phone to the destination. Google makes two connections, one is to my phone and second, to the destination (both originating from Google).

This way, we can make free long distance calls!