Hello,
I plan to change XL_star into sound generating device (musical instrument is too much to say). The idea behind this is to use board movements measured by accelerometer to change frequency and volume of sound. If this device would be used by ballet dancer, we would have some interesting music 
Firstly I modified my XL_star board to prevent damage by accidentaly connecting USB cable to J1 socket without connected J6.
I located via which must be drilled

Then I bored through this via

Finally I checked that there is not any connection between 3.3V and C2

For additional safety I sealed J1 USB socket with tape (as I don't plan to use it in this design).

So now XL_star board is ready to project development.
CONCEPT
As I have written before, I plan to change XL_star into sound generating device. Each accelerometer's axis will control one parameter of sound.

Sound will be generated using internal 12-bit DAC. Its output (DAC0,J3 pin 23) will be connected to external active speaker.
30.08 - next steps
To easily generate different sounds, I plan to use 16-words DAC buffer. Samples of different waves (sine, triangle, square etc.) will be stored in memory and copied to DAC buffer (one switch will be dedicated to change sound). Buffer will work in continuous mode.
DAC will be triggered by PDB (Programmable Delay Block). There is 16-bit register DACINTH:DACINTL which determines delay between triggers and therefore sampling frequency.
31.08 - follow-up
How to change orientation into right frequency or amplitude value?
Orientations of MMA84512Q accelerometer: PU - Portrait Up, PD - Portrait Down, LL - Landscape Left, LR - Landscape Right:

In this application orientation PU will mean max. frequency and LR max. signal amplitude.
Acceleration at different angles [AN4068]:

It is sine and cosine function. To obtain angle between board and horizontal position it is possible to use arcsin function. As human ear sensing is logarithmic this angle should be involved to some power in order to obtain right change of frequency and amplitude (volume) of sound vs. board angle.
2. 09 - a little bit more
Software diagram

It looks simple. In order to keep interrupt service routine short, it will clear interrupt flag and set "new accelerometer value" flag only. IIC communication will be implemented in main loop.
Hardware modification (done Sep. 13 when I tought I will solve debugging problems and finalize project in time; output to 3.5 mm audio socket)

Sample code (not tested due to problems with debugger)
DAC and PDB initialization (square wave for testing, later planned array of samples):
/* Initialize DAC */
DACC0 = 0x00; /* disable DAC */
DACC1 = 0x01;
DACC2 = 0x0F;
DACDAT0H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT0L = 0xFF;
DACDAT1H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT1L = 0xFF;
DACDAT2H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT2L = 0xFF;
DACDAT3H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT3L = 0xFF;
DACDAT4H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT4L = 0xFF;
DACDAT5H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT5L = 0xFF;
DACDAT6H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT6L = 0xFF;
DACDAT7H = 0x0F; /* DACDAT = 0x0FFF */
DACDAT7L = 0xFF;
DACDAT8H = 0x00; /* DACDAT = 0x0000 */
DACDAT8L = 0x00;
DACDAT9H = 0x00; /* DACDAT = 0x0000 */
DACDAT9L = 0x00;
DACDAT10H = 0x00; /* DACDAT = 0x0000 */
DACDAT10L = 0x00;
DACDAT11H = 0x00; /* DACDAT = 0x0000 */
DACDAT11L = 0x00;
DACDAT12H = 0x00; /* DACDAT = 0x0000 */
DACDAT12L = 0x00;
DACDAT13H = 0x00; /* DACDAT = 0x0000 */
DACDAT13L = 0x00;
DACDAT14H = 0x00; /* DACDAT = 0x0000 */
DACDAT14L = 0x00;
DACDAT15H = 0x00; /* DACDAT = 0x0000 */
DACDAT15L = 0x00;
/* Initialize PDB */
DACINTH = 0x02;
DACINTL = 0x55; /*initial frequency value=peripheral clock/DACINT/16 samples; DACINTH:L = 600 */
PDBSC = 0x93; /* %10010011 */
PDBC1 = 0x1E; /* %00011110 */
PDBC2 = 0x00;
PDBMODH = 0xFF;
PDBMODL = 0xFF;
/* Initialize DAC follow-up */
DACC0 = 0x80; /* enable DAC */
Function to change frequency when acceleration is changing
/************************************************************************
* change_freq - Change PDB DAC freq *
*************************************************************************/
static void change_freq (byte *values)
{
int x, y;
/* Get X and Y values */
x = (values [0] << 8) | values [1];
y = (values [2] << 8) | values [3];
/* Change g value to delay
board Portait Up -> y = -1g */
y = 16384 + y; /* 16384 = 1g; higher g -> lower delay */
if (y < 150)
y = 150;
/* logarythmic correction */
y = y >> 6; /* change to 8 bits */
y = y * y; /* power of 2 */
/* PDB hardware trigger delay change */
DACINT = y;
/* PDBSC_LDOK = 1 to update DACINT */
PDBSC |= 0x01;
}
6.09 No progress due to debugger
Debugger can't connect to hardware, so I cannot load and test software 

7.09 Attempts to solve debugger problems
When I try to debug, "No connection" window appears.
In COMMAND window:
executing C_layout.hwl
!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,TOPPC 0xF88C
!OPEN procedure 0 39 60 17
!Procedure < attributes VALUES on,TYPES off
!OPEN register 60 31 40 25
!Register < attributes FORMAT AUTO,COMPLEMENT None
!OPEN memory 60 56 40 22
!Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,ADDRESS 0x80
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE
10,NAMEWIDTH 16
!OPEN data 0 78 60 22
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE
10,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory
done C_layout.hwl
Loading Target ...
Error: Device list is empty!!!!
SETCOMM DRIVER PROTOCOL|NOPROTOCOL PERIODICAL|NOPERIODICAL "<path to the GDI driver DLL>"
SETCOMM COMPORT NONE|USB|LPT|ETHERNET|ETHERNETFIP "<com device name>"
SETCOMM IPADDRESS "<IP address>"
SETCOMM DRIVER NOPROTOCOL NOPERIODICAL
SETCOMM COMPORT NONE
Error: Device list is empty!!!!
SETCOMM DRIVER PROTOCOL|NOPROTOCOL PERIODICAL|NOPERIODICAL "<path to the GDI driver DLL>"
SETCOMM COMPORT NONE|USB|LPT|ETHERNET|ETHERNETFIP "<com device name>"
SETCOMM IPADDRESS "<IP address>"
Error: The debugger is currently not able to run
due to loss of contact with hardware.
No Link To Target
in>
First I tried my program, then demo and always "no link" is displayed. Some time ago all
worked OK.
I debugged demo code and all was OK, then written some modification
to demo code (I used demo code and added DAC configuration, PDB configuration for DAC
triggering and function to modify DACINT register when value from accelerometer has changed)
and when I tried to debug, I had above mentioned problem Then I tried demo code and had same
problem.
I have found description of similar poblem: OSBDM doesn't recognize hardware
http://www.witztronics.com/Forum/viewtopic.php?t=31&sid=66d2893d592ee579b059f5f4bb0d7381
but reinstallation of driver didn't solve this problem. Demo code still works on XL_star
board.
Update Sep. 7, 12:04
At the moment, when I tried once again, Windows (I use XP SP3) displayed window that there
was a problem with HIWAVE.EXE ("Problem with HIWAVE.EXE, it will be closed"). So I will try
to reinstall CodeWarrior.
Update Sep. 7 15:02
I reinstalled CodeWarrior and problem exist. Additionally when I compile demo program, after
Make I have following message ("Errors & Warnings" window) :
Ignoring prm file "C:\Documents and Settings\..\Sample XL_STAR project\prm\Project.prm" in
project
I don't know why Project.prm is ignored because this is file for linker.
8.09 Further attempts to solve debugger problems
I installed CodeWarrior 10.1 but it also has problem with connection, so I'm afraid there is
a problem with board.



CW 10.1 programmed something (or erased) so now demo doesn't work only 4 LEDs are on: 3
green ones (D15 +3.3V, D14 +5V, D10 Tap) and one yellow D12.
9.09 Problem still not solved
Sep. 9 0:37
I created new project and results are same as before (except problem with prm file, which
disappeared)
There is same message with connected XL_Star and with disconnected, however, it is installed
in system.

When I connected J3, bootloader port was installed

And when I removed J3, all was as previous (devices are in system but debugger doesn't see
target).
10.09 It works!
Sep. 10 23:57
I used other USB ports, uninstalled CW, drivers, made register cleaning then installed CW -
still problem. Then I installed CW on another PC - it works! I was able to flash XL_Star
with demo program and it works. However, I still don't know what is the problem with first
PC.
11.09 Not so good - return of problem
When I tried today, problems showed on second PC. Mainly system error "Problem with
HIWAVE.EXE" (if board is connected with PC, otherwise debugger has problem with connection
to target). So I think there is a hardware problem.
13.09 Error in libusb0.dll
Sep. 13 1:49
Problem with HIWAVE.EXE is due to error in libusb0.dll. It is in version 1.2.1.0. I upgraded to 1.2.5.0 but it doesn't help.
When "HCS08 Open Source BDM" is selected in debugger there isn't any conection with target. When "FSL Open Source BDM" is selected, problem with HIWAVE.EXE (debugger program) is present. So perhaps it is software problem, but is on two different PCs with different OSes.
14.09 Third PC doesn't help
I added USB card to PC but problem was not solved.
Then I installed fresh OS on third PC (different achitecture - AMD processor) then CW but problem still exist.
15.09 Firmware upgrade
I tried to upgrade OSBDM firmware using P&E Micro Firmware Updater - perhaps this will help. Now firmware 29.3 is installed

I updated to latest ver. 30.7

Flash programmed and verified OK, but after removing JP3 device was not recognized by Windows


Then I connected JP3 and bootloader mode started. Firmware updater displayed error

I tried to load other versions of firmware (29.5, 29.7) but USB device (XL_Star OSBDM) isn't recognized. So after a week of struggle I'm out of competition (demo on XL_Star still works but now in bootloader mode only) 
Thanks for watching this blog 