Wednesday, 29 April 2009

DiY: MP3 player with ATmega64 VS1011a and Samsung E700 color Display

This is my new mp3 player.

For this MP3 player is new: the display and a new graphical interface explorer.

Knowing that the display of the Nokia 6100 is an old and extremely poor quality, I thought to exchange it with one TFT display ( higher quality ) , by doing this I thought I make an new interface, and this is the result:

-File type played (VS1011): Decodes MPEG 1.0 & 2.0 audio layer III
(CBR, VBR, ABR); layers I & II optional;
WAV (PCM + IMA ADPCM)

-File type played (VS1033): Decodes MPEG 1 & 2 audio layer III (CBR
+VBR +ABR); layers I & II optional;
MPEG4 / 2 AAC-LC-2.0.0.0 (+PNS);
WMA4.0/4.1/7/8/9 all profiles (5-384 kbps);
WAV (PCM + IMA ADPCM);
General MIDI / SP-MIDI format 0 files
-File type played (VS1053): Decodes Ogg Vorbis;
MPEG 1 & 2 audio layer III (CBR +VBR
+ABR); layers I & II optional;
MPEG4 / 2 AAC-LC(+PNS),
HE-AAC v2 (Level 3) (SBR + PS);
WMA4.0/4.1/7/8/9 all profiles (5-384 kbps);
WAV (PCM + IMA ADPCM);
General MIDI 1 / SP-MIDI format 0 files

For bitrate higher than 320Kb/s is necessary to increase the CPU frequency from fuses for 4Mhz to fuses for 8Mhz internal RC

This project is under develop.
Last update 14-06-2009
Download source code
Download the board .max and gerber files
Download orcad schematick
Download PDF schematick
Several variants of this player can be found for purchase here.




Mp3 Player with Winamp skin

Mp3 Player with Synthetic skin

Mp3 Player with Media Player skin Download demo hex fileThe fuse bit be set for 4Mhz Internal RC Oscillator

Mp3 Player with Half Life skin

This player run 2 threads , one for navigating and one for serving data to VS1011.

The last rectify of compatibility of Fat32 filesystem library and Player data service library has increase the transfer rate , in this moment the player is capable to read 256Kbit/s melody at 4Mhz internal RC clock with osccal=199(default), and 320Kbit/s at 4Mhz and osccal=255 (approximately 5Mhz) internal RC clock.

Now i work to one explorer configured from skin file like XML file.

This navigator display the short filename if the long file name is not writed on the name of file.

For support post a comment






This project was abandoned for another more powerful.

Thursday, 23 April 2009

DiY: most tiny MP3 player with ATmega8 VS1011a and Nokia6100 Display

This is a complete mobile MP3 player and first mp3-player with ATmega8 and Nokia 6100 color display.

An demo firmware and gerber file for board will be available soon.

This player has capability to play wav and mp3 files and view BMP files on 8 or 24 bits/pixel from a MicroSD card with maximum capacity 2GB, the format of the SD is FAT32 with clusters from 512 Bytes to 32768Bytes, the filesystem has no limits in number of directories and files.
For future i want to adapting the SD driver for SDHC because the filesystem is designed to use all capacity of fat32 ( 2TB in 512Bytes/sector)

List of features:
Play Wav and MP3 Files because the VS1011a only this files is capable to decode( but for future in this project i want to include the VS1053 chip to play more file formats.
View Bitmap files on 8Bit and 24 bit/pixel

This project is in asm language and my 100% own libraries









For the moment the project has 5172Bytes of Flash , 663Bytes of Ram and 0Bytes of EEprom
Several variants of this player can be found for purchase here.

I work to another MP3 player:
New MP3 Player Link

Friday, 17 April 2009

DiY: VS1011a board ( MP3 decoder )

This is a simple board for VS1011a MP3 decoder






Saturday, 28 February 2009

Fat32 complete library in asm language

Observing that the file system created by me is almost identical to FAT32, i decided to convert to FAT32, this library work with clusters from 256 bytes to 32768 bytes autodetect from storage device.

This library is in asm language.

This file system is designed for double buffered (a buffer to the Allocation Table and a data buffer) this method of using separate buffers increase the rate of transfer to the storage device.

The buffer’s separation between allocation table and the data, makes that at each change of the data cluster not to charge the next cluster index from storage device. In this case, the index is token from allocation table’s buffer, if this is inside the sector memorized inside buffer. If this is not inside the sector of the buffer, then will be saved the buffer in allocation table (in case that inside the buffer has been made a modification), and then will be loaded in the sector where the index is.

In this way can be made with the data buffer. The pointer can be putted at an particular offset from open file, and then, from the address of the pointer can be read byte with byte, the pointer been incremented automatically. The same will be the sectors inside the buffer, those will be changed automatically. It doesn’t matter for user which cluster or bit must be read, because everything is done automatically. User must set the address of the file needed and the pointer of the address of the byte inside the file.

Done functions:
-Go to file/folder ( address in clusters )
-Go to next file/folder in current directory ( this function return Flag T in Sreg = 0 if the pointer is on bottom of the list else return 1)
-Go to forward file folder in current directory ( this function return Flag T in Sreg = 0 if the pointer is on top of the list else return 1)
-Read address on pointed file/folder ( in clusters )
-Read short name of pointed file/folder ( string 11 char )
-Read full name of pointed file/folder ( string max 128 char )
-Read byte by byte the file opened ( offset of byte in file ) with autoincrement pointer
-Write byte by byte in the file opened ( offset of byte in file ) with autoincrement pointer ( this function work with append in file and have property to enlarge the size of file )
-Read pointed file size (in bytes)
-Write pointed file size = current pointer
-Read pointed file attribute
-Write pointed file attribute
-Read pointer in opened file
-Write pointer in opened file
-Create file with short name converted from long name( Creating with long name not completed )
-CloseFile ( when the file is closed if the pointer in file is bigger to actual size of file , the actual size of file = pointer position in file ( in read mode is not possible to point to an byte address bigger to file size but in write mode this is possible because the file is auto enlarged )

The terminal have next functions:
+ :
Go Down one file folder and read short and long file name.
- :
Go Up one file folder and read short and long file name.
Enter :
1) Go to selected folder,
2) Open selected file,
3) Close opened file.
Esc :
Close opened file
p :
Enter in write long file name, and Enter will convert from long filename to short filename
c :
Create file with converted short filename


