Tuesday, 11 September 2007

Testing Serial Communication with Hyper Terminal

Computer နဲ႔ တျခား Electronics Machine ေတြနဲ႔ဆက္သြယ္တဲ့ ေနရာမွာ အဓိကအသံုးျပဳတဲ့ Port က COM port ပါ။ ေနာက္ပိုင္းမွာေတာ့ USB port ေတြကို သံုးလာၾကပါတယ္။ ဒါေပမယ့္ COM မွာ UART ဆိုတဲ့ ကိုယ္ပိုင္ Protocol တစ္ခုရွိတဲ့အတြက္ သူ႕ကိုအသံုးမ်ားတာပါ။ အဲဒီ Ports နဲ႔ Computer ကို အဆက္အသြယ္ရ၊ မရ ကေတာ့ Hyper Terminal ဆိုတဲ့ Windows မွာပါတဲ့ Build-in Software နဲ႔ စစ္ေဆးလို႔ရပါတယ္။ အဆင့္ဆင့္ကိုေတာ့ ေအာက္မွာေဖၚျပထားပါတယ္။ Hyper Terminal က ASCII Code ေတြပဲ ပို႔/ လက္ခံလုိ႔ရတဲ့အတြက္ Extended Commands ေတြပဲ Test လုပ္လုိ႔ရပါတယ္။ ၿပီးေတာ့ Byte-by-Byte ပဲ ပို႔လုိ႔ရပါတယ္။ တစ္ခ်ိဳ႕ Device ေတြက Short Command ေတြသံုးတဲ့အခါမွာ ျပႆနာရွိလာပါတယ္။ အဲဒီအခါမွာ တစ္ျခား Tester Software တစ္ခုကိုအသံုးျပဳရမွာပါ။ လတ္တေလာ ကၽြန္ေတာ္သံုးေနတာကေတာ့ COMPORT ဆိုတဲ့ Software ေလးပါ။ Internet ကေန Download လုပ္လုိ႔ရပါတယ္။ တစ္ျခား Software ေတြလည္းအမ်ားႀကီးပါ။ အဲဒီ Tester ေလးေတြက size အရမ္းေသးေပမယ့္ အလြန္အသံုး၀င္တဲ့ Software ေလးေတြပါ။ Test လုပ္တဲ့အခါမွာ သက္ဆုိင္ရာ Device ရဲ႕ Firmware Manual မွာပါတဲ့ Command ေတြကိုအရင္ေလ့လာၿပီးမွ စမ္းသပ္ပါ။ CLI ပဲရတာပါ။

1. ပထမဆံုး Start -> Programs -> Accessories -> Communications -> "Hyper Terminal" ကိုဖြင့္ပါ။

2. Connection Description dialog box ထဲမွာ Name တစ္ခုေပးၿပီး OK button ကိုႏွိပ္ပါ။

3. Connect to dialog ထဲမွာ Connect Using မွာ COM1, COM2, ... ကိုေရြးပါ။ တပ္ထားတဲ့ port ကိုေရြးေပးပါ။ OK button ကိုႏွိပ္ပါ။

4. COM1 properties မွာေတာ့ Bit per second (Baud rate), Data bits, Parity, Stop bit, Flow Control ေတြကို ေရြးေပးပါ။ အခုျပထားတာက default setting ပါ။ baud rate ကအေရးႀကီးပါတယ္။ အဲဒါမတူရင္ အလုပ္မလုပ္ပါဘူး။ OK button ကိုႏွိပ္ပါ။

5. test1 Hyper Terminal window ေပၚလာရင္ command ေတြ႐ိုက္လို႔ရၿပီး response ေတြၾကည့္လုိ႔ရပါၿပီ။

6. တကယ္လို႔ response ေတြမေပၚရင္ disconnect အရင္လုပ္ File -> properties ထဲက Settings ထဲမွာ ASCII properties ကို၀င္ echo characters ကို check လုပ္ေပးလုိက္ပါ။

No comments:

Post a Comment