Fungsi dari Serial Port dan Parallel Port

Leave a comment

Port merupakan suatu alat yang dapat digunakan untuk menghubungkan komputer dengan peripheral lainnya. Interface yang memungkinkan sebuah PC dapat mengirimkan atau menerima informasi ke atau dari peranti eksternal, seperti printer atau modem. Sebuah PC umumnya terdiri dari port serial, parallel dan beberapa port USB.

 

A. Serial Port

Serial Port atau biasa disebut dalam bahasa Indonesia adalah port seri merupakan sebuah port pada personal computer yang berfungsi untuk mentransmisikan satu bit informasi pada satu satuan waktu. Dalam serial port, pengiriman informasi tidak memungkinkan untuk melakukan secara banyak sekalius. Hal ini disebabkan karena dalam melakukan pemindahan data, biasanya serial port bekerja seri, misalnya COM 1 dan COM 2. Untuk penggunaan port serial sekarang ini sudah berkurang. Penggunaan port serial telah tergantikan dengan port USB dan Firewire. Sedangkan untuk jaringan (networking) fungsinya sudah tergantikan dengan port Ethernet. Berikut beberapa fungsi serial port yaitu menghubungkan antara peripheral (alat) computer lain dengan motherboard, penghubung antara mouse dengan motherboard, penghubung antara modem dengan motherboard, dan mentransmisikan informasi-informasi berupa bit-bit dari mainboard ke perangkat lainnya.

B. Parallel Port

Parallel port atau biasa disebut dalam bahasa Indonesia adalah port paralel merupakan sebuah port pada personal computer yang berfungsi sebagai alat komunikasi komputer (motherboard) dengan perangkat luar yang bersifat paralel. Pada port paralel, pemindahan informasi dapat dilakukan secara bersamaan sehingga informasi yang terkirim lebih banyak daripada port seri. Port paralel biasa dikenal dengan Printer Port atau Centronics Port. Fungsi port paralel adalah sebagai penghubung motherboard dengan Printer jenis lama, Zip drive, beberapa Scanner, Sound Cards, Web Cams, Gamepads, Joystick, pemrograman EPROM, peralatan SCSI melalui adapter paralel ke SCSI, percobaan dengan TTL 12 driver, dan External CD-R atau CD-RW. Selain itu, port paralel juga digunakan sebagi uji coba sederhana dalam perancangan peralatan elektronika.

Sumber : http://lischer.wordpress.com/2009/12/18/fungsi-dari-serial-port-dan-parallel-port/

Java : RXTX for Serial Communication

Leave a comment

Java supports communication to serial ports, but not with its default installation.  It requires an installation of an external library.  Currently, two options exist for achieving serial communication:

Unfortunately, the current version of JavaComm does not support Windows, and only supports Solaris SPARC, Solaris x86, and Linux x86.  Since I use none of those operating systems, this article will only discuss how to install RXTX in Windows.

A 32 and 64 bit version of the library exists.  For the 32 bit version the download on the RXTX download page will work (version 2.1-7 at the moment), but for 64 bit, that download won’t.  64 bit users need the version from Cloudhopper’s RXTX Page.  The actual installation process does not differ between the two, only the downloaded files do.

To install the libraries (instructions from JControl):

  1. Copy rxtxSerial.dll to %JAVA_HOME%\bin, (%JAVA_HOME% is the folder where JRE is installed on your system; e.g. c:\Program Files\Java\j2re1.4.1_01)
  2. Copy RXTXcomm.jar to %JAVA_HOME%\lib\ext

Once installed, the IDE will need to know where to look for these installed files.  Even though the files exist in the JRE directory, each project needs to know about these files.  More information on this website.

In order to start coding with this library, import gnu.io.*.  For more information about Java Serial Programming, look here.

Sumber : http://henrypoon.wordpress.com/2010/12/25/installing-rxtx-for-serial-communication-with-java/

Windows : Show COM Port

Leave a comment

Langkah-langkah untuk cek COM Port :

