You are on page 1of 7

Microprocessors Hardware Project

Motion sensor

By: Abdallah Oqaily 20180703


Aya Abugharbieh 20180423
The main idea is to use a motion detector that transmits data via Bluetooth through our circuits into the
LCD. The data is counted daily and is stored in the memory chips.

The Bluetooth and 8086 scheme part:

First, we used a Digital motion sensor and connected it to a Bluetooth sender. Choosing a digital sensor
means that the only values that can be transmitted are either 0 or 1. We then set the Bluetooth sender
and Bluetooth receiver to a certain frequency so that the data gathered from the sensor can be
transmitted between both Bluetooths.

The data that comes out of the Bluetooth receiver is serial and the microprocessor only receives parallel
data. To solve this issue, we need a parallel/serial data converter. To do that we used the 8251 and the
rs232.

We use the rs232 is to create a transmission channel between the Bluetooth and the microprocessor
through handshaking signals. We also attached the voltage double by the capacitors for noise immunity.
The 8251 is one that gets the job done, which converts the data from serial to parallel and vice versa.
We gave the 8251 an asynchronous clock. To make sure that they run at the same speed we used the
14411 IC and a crystal oscillator to reduce the variations. We can also control the baud rate through the
modes and choosing speeds.

We set the mode register through a decoding circuit address 99h, as shown in the scheme.

Now we want to save our data on a RAM and ROM chip. To do that connect the microprocessor to the
74373 chip (address decoding) and then the RAM and ROM chips that were used. We also want to RAM
to be able to read from the ROM chip so the same data can be stored in both. To do that we used the
8255 chip.

To generate a clock signal, we used the 8253 chip since the 8254 wasn’t available. They are close enough
so it wasn’t an issue. We were able to generate it they way that is shown below.
To display the data on the LCD to show that someone has passed in front of the motion sensor we
connect to an 8255 chip. We used group B which consists of port B and the lower half of port C.

We programmed it on mode 1 so each port is independent of the other and port C will be used for
handshaking.

LCD Initialization
;port address

PORTB EQU 9DH

PORTC EQU 9EH


//cx=50 -> 1ms

proc lcd_init:

mov al,0

call out_c

mov cx,1000

call delay

mov ah,90h

call lcd_cmd

mov cx,250

call delay

mov ah,90h

call lcd_cmd

mov cx,500

call delay

mov ah,38h

call lcd_cmd

mov ah,9Dh

call lcd_cmd

mov ah,9Eh

call lcd_cmd

RET

endp lcd_init

Bluetooth Initialization:
Mov al,76h

Out cmd_p,al

Mov al,37h

Sub cmd_p,al

In al,cmd

Test al,02

Jz test_again
Test al,38h

Jnz error

In al, data_p

You might also like