TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 43

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)
Initialization
When the application starts, the FlexiPanel server is initialized. Then the current settings are read from the
settings controls and the UART is initialized.
Main Program Loop
In the main program loop, the software flashes the green LED.
If an error is detected, the Red LED is allowed to remain lit for half a second; then, the UART is reset and the
LED is extinguished.
High Interrupt
If a character is received, a high interrupt is generated. HappyTerminal stores the data in the receive buffer
and sets the SWI_SWI1 software interrupt flag indicating that there is received data to be processed.
Low Interrupt
Two types of low priority interrupts are provided for: when the clock ticks and if the SWI_SWI1 software
interrupt flag is raised.
Every second, a SWI_Tick software interrupt will be received. HappyTerminal simply clears the flag and
returns.
The SWI_SWI1 software interrupt will be raised whenever there is data in the receive buffer to be processed.
HappyTerminal transfers the data to the main screen in ASCII mode or Debug mode as appropriate.
ErrorStatus
No errors are expected. However, it is always possible that ToothPIC will enter an unanticipated state and
generate an error. During development, it is best to set a breakpoint so that we can inspect what caused the
error. For product release, it is obviously better to enter a failsafe state and/or reset.
BMTEvent
Errors are handled in the same way as for ErrorStatus.
FlexiPanel Server Events
If a FlexiPanel Client disconnects, a FxPE_Disco event is generated and HappyTerminal returns to the main
screen if it was displaying the Settings screen.
If a FlexiPanel Client modifies a control, a FxPE_ClntUpdate event is generated and HappyTerminal deals
with the information as would be expected. In particular, note:
Page 43
• The I/O pins and semaphore flags are #defined.
Settings OK button. When pressed, the UART is reconfigured. If receive mode has been switched
between Debug and ASCII, a new line is started.
Transmit edit OK button. When pressed, the data is read from the edit box, interpreted as ASCII or
hexadecimal, and transmitted. The edit text is then cleared. If two-byte hexadecimal data was
expected but the data cannot be interpreted as such, transmission will be aborted and the word Error
will be written to the Transmit Edit text control.
9-Apr-06
Toothpick 3.0.00007
DS380-8
© FlexiPanel Ltd
Patents apply and/or pending
www.FlexiPanel.com

Related parts for TOOTHPIC