Maker Pro
Maker Pro

A BBC Microbit programmer asks for analog electronics advice

Hi,
I am just starting to look into possible programs for the BBC Microbit. The specifications are listed here:

http://blogs.freescale.com/iot/2015/07/microbit-unveiled/

This little machine has 3 DAC convertors that output +3v - 0v. I'm looking to see if a 48MHz Cortex 0 can, with 100% assembly language, support MP3. If not, I will simply use ADPCM.

My question is this - earbud-type headphones run ±1.5v. Is there a way to shift down +3v - 0v down to ±1.5v.

This may be a stupid question, but having only 3 DACs, I can't use 2 channels with the output inverted (there is also a 3v out). If I had 4,,, but I don't.

If this is possible, I will begin a complete decoder. 20 years of assembly-language games programming mean that I know how to get the most out of even tiny computers (Tomb Raider on Color Gameboy for example).

With thanks for you patience.
 
PS If anyone needs bits of assembly language for Microbit projects, I am more than happy to write gratis - I'm doing this purely as therapy (severely disabled) AND to make the microbit an even bigger hit.

I should add that the MP3 patents ran out in March 2014 in the UK. They have tried adding later patents to just part of the encoding/decoding system BUT you cannot patent that which is common knowledge, and since the original patent had ALL of the MP3 parts in it, a UK court would not uphold it. In the US, it IS still covered by these later patents, but luckily, not in the UK.

If all goes to plan, a fixed-point ARM THUMB version will work at 48MHz. Now, only 16K of RAM poses some interesting issues ;-)
 
Program the DAC to be centered at 1.5V and use a capacitor in series with the headphones. This will make the voltage on the headphones ±1.5V.

However, there is probably no enough current available to drive the headphones. You might need a headphone amp in between. You also probably will want a filter to block the DAC frequency.

Bob
 
Thanks Bob. That's a big relief. Building the headphone circuit can be one of the projects for the machine.

While the BBC saw the Microbit as a simple project box, I pointed out that, with headphones and a speaker (the 3 lines can be DAC or ADC), using the bluetooth to broadcast speech, an ordinary classroom can become a language-lab. The teacher can broadcast to the whole class then listen to a single student via ADC.

Now I am waiting for Tech Will Save Us to confirm that the memory-stick can be accessed so the MP3 streams off the stick. Audiobooks and the BBCs large number of podcasts of science, history, mathamatics and so on would allow students to learn anywhere.

Statistics show that poorer kids do worse at school. Makes sense. If the (male) pupil shares a bedroom with 2 younger brothers, where do they find the space to concentrate. Lessons could be recorded, the teacher just handing out the graphical elements will save money AND give kids some measure of mental privacy to work.

The headphone microphone can also be used for informal tests. Yes has an unvoiced portion (white noise) while No does not so I won't need a complex algorithm to figure out the answer. Additionally, if a pupil gets a low mark, they can re-listen to the lesson and a second test is given.
Bluetooth sends the results back to the teacher.

The idea is to allow each pupil to work at their own pace. I was terrible at languages until I lived in another country and was immersed in the language. I learned by watching the BBC news in English then, 1 hour later (1 hour time-difference to UK), I would watch the Dutch news and because I knew what the story was about, I could learn it more easily. Tricks like that could be used.

I just see that the possibilities are huge. How huge depends on some technical details that only 1 guy seems to know (so it looks like 1 hardware designer). The Fixed-Point MP3 will only work if the Cortex M0 has the 1-cycle multiply. Without that, I MAY be able to use Log/Antilog tables but it will be a struggle.

I guess my first love is assembly language and if they take the scoreboarding out of the CPU, the instruction after a branch is always executed (like the SH2).so no empty pipeline stages... it's that level of optimization I will be gunning for.

Marked as 0.93 dhrystones per MIP, I'm looking at 44-45 million instructions per second....
 
Top