TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 32

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)
Main Program Loop
In the main program loop, the green LED is flashed every 250ms, provided the LED test is not running. If the
test to be run is one of the analog or digital input tests, the input value is read and the relevant control is
updated.
High Interrupt
No high priority interrupts are expected nor provided for.
Low Interrupt
Two types of low priority interrupts are expected: when the clock ticks and when the pushbutton is pressed.
Every second, a SWI_Tick software interrupt will be received. When it is, the controls in the Real Time Clock
dialog are updated.
Note that the DT_Edit_8 modifiable Date-Time control does not require updating
because in FlexiPanel Designer it was specified as ‘linked’ to the Real Time Clock. This means that ToothPIC
automatically updates it when the clock ticks and conversely updates the Real Time Clock if the user modifies
the control. Every five seconds, a row of data is appended to the time matrix control. Note how the
FxPC_PartUpdate command is used rather than the FxPC_Update command to send the new data to the
client. This saves ToothPIC from having to resend the entire matrix – it just sends the new row of data
instead.
When the pushbutton is pressed, the appropriate message box is displayed. If a response is expected, this is
processed elsewhere – in the FxPEvent callback.
In both cases, the final step is to clear the interrupt flag. If the flag is cleared earlier, it allows another low
priority interrupt to occur. While this is possible, great care needs to be exercised to avoid stack overflow.
ErrorStatus and BMTEvent
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 we can inspect what caused the error.
For product release, it is obviously better to enter a failsafe state and/or reset.
FlexiPanel Server Events
If a client connects or disconnects, the red LED is updated accordingly. If the close button is pressed,
ToothPIC disconnects from the client.
If the Run Test button is pressed, the FxPC_SetDialog command is used to show the appropriate dialog to
the test and the analog or digital I/O pins and pushbutton interrupt are configured as needed. If the test
requires sampling the inputs regularly, the MSF_TestsRunning semaphore is raised so that the tests are run
in the main program loop. If any End Test button is pressed, ToothPIC returns to the Choose Test dialog.
Real Time Clock Dialog: If the date is changed, ToothPIC recalculates the day of week; if the daylight savings
time or summer time controls are changed, the real time clock’s daylight savings time event is updated; if the
seconds fraction controls are operated, ToothPIC retrieves or sets the time as appropriate.
Digital Outputs / Parallel Outputs / LED Test Dialogs: If any of the controls are changed, the outputs are
changed accordingly.
Memory test: If any of the Set Value or Get Value buttons are pressed, the memory location is retrieved or
modified.
Slider & progress test: If the slider control is adjusted, the progress control is updated. Note that the value
does not need to be copied from the slider to the progress control since they use the same storage locations.
Page 32
9-Apr-06
Toothpick 3.0.00007
DS380-8
© FlexiPanel Ltd
Patents apply and/or pending
www.FlexiPanel.com

Related parts for TOOTHPIC