16th July
A Great Progress Day
I have been continuing SIT testing and today I have my project producing sound whilst responding to Wi-Fi datagrams.
Although this does not sound like much to most you will need to consider what is happening.
The Basic WiFi Demonstration uses a SPI port with interrupts to service the CC3000.
As not to interfere with this activity, I have connected the 256K FRAM buffer, DAC and LCD to the other SPI port.
The Basic Wi-Fi Demonstration also uses a Timer A for handling its events.
As not to interfere with this activity, I have used Timer B0 to generate a 8KHz Interrupt for sound and mouth articulation processing.
Sound is produced using a sample rate of 8kHz.
When the Interrupt Service Routine (ISR) for Timer B0 is invoked,
It firstly checks to see if sound is to be produced by checking the sound enable flag
If this flag is set then the following occurs
The FRAM Buffer is taken out of its hold state
The FRAM Buffer is accessed to obtain the next DAC value
The FRAM Buffer is accessed to obtain the next mouth value
The DAC is loaded with the new value
The mouth is loaded with its new value
The FRAM Buffer is put back into its hold state
The Timer is reloaded.
Using the hold state enables the use of quicker FRAM buffer accesses by utilising its auto increment address feature.
For SIT testing, this ISR is even more complicated because I have given it the ability to produce a continuous sound by relooping through the FRAM buffer.
I may leave this feature in because I am finding it useful. I am currently generating sine waves of a nominated frequency.
This feature would be useful for creating Alarm sounds.