Digital Music Player's are one of the many sensational devices that were developed in the 20th century. They have been around for a while now and have become a part of our life. In the last few years, they have been integrated within Smart Phones and hence, have reached the masses. Now, Let us try to dive into knowing how these devices work and I guarantee that we all would be fascinated by the kind of engineering which goes into making these magic boxes. There are various topics which must be covered in order to build our own music player and so there will be several blogs to build a SOUND foundation. Now let us make a list of the required components and then we will walk through each of them in the upcoming blogs. There are 3 basic parts which are required to build a device which can output Audio:- Storage Medium. Micro-controller. Audio Output device. We will store the required music file onto a storage medium as the onboard memory on a microcontroller is low...
In the last sections, we discussed the communication protocols in general and then shifted to discussing the Spi in detail. The last discussions were based on the hardware part of the MCU and Spi peripheral but from this section, we will shift our focus to the software implementation. We have already discussed that any digital circuitry requires binary instructions i.e, we need to provide the machine language(binary) code. Now we can either write our program in assembly language which is more user-friendly than the machine code or we can write in other high-level languages such as C.The assembly code is a low-level code i.e it is much more dependent on the architecture of the processor. Hence the use of a higher-level language such as C is much more efficient as it is portable across all the architectures. There are some cases in which the use of assembly is preferred such as while writing the Reset handlers or accessing the CPU registers, but other than these cases, ...