Thaiio.com

Thaiio is the best of PC interfacing Electronic Hardware and Devices resource.

Today , 2007
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 »

May 3rd, 2008

C++ communicate Parallel Port and Serial Port

C language is the one of good complier for interface program via Serial Port,Parallel Port,Card I/O 8255 with output devices.

Programming Microsoft Visual C++ 6 communicating Parallel Port

Outp(port,bytedata)

Send value out port as byte

Outpw(port,worddata)

Send value out port as word

Such as Outp(0×378,0xF1)

Outpd(port,worddata)

Send value out port as byte double words.

inp(port)

Read value as byte from port

inpw(port)

Read value as word from port.

Such as inpw(0×378)

inpd(port)

Read value as double words from port.

You can notice that the structure of function is like programming by VB because Dll File that is used in VB that is written from C. I will not mention the fundamental of communicating port. Read the rest of this entry »

May 2nd, 2008

Programming in Visual C++ 6 to connect with I/O Parallel Port

I have already mentioned the content about C, C++, connecting with PC Port. It’s not too hard. It’s hard at graphics that we write to put together with using, especially program ran on DOS. In this present, programming as Visual is populating because it can be GUI conveniently and not too hard. So, I try to use Microsoft Visual Basic 6 that is in Microsoft Visual Studio 6, for function and step of programming code for connecting port is not much because wizard program of MS VC++6, is created all for us.

In this program, we will use file conio.h that is include file for using function _outp() and _inp()

In this section, I will do as explanation with pictures (Visual Learning), controlling with messages and the arrange of number shown because if you write explanation as the last contexts, you will be hard to understand. Read the rest of this entry »

May 2nd, 2008

C++ communicate Serial Port as polling

I present you about programming by C, version that runs on DOS because there is easier explanation than program as visual that runs on Window that you can notice the article about MS VC++ 6 communicating with Parallel Port and also you can write and try to do by yourself. You can use TurboC because just 1 Mb compiler.

From the part 1, I mentioned about communication as interrupt. In this part, I will present you about communication as polling. The working like this, the flow of data will not be smooth. CPU cannot anticipate that when the new data arrive. It will verify the time with getting and sending data by speed rate that is higher than speed rate that send through keyboard. Read the rest of this entry »

May 2nd, 2008

C++ communicate Serial Port as interrupt

It’s C/C++ in programming to communicate with Serial Port or comport (RS-232). The program I recommend here can communicate between two computers that can send message to each other as interrupt.

For here, we will use Borland C as complier, but you will see me use // that I make for programming explanation. There will be code for reference inter like the following,

Intervector –> use setvect()function for setting the value of IRQ

Intervector –> use getvect()function for the value of IRQ

Intervector –> use for setting of Programmable Interrrupt Controller

Intervector –> use for setting in order to cancel using intervector

Comm Setting –> will use the value in setting rate of Baud rate, the number of bit in transferring data, stop bit, control register FIFO, open DTR-RTS-OUT2. Read the rest of this entry »

May 1st, 2008

Writing DLL file by Visual C++ 6, connecting IO Parallel Port

We can’t program by using Visual Basic, then connecting through Parallel port directly. We have to create DLL (Dynamic LInk LIbrary) file in order to borrow function connecting I/O port of the other languages to use. We can program by using functions that can connect port. In this article, I will present programming by C++ first. For someone who likes to program by Borland Delphi, click here. Let’s begin program DII file by MS VC++6 by using function connect with Input and Output of port like this,

  1. _Inp that is function that will read value from input port’s position that has the function like this,

_Inp = read value as byte, we will set function name in order to be use in VB- - - > inpVB

_Inpw = read value as word, we will set function name in order to be used in VB - - - > inpwVB

_Inpd = read value as double words, we will set function name in order to used in VB - - - > inpdwVB Read the rest of this entry »

April 29th, 2008

Programming in Visual Basic to control through network part 4

We have got to know the contents about sending message through TCP/IP. So, we may understand how to use Winsock to connect via TCP/IP. So now, we program in order to send via data, so, we have to firstly make understanding by dividing data file into 2 types in the following.
•    Sequential File
•    Random File
In this content, we mention how to manage file as Random File that has more advantage than Sequential File. It can be quickly opened by not arranging data as Sequential File and enter to Record.  Read the rest of this entry »

October 12th, 2007

VC++ remote debugging connection with internet protocol

From my problem in seek the data something for remote debugging in internet but do not meet .After i know the way , so ,i write come to give friends get to know for take keep use with step by step.

1. Select menu “Project ->Setting” thus as picture below

vc++ remote debugging

2. Define EXE file path on target machine(computer) thus picture below.remote debugging for vc++ Read the rest of this entry »

|
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