微波EDA网,见证研发工程师的成长!
首页 > 射频和无线通信 > 射频无线通信文库 > Bluetooth to 1-Wire communication using the DS9097U

Bluetooth to 1-Wire communication using the DS9097U

时间:02-28 来源:互联网 点击:

Bluetooth to 1-Wire communication using the DS9097U

Abstract:This application note explains how to enable communication between a Bluetooth® serial and Maxim® 1-Wire adapters. Topics discussed are: selecting the proper Bluetooth adapter, setup instructions, and sample code to enable the communication. The DS9097U 1-Wire COM Port Adapter is used to receive the Bluetooth commands.

-- ======================================================================= -->-- CONTENT: DB HTML -->-- ======================================================================= -->

Introduction

This article guides you through selecting the proper Bluetooth adapter, provides setup instructions, and presents sample code to enable communication with the Maxim 1-Wire adapter. The sample code provided is not intended as a complete solution, but rather as a starting point. The example code can be used to write a program for either a Windows® PC or a Windows Mobile® device. This example uses a Windows Mobile device.

Overview

Bluetooth is a short-range wireless technology originally intended as a cable replacement. It can send various types of information such as music, video, and data to other Bluetooth-capable devices located within 10 meters. Bluetooth has many protocols which handle the various types of data transfers.

This application note explains how to use the Bluetooth serial port protocol (SPP) to enable communication with Maxim's DS9097U 1-Wire COM Port Adapter. The DS9097U is a RS-232 to 1-Wire adapter that receives commands from a serial port and generates the appropriate signals required to communicate with 1-Wire devices. This document outlines the procedure to properly setup a third-party Bluetooth serial-port adapter. Example code is then provided for reading DS1920 temperature data from a Windows Mobile device using the Visual Basic 2008 Compact .NET programming platform and the serial-port control interface.

Required items

  • DS9097U COM Port Adapter
  • Bluetooth serial adapter (i.e., BlueSnap Standard)
  • Visual Basic 2008 Compact .NET
  • USB Bluetooth adapter for PC
  • Windows Mobile 6.1 (or 5.0)
  • Custom serial interface cable

Selecting a Bluetooth adapter

Two factors are involved in selecting a Bluetooth adapter that will be compatible with the DS9097U. First, consider the available current coming from the Bluetooth's DTR and RTS lines which powers the DS9097U (see Figure 1). Most RS-232 chips inside Bluetooth adapters should be able to supply the required current to power the DS9097U. If the adapter's specification does not have current parameters listed, then determine what RS-232 chip is used and verify its current-sourcing capabilities. Our application uses a BlueSnap Standard Bluetooth adapter from Serialio.com.


Figure 1. DS9097U schematic, DB-9 version.

Second, determine whether you can program the logic level of the RTS and DTR lines. The BlueSnap adapter did not allow this and required creating an additional cable to provide power from the 9V battery to both the RTS and DTR lines. This limitation prevented the use of 1-Wire standard libraries (OneWireLinkLayer.dll) which toggle these lines to reset the device.

Note: the Bluetooth's onboard firmware automatically toggles the RTS and DTR lines if handshaking is used. While usually convenient, it is detrimental in this application since these lines are the power pins for the 1-Wire adapter. If the Bluetooth adapter supports RTS and DTR control, the OneWireLinkLayer.dll can speed the programming development time.

Setup procedure

The following procedure outlines the required steps f

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top