ThaiIO.com

PC interface Hardware and computer devices resource,serial port,USB,Parallel port,Wireless.

Today , 2007
December 18th, 2008

VB สั่งงานด้วยเสียงโดยใช้ MS speech engine

et say that you already installed MS speech engine and other training session.
มาทดลองเขียนโปรแกรมสั่งงานด้วยเสียงพูดกันนะครับ แต่อันดับแรก ต้องติดตั้ง MS speech engine สะก่อนครับ สำหรับถ้าใครยังไม่ได้ลง

http://www.microsoft.com/msagent/downloads.htm
1. ใน Visual basic software เราต้อง open component window จากนั้นหา ชื่อคอนโทรลชื่อว่า “Microsoft direct speech recognition”
2. Drag and drop control ไว้ใน design form ของ vb project .ซึ่งคอนโทรลนี้จะมีสัญลักษณ์เป็นรูปหู ดังรูปที่แสดงด้านล่างครับ
 

ตอนนี้เราต้องมาสร้าง gramma file และ voice command  ที่จะบันทึกไว้ Read the rest of this entry »

November 30th, 2008

Google Map ติดต่อกับ GPS โดยใช้ Visual basic

   หลังจากที่นำเสนอเนื้อหาเกี่ยวกับ GPS มาแล้วนั้น บทความนี้จะนำเสนอวิธีง่ายๆในการใช้งานกับอุปกรณ์ GPS โดยจะสร้างโปรแกรมด้วย Visual Basic 2005 ในการเขียนโปรแกรมติดต่อกับ GPS

  ในโครงงานนี้ ไม่ได้ใช้ GPS ราคาแพงอะไร แต่ผมใช้ GPS รุ่น Garmin eTrex Legend handheld ราคาเครื่องละ 3500 บาท ซึ่งมีขนาดเล็ก แต่ไม่ได้เป็นระดับ High End อย่างแน่นอน

   สำหรับคอมพิวเตอร์ของผมนั้นไม่มี Serial port แต่ได้หาซื้อสายยี่ห้อ a Belkin USB  adapter(an F5U109) ซึ่งเป็นสายในการต่ออุปกรณ์ภายนอก ผ่าน Serial port

   สำหรับโครงงานนี้ ผมจะนำค่า ละติจูด กับ ลองติจูด มาใช้ใน Google Map ซึ่งก็ไม่ยาก ตามมาตราฐาน NEMA 0183 ซึ่งเป็นตัวอักษรที่ได้มาจากเครื่อง GPS แต่เราจะและนำมาใช้เพียงตัวเลขของละติจูด กับ ลองติจูด โดยข้อความดังเช่น

   N33.455,W85.334

 ซึ่งในโปรแกรมของเราก็จะแสดงค่าที่รับมาจาก GPS ผ่านทาง Serial port นั้นเอง Read the rest of this entry »

October 15th, 2008

เขียนโปรแกรมติดต่อ Serial Port ด้วย C#.NET

Introduction

บทความนี้, ผมจะนำเสนอวิธีกาีรเขียนโปรแกรมติดต่อกับ Serial Port บน .NET platform โดยใช้ C# .NET framework version 2.0 ซึ่งมีคุณสมบัติติดต่อกับ serial port ได้. Framework กำหนดให้ใช้ Namespaceชื่อ System.IO.Ports. Framework ใหม่นี้สามารถที่จะติดต่อสื่อสารข้อมูลผ่าน Serial Port บนคอมพิวเตอร์เราได้ และติดต่อกับอุปกรณ์อื่นๆที่ผ่าน Serial port ได้เ่ช่นกัน เราจะใช้ RS 232 C standard สำหรับการติดต่อระหว่าง คอมพิวเตอร์ด้วยกัน ในโหมด full duplex แต่ในที่นี้ผมไม่ได้ใช้ การทำ handshaking หรือ flow control นะครับ ผมจะ้ใช้การต่อแบบ null modem เพื่อการสื่อสารครั้งนี้