Performance obtained with ATmega640 at 16 Mhz and SPI hardware at 8Mhz:

Write SD Card with 512 Bytes/cluster = 48659 Bytes/s
Write SD Card with 4096 Bytes/cluster = 40163 Bytes/s
Read SD Card with 512 Bytes/cluster = 70286 Bytes/s
Read SD Card with 4096 Bytes/cluster = 56229 Bytes/s

Transfer rate depends on the device storage and on fragmentation.
The flash used not include the terminal

Resources for maxim 512 bytes/cluster:
Flash= 3220 Bytes ( Only read section )
Flash= 5042 Bytes ( Read and write sections )
Ram for allocation table management= 542
Ram for data management= 629 (512Bytes (Data Buffer)+ 64 (Bytes String Long Name) + 11Bytes (String Short Name) + Variables )
Total Ram= 1171Bytes

Resources for maxim 4096 bytes/cluster:
Flash= 3220 Bytes ( Only read section )
Flash= 5042 Bytes ( Read and write sections )
Ram for allocation table management= 542
Ram for data management= 4213 (4096Bytes (Data Buffer)+ 64 Bytes (String Long Name) + 11Bytes (String Short Name) + Variables )
Total Ram= 4755 Bytes

The ram size is set by user because the maximum size of cluster is set by ram buffer data cluster

The data management library is a dynamic library ( That means this library can be open multiple times, and when you call the library in Z must be the beginning address of RAM to work with ) for this i wrote the ram size table occupied by allocation library and data management library separately

In conclusion we can work with multiple open files using a single library written in flash that can work with multiple sections of ram

Operating principle:
This block function is one example only for 512 Bytes/Cluster Fat32 formats for other cluster dimension the ram allocation is different.


Fig1


In this moment i work to create and allocation table library from static library to dynamic library

These two libraries ( allocation table and data section ) will be in 2 variants:
1) A library will have only buffer for data which can be put on the controllers with ram more than 655Bytes
2) A library that does not include buffers (will lose the stats of dynamic library) but which can be put on the controllers that have the minimum 128Bytes of ram
____________________________________________________________________

This library is concept to work with only one buffer and work fine to my MP3 players at 5Mhz with 320Kb/s melody with one artifice, and from this moment this library is open source
This library use 3016Bytes of flash and 655Bytes of ram memory
The up bloc description in Fig1 can by applied and for this library

1)Fat32_DataInit
2)Fat32_ReadByte
3)Fat32_GoToRoot
4)Fat32_GoToFile
5)Fat32_ResetDirPointer
6)Fat32_IncrementDirPointer
7)Fat32_DecrementDirPointer
8)Fat32_GetShortFileName
9)Fat32_GetLongFileName
10)Fat32_GetFileAdress
11)Fat32_ReadFileSize
12)Fat32_ReadFileAttr
13)Fat32_WritePointerInFile
14)Fat32_ReadPointerInFile
15)Fat32_OpenPointedFileFolder
16)Fat32_CloseFile

Last update 17-06-2009
Download fat32 read only library for atmega64
Download fat32 read only library for atmega8

Now this driver is updated and included in my ASM_SDK here

For support post a comment

Thursday, 29 January 2009

4x25W amplifier with internal usb control

This is a 4x22W amplifier 4Ohm which is young for a PCI Desktop slot and can be diagnosed and controlled by an internal USB connector.
This project is still in development stage
This card is made with a specialized circuit in Class D with I2C control interface produced by TexasInstruments TAS5414 QFP64 and a ATmega8 controller

Wednesday, 14 January 2009

USB Unipolar 3 in 1 Motor Stepper Controller

This is a usb controller for 3 engines unipolar step by step, you can move completely independent, and in terms of speed of rotation sense and the coordinated which should be.

The position of engine can take value between -2147483648 and 2147483647
Minim velocity = 0.015 steps/second
Maximum velocity = 1000 steps/second

Here i posted a brief presentation of the controller in the prototype phase, it will arrive in stores in a short period.

It is designed around an ATmega8 microcontroller with USB1.1 software interface and drivers that are used is ULN2003

This is the interface for the PC, to control in real-time the controller:








And this is the prototype controller board:


















In the next image is described command method :

From Digital electronics and programing

Update for PC program, add new function: