exists a DMA-like feature which will retrieve bytes from the flash memory and send them directly to the MP3 UART that serialise them and forward them, one bit at the time, to the MP3 decoder chip.
If we juxtapose this solution to a simple state-machine solution we notice that whereas a simple state-machine is very (power-) efficient and fast, its configurabilty and upgradability after manufacturing is actually nil. Utilising a microprocessor with a modifiable firmware program makes it possible to add new functionality post facto. It will also be possible to cir- cumvent problems discovered at manufacturing time to a certain extent. Moreover it allows the user to customise and enhance the firmware herself, if desired.
The following sections elaborate on different blocks of the design.
The clock keeps track of how long the songs have been played by way of an independent hardware unit that communicate with the processor using memory ports. It counts cycles independently of any processor activity or similar, and have three 8-bit registers that count seconds, minutes and hours in BCD (binary coded decimal) form.
The registers are read by firmware machine-level instructions after requesting a flush of current register contents. This is done to avoid read problems arising from the fact that e.g. the seconds switch from 59 to 00 after reading the seconds register, but before reading the minutes register, so that for example the time 8:00 could be read out as 8:59 because the registers were updated from 7:59 to 8:00 between the read-out of minutes and seconds.
2.2 Serial U RT
The serial UART (universal asynchronous receiver transmitter) is also an independent hardware unit. It has two parallel functional units: a ”send” and a ”recieve” unit. The testbench tests the UART by connecting the TXD line of the sender unit to the RXD line of the reciever unit, and sending bytes using the sender, while at the same time asynchronously recieveing bytes on the reciever unit. (Of course the baud rate must also be in correspondence for this to work.)
The ”send” unit of the UART is connected to the LCD at 9600 bps and the ”recieve” unit is connected to the PC host at 115.2 kbps.