Ports

  1. Start > Settings > Control Panel > System
  2. Tab Hardware
  3. Klik Device Manager
  4. Cek bagian Ports (COM & LPT)

Atau lebih mudah dengan menjalankan command script (dibawah) yang disimpan di ports.bat and drag ke dalam quick launch bar :

reg query HKLM\hardware\devicemap\serialcomm
pause

Jadi setiap kali klik “ports.bat”, Anda akan mendapatkan list semua COM Port.

Sumber : http://blog.brush.co.nz/2008/05/com-ports/

Confirm Dialog

Leave a comment

Penggunaan Confirm Dialog amat diperlukan terutama saat operasi untuk menghapus / merubah data, sehingga user diberikan warning terlebih dahulu.

Berikut script sederhana :


<form id=”formCancel” name=”formCancel” target=”_self” method=”post” action=”” onSubmit=”return confirmCancel(formCancel);”></form>

 


// Javascript
<script language=”javascript”>

function confirmCancel(form)

{

if (confirm(“Are you sure to Cancel  ?”))

return true;

else

return false;

}

</script>

 

Sumber : http://www.javascripter.net/faq/confirm.htm

Hide Link in Status Bar

Leave a comment

Link di browser umumnya akan terlihat di status browser saat didekatkan oleh pointer mouse.

Cara menyembunyikan dengan :

<a style=”cursor:pointer” onclick=”location.href=’halaman.php'”></a>

Sumber : Anonymous

Manipulasi String : split

Leave a comment

fungsi split merupakan salah satu fitur manipulasi string yang digunakan untuk memotong string dan dimasukkan kedalam variabel array.

Syntax :

split($pattern, $string_sample)

Penggunaan

$arr = split(‘-‘, $string_sample); //akan memotong string apabila menemukan tanda ‘
echo $arr[0], $arr[1], …. //Penggunaan variable yang sudah di split

Untuk memotong string dengan pattern yang menggunakan tanda spesial character seperti titik (.) harus menambahkan tanda backsclash (\), sehingga seperti :

$arr = split(‘\.‘, $string_sample);

Get Value : elements

Leave a comment

“elements” merupakan function di Javascript yang memudahkan untuk mengambil/menetapkan value pada komponen form (textbox, dll) HTML. Namun pada penerapannya cukup merepotkan karena ada masalah kompatibilitas dari browser. Apabila penggunaan secara normal (tanpa melalui function), maka script tersebut tidak akan bermasalah. Namun dengan function, parameter form dan komponen nya (textbox, dll) harus disertakan dalam parameter agar dapat bersifat dinamis.

Browser IE dan Firefox

form.elements[textbox_id].value

Browser IE (Only)

document.form.elements(textbox_id).value

 

Note :
form dan textbox_id merupakan parameter.
– Perbedaan hanya dari “document”. Sehingga untuk amannya sebaiknya jangan menggunakan “document”.

 

Windows XP Service Pack 2/3 Halts on “Checking Product Key”

2 Comments

If you’re installing Windows XP Service Pack 2/3 and it halts or hangs on you while it is allegedly “Checking Product Key”, you can fix it like so:

  1. Please go into the CMD prompt (Start/Run –> cmd.exe )
  2. Then type cd /d %windir%\inf and make sure we are in that directory.
  3. Then type ren oem*.inf oem*.old, it will go back to the prompt after giving you some error (Do not worry about it)
  4. Then type ren oem*.pnf oem*.old1, it will go back to the prompt after giving you some error (Do not worry about it)
  5. Then goto start – run – type “%windir%\inf” and you will see the files in the folder.
  6. Then find the file by name INFCACHE.1 and take a backup of it to desktop (by copying it to desktop) and delete the INFCACHE.1 from c:\windows\inf.
  7. Close all windows and reboot the computer to safe mode and start the installation of SP2 and it should go fine.

 

Sumber : http://www.twistedethics.com/2007/10/15/windows-xp-service-pack-2-halts-on-checking-product-key/