V2.3 Page 10 of 15 February 2007
0xAC – DS18S20 Start Convert
Parameters: Port Pin – Selects the microcontroller port pin on the 16F877A to be used for
communication with the DS18B20 temperature sensor.
Returns: 1 Byte: A single byte indicating the result of trying to reset the temperature
sensor.
Sensor status definitions
: 99: Sensor ready
8: Short circuit detected
2: No sensor detected
Function: This function will select a port pin for communicating with a DS18B20
temperature sensor and start a temperature conversion. In addition to power and
ground connections, a 1.5K to 4.7K pull-up resistor must be connected between
VCC and the data pin of the DS18B20 for proper communication. The
conversion time for the DS18B20 is specified for a maximum of 750 milliseconds.
Example: 0x2, 0xAC, 0x30, 0x9E – Starts a temperature conversion on 16F877A port pin
B0.
0xAD – DS18B20 Read Data
Parameters: Port Pin – Selects the microcontroller port pin on the 16F877A to be used for
communication with the DS18B20 temperature sensor.
Returns: 9 Bytes: The contents of the scratchpad memory in the DS18B20.
Function: This function will select a port pin for communicating with a DS18B20
temperature sensor and request the current contents of the DS18B20’s
scratchpad memory. A conversion (command 0xAC) must have been previously
requested for the data to be current. Additionally, host software must wait at
least 750 milliseconds for the conversion to complete before reading the 9 bytes
of data. In addition to power and ground, a 1.5K to 4.7K pull-up resistor must be
connected between VCC and the data pin of the DS18B20 for proper
communications. (For an example of how to calculate .1°C resolution
temperature data from the 9 bytes of return data, refer to the example Windows
source code.)
Example: 0x2, 0xAD, 0x30, 0x9F – Requests 9 byte temperature data from 16F877A port
pin B0.
V2.3 Page 11 of 15 February 2007
0xAE – Reserved
0xAF – Loopback
Parameters: Data byte – The byte of data to be looped back to the host.
Returns: 1 Byte: The data byte written.
Function: This function will echo the specified byte of data back to the host. The port pins
are not affected.
Example: 0x2, 0xAF, 0x12, 0xBF – Requests the data byte 0x12 to be echoed back to the
host.
0x55 – Port A Read
0x59 – Port C Read
0x5B – Port D Read
Parameters: None
Returns: 1 Byte: The 8-bit data read from the selected port.
Function: This function will read the specified 8-bit port and return the results to the host.
The port is automatically configured as an input port. Port A must be configured
for digital I/O (command 0xA8) prior to using this command.
Example: 0x1, 0x5B, 0x5A – Requests a read from the 8-bit data bus Port D.
0x56 – Port A Write
0x5A – Port C Write
0x5C – Port D Write
Parameters: Data byte – The byte of data to be written to the 8-bit port.
Returns: Undefined
Function: This function will write the specified data byte to the 8-pit port. Data is latched on
the port pins until changed by another command. The port is automatically
configured as an output port. Port A must be configured for digital I/O (command
0xA8) prior to using this command.
Example: 0x2, 0x5C, 0x12, 0xBF – Writes the data byte 0x12 to the 8-bit data bus Port D.
V2.3 Page 12 of 15 February 2007
TABLE 1: DLP-245PB-G PINOUT DESCRIPTION
Pin # Description
1 GROUND
2
E0 (I/O) Port Pin E0 connected to the 16F877A microcontroller. A/D Channel 5.
3
A0 (I/O) Port Pin A0 connected to the 16F877A microcontroller.
A/D Channel 0.
4
A1 (I/O) Port Pin A1 connected to the 16F877A microcontroller.
A/D Channel 1.
5
A2 (I/O) Port Pin A2 connected to the 16F877A microcontroller.
A/D Channel 2.
6
A3 (I/O) Port Pin A3 connected to the 16F877A microcontroller.
A/D Channel 3.
7
A4 (I/O) Port Pin A4 connected to the 16F877A microcontroller.
Open drain output.
8
A5 (I/O) Port Pin A5 connected to the 16F877A microcontroller.
A/D Channel 4.
9
UPRST (In) 16F877A Reset input. Can be left disconnected if not used.
10 GROUND
11
RESET# (In) Can be used by an external device to reset the FT245RL. Can be left disconnected if
not used.
12
No connect
13 GROUND
14
3V3OUT (Out) Output from the integrated L.D.O. regulator. Its primary purpose is to provide the
internal 3.3v supply to the USB transceiver cell and the RSTOUT# pin. A small amount of current
(<=5mA) can be drawn from this pin to power external 3.3v logic if required.
1
21
20
40

DLP-245PB-G

Mfr. #:
Manufacturer:
DLP Design
Description:
MODULE USB-MCU FT245RL W/16F877A
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet