computer interfacing tutorial-printer, serial, game, usb port
 

 

BACK

Converter Parallel to Serial and Serial to Parallel

This converter can be built up by your self with cheap cost, this converter primerly builds up by using a microcontroller 89s51 or others family. This converter can convert serial to parallel or parallel to serial by setting up for pin I/O, this serial format follows the RS232 rule, with truth table as follow.

Before you can use this converter, you must programs the device by using a microcontroller programmer, visits this site for how to build and programs the device : http://www.mytutorialcafe.com/

 

I/O
Function ( D0..D7)
1
Serial to Parallel
0
Parallel to Serial

Download File ( s2p.asm and s2p.hex )

org 0h
call initserial
;
start: jb P3.2,p2s
s2p: call getin
mov P2,a
sjmp start
;
p2s: mov a,p0;
call Sendout
sjmp start
;===================================================
;Subroutine Sendout
;This subruoutine is to send a data from P0 serially
;==================================================
sendout:
detect: jnb ti,detect;
clr ti ;
mov sbuf,a ;
ret
;===================================================
;Subroutine GetIn
;This subruoutine is to receive data and sends to P0
;==================================================
getin:
detect1:jnb ri,detect1 ; Deteksi bit RI apakah data sudah diterima atau belum
clr ri
mov a,sbuf
ret
;
initserial:
mov scon,#52h;initialize serial mode 1
mov tmod,#20h;timer1 mode 2
mov th1,#0F3h;Reload value for baud rate 2400
setb tr1
ret
end

BACK

 

Free Software
Delphi

Lesson 1
Delphi Programming
1.1. IDE Delphi
1.2. Component


Lesson 2
Printer Port
/ LPT
1.1.Basic
1.2.Address
1.3.Port Register
1.4.8 Bit Data Input
1.5.Test Circuitry
1.6.Assignment

Lesson 3
Printer Port / LPT
Experiments

3.1.LED
3.2.Swicht
3.3.Motor Stepper
3.4.DAC
3.5.ADC
3.6.Graph Display

Lesson 4
Serial Port

4.1.Basic
4.2.Hardware
4.3.Port Register

Lesson 5
Serial Port Experiments

5.1.LED
5.2.Stepper Motor
5.3.Swicht
5.4.ADC

Lesson 6
Game Port
Joy Stick
6.1. Basic
6.2. Experiments