Download PR22 PR22 - Cytron Technologies

Transcript
ROBOT . HEAD to TOE
PR22 – Reading Compass Module, Capacitive & Barometric Pressure Sensors
Interface
Capacitive
PIC16F876A
Sensor
with
To use the capacitive sensor, users have to solder 4 pin
header pin to the sensor.
Capacitive Sensor:
Figure 5
Figure 5 is a 2X16 character LCD. LCD connection pin
and function of each pin is shown:
3
4
VEE
RS
5
R/W
6
E
7
8
9
10
11
12
13
14
15
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
LED+
16
LED-
Pin function
Ground
Positive supply
for LCD
Brightness adjust
Select
register,
select instruction
or data register
Select read or
write
Start data read or
write
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Data bus pin
Backlight positive
input
Backlight
negative input
R6
Res1
1K
R7
Res1
1K
RC1
RC0
GND
RA5
Figure 7
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
RC2
3.3V
RC4
RC3
GND
3.3
SDA
SCL
AD7746
GND
Figure 8
RC2
Interface
Compass
PIC16F876A
Module
with
To use the compass module, users have to solder 4 pin
header pin to the module.
Compass Module:
Vss
Vcc
Vee
RS
R/W
E
DB0
DB1
DB2
DB3
DB4
DB5
DB6
DB7
LED+
LED-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
RA5
RB0
RB1
RB2
RB3
RB4
RB5
VCC
RC1
RC0
Connection
GND
5V
The capacitive sensor needs a 3.3V supply to operate.
The RC4 and RC3 pins are SDA pin and SCL pin of
PIC16F876A which require pull-up resistors. Refer to
I2C interface of PIC16F876A (3.3V) section.
RB6
RB7
Name
VSS
VCC
SCL
SDA
3.3
GND
Pin
1
2
LCD
DISPLAY
GND
3.3
SDA
SCL
LCD
Figure 6
Figure 9
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
4