TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 87

MODULE, BLUETOOTH, DATA ACQUISITION

TOOTHPIC

Manufacturer Part Number
TOOTHPIC
Description
MODULE, BLUETOOTH, DATA ACQUISITION
Manufacturer
RF Solutions
Datasheet

Specifications of TOOTHPIC

Svhc
No SVHC (15-Dec-2010)
Error code 0x0F (general error), is generated when BlueMatik responds with an error message but specifies
no error number.
understood. Error code 0x0F can also be generated (i) on disconnection if both sides attempt to initiate the
disconnection, or (ii) if data is sent before a connection was established or after it was closed (since BlueMatik
will try to interpret this data as a command). Note in particular that if a remote device disconnects while
ToothPIC is trying to send it data, a general error be generated. The correct response to this is to perform a
BMTC_Reset command to return BlueMatik to a known state. See any of the firmware solutions for an
example of how this is done.
BlueMatik Serial Communications
NOTE: As of ToothPIC 3.0.00005, the transmit buffer is not used and BMTTransmit will not return until the
data has been transmitted.
BlueMatik serial communications services allow you to send data to and receive data from Bluetooth devices
that BlueMatik is connected to. These services are not compatible with the FlexiPanel User Interface services
– you can use one or the other, but not both at the same time.
ToothPIC implements buffered I/O with fixed buffers of 256 bytes.
ToothPIC employs the buffers as circular buffers and the following variables and macros are defined in
ToothPIC.h:
To read and write data, the following macros and services are provided:
BMTTransmit
NOTE: As of ToothPIC 3.0.00005, BMTTransmit does not use the transmit buffer and it will not return until
the data has been transmitted.
The BMTTransmit service transmits serial data.
Page 87
• RAM locations 0x800 to 0x8FF are reserved for the transmit buffer
• RAM locations 0x900 to 0x9FF are reserved for the receive buffer
Definition
BMTRxStart
BMTRxEnd
BMTRxNChar
BMTRxEmpty
ResetBMTRx
BMTTxStart
BMTTxEnd
BMTTxNChar
BMTTxSpace
BMTTxEmpty
ResetBMTTx
Bool BMTTransmit(
9-Apr-06
Toothpick 3.0.00007
If custom commands are being sent, it probably means that a command was not
Function
Any data remaining in the buffer starts at pRxBuff[BMTRxStart].
Any data remaining in the buffer ends at pRxBuff[BMTRxEnd], having
wrapped around from the end to the beginning if necessary.
Number of characters in the receive buffer
True if the receive buffer is empty
Resets state of receive buffer (all data will be lost)
Any data remaining in the buffer starts at pTxBuff[BMTTxStart].
Any data remaining in the buffer ends at pTxBuff[BMTTxEnd], having
wrapped around from the end to the beginning if necessary.
Number of characters remaining in the transmit buffer
Number of spare bytes in the transmit buffer (max 255)
True if the transmit buffer is empty
Resets state of transmit buffer (all data will be lost)
unsigned char *pTxDataR, unsigned char *pTxData,
unsigned char nBytes, unsigned char msTimeOut )
DS380-8
© FlexiPanel Ltd
Patents apply and/or pending
www.FlexiPanel.com

Related parts for TOOTHPIC