TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 81

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)
BlueMatik Control
BlueMatik Management
BlueMatik is connected to USART1 on the PIC18LF6720. The following definitions can be used to control
BlueMatik directly.
Examples:
BMTCommand
The service BMTCommand sends a command to the BlueMatik module:
BMTCommand will return immediately the command has been sent. Any response from BlueMatik will be in the
form of a BMTEvent callback. The commands are:
CommandID (hex
value)
BMTC_Slave (01)
BMTC_Master
(02)
BMTC_Disco (03)
Page 81
unsigned char Channel = 1;
unsigned long ADResult;
SetADChan( Channel );
CyclesDelay16plus16times( 9 );
StartAtoD;
AwaitAtoDComplete;
GetADResult10bit( ADResult );
ADResult = (ADResult*5000)/1024;
BMTSleep
BMTWake
AwaitBMTOK
AwaitBMTConnect(TO)
ConnectSuccess
ClearSemaphores
BlueMatikSleep
ClearSemaphores
BlueMatikWake
void BMTCommand (unsigned char CommandID, void *pData, rom void *pDataR)
9-Apr-06
Toothpick 3.0.00007
Command description
Enter slave mode – module becomes
discoverable and accepts incoming serial
connections
Establish serial port service connection with
remote device
Disconnect current serial connection
Turns BlueMatik off. In addition call ClearSemaphores to reset the
state of the ToothPIC services with respect to BlueMatik
Turns BlueMatik on. In addition call ClearSemaphores to reset the
state of the ToothPIC services with respect to BlueMatik
pauses until the previous BlueMatik command is complete
pauses until BlueMatik connection is complete or TO units of 100ms have
passed, triggering abandonment of connection
True if BlueMatik connection successfully completed, False if
abandoned
DS380-8
© FlexiPanel Ltd
// select a to d channel
// 1.6us delay to charge S & H cap
// start a to d conversion
// await end of conversion
// get result
// convert to millivolts
// Go to sleep
// Wake up (Assumes ClearSemaphores)
Patents apply and/or pending
*pData (or *pDataR if pData is
null pointer)
ignored
Remote device Bluetooth ID
(unsigned char[6])
ignored
www.FlexiPanel.com

Related parts for TOOTHPIC