สร้าง SerialPort Object

สำหรับการสร้าง object นี้ เราจะสามารถเขียนโปรแกรมเพื่อควบคุมการทำงานของ object นี้ในการติดต่อสื่อสารแบบ Serial Portสมาชิกของ SerialPort class ที่เราจะใช้มีดังนี้

  • ReadLine(): อ่านค่าแบบเป็นบรรทัดแล้วเก็บไว้ใน input buffer. ถ้าไม่มีข้อมูลมาใหม่ก่อนเวลา timeout method นี้จะส่งค่าคืนเป็น  null
  • WriteLine(string): เขียนข้อมูลที่เป็นสตริง และส่งข้อมูลบรรทัดใหม่ไปที่ output buffer.
  • Open(): เปิดการติดต่อ serial port
  • Close(): ปิดการติดต่อ port

Code สำหรับการสร้าง SerialPort object

//สร้าง Serial port object
SerialPort sp = new SerialPort ();

Object นี้มี public constructors 7 ตัว แต่ผมจะใช้แค่ไม่กี่ตัวที่ใช้เป็นกำหนดค่าเริ่มต้นเช่น DataBits กำหนดไว้ที่ 8 และ StopBits กำหนดไว้ที่ 1หมายเลข  Port  กำหนดไว้ที่ Com1The public properties ของ SerialPort class มีดังนี้

  • BaudRate: ตั้งค่าหรือตรวจสอบค่า baud rate.
  • StopBits: ตั้งค่าหรือตรวจสอบค่า stopbits ต่อ byte.
  • ReadTimeout: ตั้งค่าหรือตรวจสอบค่า เวลา timeout ในหน่วย milliseconds ก่อนเกิด timeout เมื่อการอ่านข้มูลทำงานจบ.

มีหลาย public properties แต่จะของแนะนำแค่ 3 ตัวที่กล่าวมาซึ่งตัวอื่นจะเป็นค่า default อยู่แล้วสำหรับการทดสอบโปรแกรมบนเครื่องคอมพิวเตอร์เดียวนั้น ให้ใช้วิธี LoopBack คือ หา DB9 connector มาสักหนึ่งตัว แล้ว ต่อสายระหว่าง Pin 2 กับ 3 เท่านี้ก็ทดลองได้แล้วครับ Read the rest of this entry »

July 23rd, 2008

Fourier Transform Software with Visual Basic Programming

 We will be use visual basic to develop software for fourier transform with used to data in a timely area of the frequency range, and vice versa. The forward-Fourier Transform-or simply Fourier transformation is the time for the frequency domain transformation. The Fourier transform is used to reverse the process. Here you’ll find a Visual Basic example of the application of Fourier Transform program with the method of correlation.

  Read the rest of this entry »

July 23rd, 2008

New Input/output parallel port driver for Win XP 64 bit

What New?

   For 64 bit capable Windows versions arrive, We had used inpout32.dll present then if it is 64 bit version so that 64 bit windows developers also can take advantage from programming parallel port.

Ported issue  to Windows XP 64bit Edition (XP/2003 x64 Editions) as the 32bit driver will not install or run on x64 systems.

For this new version will be support both 32bit and 64bit systems running under WOW64 as 32bit applicaitons, and, with a new DLL, pure x64 applicaitons. Read the rest of this entry »

May 5th, 2008

Programming in Assembly to control IO Printer Port Part 2

    In the part 2, we will learn about controlling program Printer Port and Card 8255 I/O Port by Assembly that can be changed to be language of computer by using Assembler program like SXA-51, Cross-16, Cross-32 that can program by Editor, and then keep in file name .ASM. When comply have finished, will get file .Hex. If we use micro controller like 8051, 8052, 8055, etc. We can take file .Hex to put at CPU by EMULATOR PROGRAM CPU, but I will recommend to use Debug in your PC by typing Debug at C:\> on Dos in order to be learning to use mnemonic code that consist of the main 3 parts like the followings,

