White Board New Kit
There is a release for the new white board kits, with the new sensor type. I can not as yet compile for this as the CCS needs a full licence for this. Until there is perhaps some libraries made up.
Notes on Source
Edited source of the eZ430-Chronos development kit. Some changes for smaller space and less power, and a calculation slide rule application. Designed with the 16KB limit of the free CCS from Texas Instruments in mind. Things to note:
- It is impossible to remove the drivers library, as this contains 4 symbols to use the radio (appears so).
- It is impossible to lose the float support, as the function update-pressure-table remains linked (appears so).
I have added the Control Center to the source in a folder, as the download link is not there.
Sidereal and Moon Day
(v4) The seconds display has been replaced by a 180 day sidereal clock. This clock is synchronised to 0:00 when the time is set. It is useful for calculation of longitude and will display the same time for the same star rising above the horizon. The regular clock seconds are set to zero when the clock is set (to make an easy synchronise watches). The R icon is displayed when sidereal time is displayed, and SYNC is displayed instead of the sidereal time when the calculation range exceeds 180 days. A moon day number replaces the year display as the date second function. A number around 14 is at the full moon. Much size optimisation has been done to bring this feature in a small number of bytes.
(v3.2) The alarm will play for 10 seconds. It will use different notes depending on the day of the week, or stopwatch minutes. The tune is generated by some simple code. This ensures a compact size, for audio hints. The musicality is helped by only using a scale based on perfect fifths and octaves. With the implication then being the creation of perfect fourths and other simple harmonies. Note pairs are played at the same pitch, as the pitch is only changed once per second for minimal code size.
Day of Week
(v3.1) This simply displays the day of the week and day number in month where the date is in the default source. The calculation is accurate and will not fail in 400 years time, when your antique watch is a family heirloom. This is a bit tougne in cheek, but the millennium bug is past history. I built in this feature as I find it more useful to know the day of the week than the month I'm on. The day names are shown as the first two letters of the English day, but due to the limited display (power efficient though), do not always display well. The actual display font is part of the library, and it can't be changed in the limited edition of CCS.
(v5.1) So the latest is to have a 4 digit slide rule calculation aid. This gives better inverse conversion for say antilogs. The slide rule is placed just after the date on the bottom line. Pressing DOWN selects the function set. Pressing #HOLD selects the entry mode after selecting one of four functions indicated by pairs of digits in corresponding corners. Using UP and DOWN (HOLD for fast) set the input. Press # to calculate. Press STAR to EXIT.
The functions are scaled for effect. Calculation of inverse functions is somewhat involved repeated use and estimation. The functions are listed below, and should be with knowledge enough to go a long way in maths. The understanding of why this function set was provided is in itself a long lesson in maths. There are four groups of functions. An extra two functions per group are provided by long press of STAR and #.
- ROOT - root and related functions
- LOGS - log and arc tangent and related functions
- EXPS - exponential and related functions
- XTRA - prime estimate, times, divide and harmonic parallel (think electronics)
The root group is
- AR - x to the power of 2
- IR - 1 over the square root of x
- IN - 1 over x
- RT - square root of x
- x over 1 plus square root of 1 minus x squared (asin half angle formula)
- square root of 1 minus x squared over x plus 1 (acos half angle formula)
The logs group is
- LG - logarithm of x to base 10000
- HF - x over 1 plus square root of 1 plus x squared (atan half angle formula)
- AT - arc tangent of x (scaled such that 45 degrees is 10000)
- CC - square root of 1 minus x squared (circles)
- asin of x (scaled such that 45 degrees is 10000)
- acos of x (scaled such that 45 degrees is 10000)
The exps group is
- EX - exponential of x to base 10000
- CU - q function (scaled form 4 decimals to 3 decimals)
- ED - x times exponential x (scaled as CU)
- EI - exponential integral at the natural origin (scaled as CU)
- sin of x (scaled such that 45 degrees is 10000)
- cos of x (scaled such that 45 degrees is 10000)
The xtra group is
- LI - logarithmic integral at the natural origin (scaled to give primes less than estimate)
- TI - 2 digits times 2 digits
- DI - 2 digits over 2 digits (scaled for 2 decimals)
- HC - 2 digits and 2 digits in parallel (or harmonic) (scaled for 2 decimals)
- tangent of x (scaled such that 45 degrees is 10000)
- entropy of x (scaled to 4 decimals)
Temperature and Altitude
(v3) Pressing the UP button will switch from imperial to metric units. This does not alter the settings internal to the watch, and a different choice for temperature and altitude is possible. This allows then 12H or 24H format with any units. The changing of the time format will change all units to the opposite of those set. This then would need a few extra button pushes to restore your favourite units.
(v3) If the alarm is set to ON, then every five minutes the stopwatch will trigger the alarm. If the alarm is off, this will not happen. This allows an egg timer flexibility for the smallest code size. A more featured countdown timer will not be provided.
(v3) The bottom line now has less items. The ACC/SYNC/RFBSL functions have not disappeared. Go to the battery function, and press #HOLD. Each time the function in this menu slot will change. A little added bonus is the DOWN button on the battery display generates a random 4 digit number based on time and battery voltage with a little number feedback. It's not a perfect generator, but it is random as it uses environment sampling.
The bytes left in version v5.1 is 2499. The intent is to make some custom software in these bytes. There are still some further size savings possible, but they would increase power consumption in standby time display, due to an extra function call overhead. As time display is the main use a watch is put, this is somewhat important. Reclaiming some byte space in the setting routines, is however useful, even though this takes a fraction more power, as the setting modes are infrequently used, even though utility is perhaps the focus of this project. Everyone sleeps. I now have to think of some brilliant modes for later versions.
An attempt has been made to make the software as practically efficient as possible. The msp430 processor has a good power to work ratio, and so most optimisation has been where both size and power are both improved. Exceptions to this were based around the limit of floating point maths being compiled in, providing both add, subtract, multiply and by extension divide by constant. As integer division was provided, it was decided that all multiplication should be done in floats, and all division potentially translated to inverted floats multiplied, or converted to integer division. This leads to smaller code size, which is ironic on a chip with hardware integer multiplier. Not much can be done with the library code, but I suggest that the source implies a 30% shrinkage could be made with heavy trimming using the full edition of CCS.
The word untested in brackets occurs in some commits. This implies the source has not been compiled or tested, and so any binary directory, has all the .o files from the last tested commit. If you can operate the linker manually, then you should be able to build any RF frequency version of the latest tested build.