Sunday, September 11, 2011

MikroMMB for Xmega MP3 Player

This project is created in AVR GCC with 100% my own drivers and libraries , this player can play MP3, WMA and OGG files from micro SD/SDHC memory card fat16/32 formatted.

V1.3

On this firmware I made some bug fixes and I adding some functions to player:

Bug fixes:

  1. The previous versions has a bug that forces user to put on first location of root directory the volume ID or a file or folder with the short name only.
Function's added:
  1. A progress bar to track the melody, with the same progress bar the user can force the audio player to play file from a specified point.
  2. Player can run now like a thread "Open player" "Close Player" when card is inserted is automatically opened the player, when SD card is removed all resources used by Audio Player will be freed.
  3. Now you can play music from SD/SDHC card's formatted in FAT16 or FAT32(The FAT16 has a little bug, on root directory is displayed only files and directory's from first Page(512Bytes).
On this version you can play: MP3, AAC, OGG, WAV and WMA.



V1.2

 On this version I made some changes:

  1. I change the navigation from the "next" "previous" button to a list box.
  2. On this version is not capable to display bitmap's because I want to design another interface to view bitmap photo.
  3. The VS chip data is send by a service that work inside the RTC interrupt service, in this case has a high priority to send data to VS chip.




Download V1.2 demo version of this player.

V1.1

On this version I made huge improvements.

  1. Now you can navigate through the directories when you listen music, you can choose another melody when you listen another melody.
  2. The player has change the listen melody with the next from the current directory, the payback is stopped after the last melody is played.
  3. Now you can see bitmaps images in 8, 24 and 32 bit/pixel with some limitations, maximum size 240x200pixels, the maximum file size 140KB (140000bytes), the 240x200 pixels limitation is implemented to no interference with the player interface, the 140KB limitation is made because I have a bug in the bitmap library, that can't read files bigger than this value.
This version is limited to play only MP3 files, the core clock is 32Mhz.







V1.0

The controller is running at 16Mhz.

On this version can't manage the power consumption.

This version can play MP3, WMA and OGG.






Tuesday, August 16, 2011

Mikro Media for Xmega simple Lcd Touch Paint


This is made with 100% my library's developed in AVR GCC because free source code for LCD display and touch screen can't be found on internet.

When you power up the board with this firmware, the board enter to touch screen calibrate, in four points, after the last point is touched the display is painted with white back ground and you can scribe through touch screen with chosen color touching the colors rectangles from right up of display.
Chosen color will appear like a rectangle painted with the same chosen color on right down of display.
If you want to clear the display, touch the black rectangle from right down of screen.


V1.1
In this firmware I add function to choose ink color and to clear display.


On this version is eliminated the previous described bug.

V1.0

On the 1.0 firmware version is a bug caused by the capacitors connected in parallel with Q5 and Q9 that is not filtered by the firmware, but for the current work is not a critical bug :D.

ATxmega boot loader

Currently I bought a Micromedia Board ( microMMB for XMEGA ) from mikroEelektronika.

This board is perfect for general developing because can be used by programmers that don't have a programmer, because is coming with a bootloader pre-installed.
I mentioned only the bootloader because this bootloader is the problem
To upload a flash with 64KB size is taken about 10-15 minutes, or to develop a firmware is a very very long time to wait, visualizing this I developed a very fast bootloader to write only Flash and EEProm memory, only strictly necessary memories because all of other ATxmega features can be set from uploaded firmware.

In this stage I compiled eight bootloader firmwares only for ATxmega128A1 for each used hardware usart, and each firmware work with a 256000 baud transfer rate, this baud rate is set like default baud rate for the up-loader when is opened, I want to mention that the up-loader can work with atmega bootloader firmwares found here.

Version 1.0 of firmwares:

For usart 6 ( usart F0 ). can be used for Micromedia Board for XMEGA.


Tuesday, May 17, 2011

Multipurpose development board with ATxmega64A1 / ATxmega128A1


Features:
  1. Main processing unit ATxmega64A1 or ATxmega128A1.
  2. Audio decoder VS1011,1033,1053 with stereo jack 3.5mm female connector & external speakers 3 pin connector(optional).
  3. DS1307 real time clock with battery pads.
  4. PDI & JTAG connectors.
  5. LB1936 dual driver for asynchronous motors (optional).
  6. AD7414 temperature sensor for motor driver (optional).
  7. External motors driver connector with I2C bus.
  8. Two micro SD connectors ( one is optional ).
  9. Four connectors with 2x3 pin to control eight servo motors, two servomotors for each connector, each connector is power interruption to minimize power consumption.
  10. Two power jack connector 5.5/2.1mm put in series to connect two photovoltaic panels and with static commutator controlled by software to charge main accumulator.
  11. High power step down stabilizer from accumulator voltage to 3.3V.
  12. On-board 512KB static ram for minimizing power consumption in sleep mode.
  13. BTM-222 Bluetooth for communication with PC or mobile phones (optional).
  14. RFM12BP at 434Mhz for communication with one remote control for huge distance up to 5Km (optional).
  15. RFM12BS at 868Mhz to control other wireless modules (optional).
  16. All modules from point 13, 14 & 15 can work at the same time without interferences.
  17. Five connectors with four pins with I2C bus and 3.3V power for future extensions.
  18. External extension bus connector to connect future external modules to ATxmega parallel data bus, such as Displays, more motors controllers, image sensors etc.
  19. Possibility to monitor power consumption from main accumulator.
  20. Possibility to monitor generated power by the photovoltaic panels.
  21. Possibility to monitor voltage of the main accumulator.
  22. Possibility to monitor power consumption of each motor powered by on-board driver.
Applications:
  1. Robots: contain on-board dual asynchronous motor driver and four connectors to control eight servomotors, powered from an Li-Ion accumulator and support to charge the accumulator from two photovoltaic cells or from an external source, several communication modules: Bluetooth Class1, EFM12BP for long distance communication up to 5Km and RFM12BS for low power and short distance communication up to 300m.
  2. Audio player: contain on-board VS1011, VS1033 or VS1053, single or dual micro-SD memory card connectors with push.
  3. Audio/Video(low quality) player.
  4. General development application because has all possibility to connect with another controller or another peripherals to the expansion bus, the expansion connector work to speed of the external ram memory, because the expansion peripherals is mapped to address space 524288 to 1048576, maximum number of expansion peripherals is 65536.


Power supply input between 3.4V and 9.5V
Maximum supported input voltage on photovoltaic connectors and the main accumulator: 9.5V, Maximum absolute 10.5V.
Board dimension: 66.83 x 130.78mm.

This board can be bought from http://devboardshop.com.

Friday, February 25, 2011

Intel HEX to binary HEX converter

This is an utility for programmers to convert Intel .hex files generated by AVR studio for example to binary hex data file, to create static or dynamic library like image of flash ROM and can be imported like data file to a project.

V1.0.5In this version the files that is not modified ,is not recompiled, in this case if you work on memory stick not take the number of writings / deletions of memory stick for files that is not modified, or if you work with many files will not be useless to compile the files were not changed
This version can be downloaded from here.

V1.0.4In this version I added to automatically put the "#ifndef FileName" to include only one time a library if is declared on multiple files.
This version can be downloaded from here.

V1.0.3


Added:
Now can include header file with definition constants in hex image file, in this case is no longer case to include hex image file and header file separately, you can include only hex image file, if the name of .hex file is "AA.hex" the name of header file is necessary to be "AA_Headers.inc".

When hi finish to compile all files, auto close the thread, this feature allow to include this compiler on Pre Assembling section of AVR Studio, in this case before the compilation of AVR studio, AVR Studio can launch this compiler to actualize the images of libraries, and after can compile the project with updated libraries.

Fix:
On start up auto load the path where is.

This version can be downloaded from here.

V1.0.2

Fix: no filter to .hex in 1.0.1 version.
The last version of this utility can be downloaded from here (Internet explorer only).

V1.0.1
New:
Added:
  1. On program open you can choose the base directory where is the source folder.
  2. You can always change the working directory.
  3. Automatic checking and downloading updates.


V1.0.0

This utility get all of the .hex files from directory that the utility has been opened /source and put converted files include directory structure to /bin.

For example the project is placed to C:/source/, and the utility in C:/

The directory structure is this:
C:/source/Math.hex
C:/source/IO_Port_Driver.hex
C:/source/IO_Uart_Driver.hex

After running of the utility all files is compiled on C:/bin/ and well see like that:

C:/bin/Math.asm
C:/bin/IO_Port_Driver.asm
C:/bin/IO_Uart_Driver.asm

The result is files .asm with data in hex format.

To create static or dynamic library's is necessary to put links to the integrated functions on top of the library, for example:

File: Math.asm

.Org 0
MathLibrary: // This is the base address of the links
Rjmp Add8x8_8
Rjmp Add16x16_16
Rjmp Add 32x32_32
Rjmp Sub 8x8_8
Rjmp Sub 16x16_16
Rjmp Sub 32x32_32
;--------------------------------//End of links
//Begin of routines
Add8x8_8:
Code......
Ret
;--------
Add16x16_16:
Code......
Ret
;--------
Add32x32_32:
Code......
Ret
;--------
Sub8x8_8:
Code......
Ret
;--------
Sub16x16_16:
Code......
Ret
;--------
Sub32x32_32:
Code......
Ret
;--------
//End of library

To define the offsets of links you can create another file with this, for example:

File: Math.inc

#define _MathLibrary (0) //Offset of base of links

#define _Add8x8_8 (0) //Link 1
#define _Add16x16_16 (1) //Link 2
#define _Add32x32_32 (2) //Link 3
#define _Sub8x8_8 (3) //Link 4
#define _Sub16x16_16 (4) //Link 5
#define _Sub32x32_32 (5) //Link 6

To import a library, on end of main file include "Math.asm" file from bin directory.

For example:

_MathLibrary_:
.Include "Math.asm"


All of the function from this library can be called like that:

Rcall _MathLibrary_ + _MathLibrary + _Sub8x8_8
Or if "_MathLibrary" base address of links is 0:
Rcall _MathLibrary_ + _Sub8x8_8

"_MathLibrary_" is address of the imported library assigned by the compiler when you build the project, and "_Sub8x8_8" is the offset of the link of the included routine in library defined in
"Math.inc"



Sunday, February 20, 2011

Development board 1 for ATXMEGA A1 microcontrollers

This is a very simple board to test and develop firmwares for ATXMEGA A1 micro-controllers.

This board contains only strictly necessary components for the ATXMEGA A1 micro-controller and only one extra module is added, the USB to serial adapter, the rest of modules can be added to a mother board.

This board has 89x74mm.




This is a very simple board to test and develop firmwares for ATXMEGA A1 micro-controllers.

This board contains only strictly necessary components for the ATXMEGA A1 micro-controller and only one extra module is added, the USB to serial adapter, the rest of modules can be added to a mother board.

This board has 89x74mm.



You can download gerber files and schematic from here.