1.      Operation Code consists of 2-4 alphabets such as MOV, SJMP, etc.

2.      Operand is operated; it will be the set of alphabets that notify operation that will be one set or 2 sets. If there will be 2, it will have comma (,) like A, #20H, etc.

3.      Comment is explanation the meaning of codes that will be preceded by semicolon (;).

The group of commands of mnemonic code, are divided into 4 main groups,

1.      Logic, such as AND,OR,XOR,NOT

2.      Mathematic  such as INC,DEC,ADD,SUBB,MUL,DIV

3.      Control to manage working

4.      Processing as Boolean

 

The table of writing command doing with data

How to do with data

Examples

1. Directly do at memory position
2. Indirectly do at register position
3. Directly give value with memory
4. According to value of Register
5. According to arrangement
6. Do according condition

MOV A,8CH
MOV A,@R1
MOV A,#7FH
MOV A,R7
MOVC A,@A+PC
INC DPTR

 

The table of the basic command of Assembly

Commands

Examples

Meanings

MOV

MOV A,R1
MOV A,14H
MOV A,#7FH
MOV P1,A

Using for transferring data from start to terminal.
there will be P1 is using to send value out at
Output leg of microcontroller such as 8051,Z80

ADD

ADD A,R1
ADD
A,14H
ADD P1,A

Using for adding data that will have A on the left, if Add R1, A <—- X wrong.  

ANL

ANL A,R1

Is to And value, then keep at the terminal.
<– This is doing And value in A with R1, then keeps value in A as usual.

CJNE

CJNE A,#02H,OUT
MOV P1,#01H
END

Is to do comparison, if the value isn’t be equal, it will skip working <– such as value A isn’t be equal with 02, it will skip at the line named OUT, if to be equal, will take value at P1.

OUT

OUT DX,AL

For sending to PC Port

CLR

CLR A

For clearing data as zero
<– A=0

INC

INC R1

Increasing value> R1=R1+1

DEC

DEC R1

Decreasing value > R1=R1-1

JNZ

ADD P1,A

Skipping to other Label, if A(Accumulator) isn’t be zero

ROR

ROR AL,1

Moving data bit to the right, 1 bit 1 time 1=0001—>1000

ROL

ROL AL,1

Moving data bit to the left, 1 bit 1 time 1=0001—>0010

LOOP

LOOP 0123

For looping working at Address 0123

INT20

INT 20

Show output on screen.

INT21

INT 21

Getting value from keyboard.


Programming to control Card I/O 8255 port in Debug

1. Type the word, Debug at C:\ then will get on the below line.
      2. then, type a, that will get data.
      3. Type
Code like this,

   

4. Press Enter 1 time, then type P or R, you will get for running program that continuously Enter, it will have result like this,

 

     

      From the method I mentioned is experiment to easily program, but writing for real using, you have to write Editor so that you can keep and edit in the next time.

May 5th, 2008

Programming in Assembly to control IO Printer Port

From the article of Assembly, I introduced controlling port of Card I/O 8255 that is card that extends parallel port. Many people might not try to do because there is no card. This article is another method that uses controlling I/O through Printer port getting and sending signal.

The command used to control I/O Printer Data Port
send signal out Printer Port, we use the form of command like this,

OUT Address data port, Value
Address data port of
printer=0378
Value that will send to
printer data port, the number that control 8 bit is 00-FF.

OUT DX,AL

Read the rest of this entry »

May 4th, 2008

Programming in Pascal to connect Parallel Port

Pascal is the another language that can program to connect controlling out of computer‘s port, such as Serial Port, RS-232, Parallel Port, Printer Port. Generally, many languages will have function for sending value and reading value from port.

Although, there is no language, it can be programmed to directly connect along port. So, you have to use the function from DLL file for sending the function that send and read value from port of Pascal like the following, Read the rest of this entry »

May 4th, 2008

Programming in Visual C++ to connect through IO Serial Port Part#2

From programming in visual c++ to connect through i/o serial port #1 for send and receive data with serial port , In this section ,We will learn controllering program communication with serial port by programming in vc++ 6 to create simple program using basic in the part 1 .

1. New project Microsoft VC++ 6 Read the rest of this entry »

May 4th, 2008

Programming in Visual C++ to connect through IO Serial Port1

The context is the fundamental of programming principle by MS Visual C++ 6 connecting through Serial Port of the computer in sending and getting alphabet. For the form of how to programming that will not have ready-made control that will be used like Visual Basic. In this section, you have to use programming principle as reading and writing data file. Anyhow, the data that will be got and sent out to port is like reading and writing data on file. I prepare the step for understanding in programming like this,

4 steps for connecting Serial Port

1. Set variable for keeping file names, data read (Buffer),file handles, value of getting and sending data.

HANDLE hComm; // handle for COM port
DCB dcb;
// data structure that keep value for connecting serial port
char * chCommPort = “COM1″; // we use com port 1
int valReturn; // keep returning value back in some function.
char chBuffer; // keep alphabet in getting and sending data.
unsigned long nReadPort; //keep returning value back in function, ReadFile
unsigned long nWrittenPort; // keep returning value back in function, WriteFile Read the rest of this entry »

1950 ford stereo receiver dino quest toys by lontic company that sale butter churn MONTEVERDI & YOUNG DESK little rascals cabin fever dvd brobee plush chair gourmet pork Customer contact for RCA camcorder hannah montana uno spin Tramontina Stainless Steel Whistling Tea Kettle - 2 Qt Sony VGN-SR140E/B black pants 3-6 months norelco bg2030 Lego Batman The Tumbler Joker's Ice Cream Surprise dilantes chocolate +Rhymerroadbooks bitty baby snowsuit set Sorry slider apw international oxygen sensors US Marine Corps Perennial Hooded Sweatshirt JTV lab created white sapphire oval loose stone sugar lips tank tops hydraulic hooded peacoat hoover f7428900 test sony ebook PRS-700BC PDR Pharmacopoeia Pocket Dosing Guide 2009 - 9th Edition free mens health care sephora Lorac Croc Mocktail lip gloss collection the twilight saga bookset Sony VGN-SR140E/B kenco sliding windows best 1965 gifts Christmas hurst competition plus install kit 3733167 conair nails glitter gem beauty set bonus set gr1102 great gizmos baby's first christmas lovey carters Bianca Black and White Bath Towels Miller 300026 No 50Hd Heavy Duty Cart Lego Batman's buggy; the escape of mr. freeze bearpaw T410 boho holiday dessert plates Beverages Shop Teen XXX Hardcore free porn videos dating tutorial lesbian BDSM anal creampie Celebs naked old mature anal ethnic pussy asian shemale fuck dating articles Interior Accessories Shop free xxx cheapest viagra in uk cheap viagra viagra rise levitra alternative levitra vs viagra soft tabs cheapest online cialis 24 hour delivery canadian rx drugs bigtits i made free pornstars drunken asian girls BIGNATURALS big fat booty lessons in blow jobs porn fuck free porn videos free anal old mom video milfs amateur blowjob cheapest online diazepam 24 hour delivery cheap levitra rx pills buy lorazepam cheap cialis buy cheapest generic valium purchase new report female zyban order oxazepam prescription cheapest generic xanax viagra order herbal klipal for woman levitra buy drugs online buy herbal tramadol cialis soft tabs levitra cialis best herbal viagra soft tabs uk cialis buy viagra on line viagra levitra women buy cialis online without prescription natural levitra substitutes cheapest generic viagra cyber pharmacy propecia viagra soft tabs studies women