- "IO_Driver_20x20LedDisplay.asm" Added function "_PaintVerticalBarToVideoRamDnLeft" display one bar with R16 col pozition and R18 Length.
- "IO_Driver_20x20LedDisplay.asm" Added function "_PaintVerticalBarToVideoRamUpLeft" display one bar with R16 col pozition and R18 Length.
- "IO_Driver_20x20LedDisplay.asm" Added function "_SleepDisplay" to sleep display to deactivate scanning of matriceal display.
- "IO_Driver_20x20LedDisplay.asm" Added function "_WeekDisplay to resume from sleep.
- "IO_Driver_20x20LedDisplay.asm" Added function "_DisplaySecondaryRam" I added a secondary ram buffer to prevent flicker when you write to video ram.
- "IO_Driver_20x20LedDisplay.asm" Added function "_Display_TransferDataToDisplay_True" This allow to transfer data from secondary buffer to video ram buffer.
- "IO_Driver_20x20LedDisplay.asm" Added function "_Display_TransferDataToDisplay_False" This block transfersof data from secondary buffer to video ram buffer.
- "IO_Adc.inc" Added function ".Macro _Macro_Adc_Sleep" to sleep internal ADC.
- "IO_Adc.inc" Added function "_Macro_Adc_Week" to resume from sleep internal ADC.
- "IO_SdDriver.asm" Added support for SDHC High capacity > 4GB ( tested with one Kingston SDC4/16GB 02, MicroSD 16GB Class 4)
-In "Drivers/IO_Driver_20x20LedDisplay.asm" non multiplexed 20x20 led display.
Options:
-In "Lib/Util.inc" Option to eliminate non used memory type.
Optimizations:
-In "System/SoftTimers.asm" optimized tick function.
-One important optimization on Fat32 FFS may allow programmers to work with allocation table management library and data management library fully dynamic, now with this optimization the use can mount infinite discs on single microcontroller, the limit is only the ram memory.
Added library:
-"System/Vectors.inc"is a macro functions to help programmers to place vectors more simply.
-"Drivers/IO_ADC.asm" and "IO_ADC.inc"is a generic driver to work with internal hardware ADC.
Bug fix:
-"IO_VS1011a.asm" fix an error that "VS1011GetBitrate" function return's 0 if the table of bitrate constant is called one part on Zh and another part on Zh+1
An example to use Fat32 FFS with multiple disks: _Fat32_IndexManagement_RamAlloc IndexManagementLibraryRamDisk1
_Fat32_IndexManagement_RamAlloc IndexManagementLibraryRamDisk2
_Fat32_DataManagement_RamAlloc RamToFat32DataPlayerDisk1
_Fat32_DataManagement_RamAlloc RamToFat32DataPlayerDisk2
_Fat32_Mount IndexManagementLibraryRamDisk1
_Fat32_Mount IndexManagementLibraryRamDisk2
_Fat32_SesionInit IndexManagementLibraryRamDisk1, RamToFat32DataPlayerDisk1
_Fat32_SesionInit IndexManagementLibraryRamDisk2, RamToFat32DataPlayerDisk2
On every change of working disks is necessary to point in Zl:Zh the data management library allocated ram like that: _Fat32_DataManagement_GetRamAddress RamToFat32DataPlayerDisk1
Code to work with this disk...................
_Fat32_DataManagement_GetRamAddress RamToFat32DataPlayerDisk2
Code to work with this disk...................
This is cool because you can copy one file from one disk to another.
With this new optimization you can open two or more files on same disk, one example is this: _Fat32_IndexManagement_RamAlloc IndexManagementLibraryRamDisk1
_Fat32_DataManagement_RamAlloc RamToFat32DataPlayerDisk1
_Fat32_DataManagement_RamAlloc RamToFat32DataPlayerDisk2
_Fat32_Mount IndexManagementLibraryRamDisk1
_Fat32_SesionInit IndexManagementLibraryRamDisk1, RamToFat32DataPlayerDisk1
_Fat32_SesionInit IndexManagementLibraryRamDisk1, RamToFat32DataPlayerDisk2
_Fat32_DataManagement_GetRamAddress RamToFat32DataPlayerDisk1
Code to work with this disk................... Get byte from file 1 _Fat32_DataManagement_GetRamAddress RamToFat32DataPlayerDisk2
Code to work with this disk................... Write byte to file 2
Download SDK 1.0.4
V1.0.3
-Added battery paint with 9 bitmap levels and charge bitmap,this function can be called from Dx.asm, before calling this function in R16 is necessarily to lead level:
- BatteryEmpty
- Battery1
- Battery2
- Battery3
- Battery4
- Battery5
- Battery6
- Battery7
- BatteryFull
- BatteryCharge
.Dseg
TimeToEsantionBattery: .Byte 8; Reserve ram for this timer
TimeToTurnOffLight: .Byte 8; Reserve ram for this timer
.Cseg
Ldi R16,Low(1000); Hardware timer tick /1000
Ldi R17,Byte2(1000)
Ldi R18,Byte3(1000)
Ldi R19,Byte4(1000)
Ldi Yl,Low(TimeToEsantionBattery)
Ldi Yh,High(TimeToEsantionBattery)
CallLib _SoftTimer,_SoftTimer_Init
Ldi R16,Low(10000); Hardware timer tick /10000
Ldi R17,Byte2(10000)
Ldi R18,Byte3(10000)
Ldi R19,Byte4(10000)
Ldi Yl,Low(TimeToTurnOffLight)
Ldi Yh,High(TimeToTurnOffLight)
CallLib _SoftTimer,_SoftTimer_Init
Main:
Wdr
Ldi Yl,Low(TimeToTurnOffLight)
Ldi Yh,High(TimeToTurnOffLight)
CallLib _SoftTimer,_SoftTimer_Tick
Rcall TurnOffLight
Ldi Yl,Low(TimeToEsantionBattery)
Ldi Yh,High(TimeToEsantionBattery)
CallLib _SoftTimer,_SoftTimer_Tick
Rcall EsantionBattery
Rjmp Main
TurnOffLight:
; Routine to execute tick
Ret
EsantionBattery:
; Routine to execute tick
Ret
To disable one timer use this example:
Ldi Yl,Low(TimeToTurnOffLight)
Ldi Yh,High(TimeToTurnOffLight)
CallLib _SoftTimer,_SoftTimer_Disable
To enable one timer use this example:
Ldi Yl,Low(TimeToTurnOffLight)
Ldi Yh,High(TimeToTurnOffLight)
CallLib _SoftTimer,_SoftTimer_Enabled
This timers is enabled when is initiated.
Download SDK 1.0.3
V1.0.2-Added SDHC support in SD card driver,
-Added support for dynamically MBR location in Fat32 Filesystem library.
Download SDK 1.0.2
V1.0.1A
This litle update is a modification in Internal EEProm Driver file to work with more microcontrollers.
Download SDK 1.0.1A
V1.0.1
- Fat32file system Read and write with 3 modes of ram allocation. OK Doc RO
- BTM bluetooth driver. Not finished ( Some functions not proved )
- Samsung E700 TFT color display driver. OK Doc RO
- Nokia 6100 display driver. Not completed (No 24Bit ink support ) Doc RO
- HD44780 display driver. Not completed ( no optimization )
- External I2C EEProm driver. OK
- Internal eeprom driver. OK
- Macro eeprom driver. OK
- Joystick 5 direction driver. OK
- General IO utility driver. OK
- SD card driver in SPI mode. OK
- Hardware SPI driver Macro mode. OK
- Software SPI driver macro mode. Not tested
- Uart hardware driver in macro mode. OK
- VS 10xx driver. OK
- (Added) 20x20 multiplexed matrix led display with 5 x 74hc574.
- Variable conversion library. OK
- Direct X library to work with display drivers included in this SDK. OK
- Mathematics library. Not finished ( Some functions not proved )
- Utility library. OK Doc RO Doc EN
- Internal EEProm file system. OK
- Software ram disk file system. OK
- Software timers created from one hardware timer. Not tested
- Function to display characters in 8x6 pix format with variable weight.
- Function to display strings using function from point 1.
- Function to create menu bar with catted corners full or empty, one color for margins and one for internal.
- Function to paint an line with an color (not finished).
- Function to paint an bitmap in 8 or 24 bit format, stored in Internal Ram memory, Internal EEProm memory, Internal Flash memory, external serial flash memory(not finished), external serial EEprom memory(not finished) or SD memory card(not finished), is necessary to store entire bitmap not converted to bin or others formats( one utility to convert an entire bitmap to hex asm or c for avr can be found here ).
- Function to display an progress bar created only from bitmaps stored in one of memories from point 5, this progress bar looks like progress from last MP3 player created by me and found here.
V1.0.0
This ASM SDK created by me is a group of library and drivers that contain:
Version 1.0
Drivers:
- Fat32 file system Read and write with 3 modes of ram allocation. OK Doc RO
- BTM bluetooth driver. Not finished ( Some functions not proved )
- Samsung E700 TFT color display driver. OK Doc RO
- Nokia 6100 display driver. Not completed (No 24Bit ink support ) Doc RO
- HD44780 display driver. Not completed ( no optimization )
- External I2C EEProm driver. OK
- Internal eeprom driver. OK
- Macro eeprom driver. OK
- Joystick 5 direction driver. Not tested
- General IO utility driver. OK
- SD card driver in SPI mode. OK
- Hardware SPI driver Macro mode. Not tested
- Software SPI driver macro mode. Not tested
- Uart hardware driver in macro mode. OK
- VS 10xx driver. OK
- Variable conversion library. OK
- Direct X library to work with display drivers included in this SDK. Not tested
- Mathematics library. Not finished ( Some functions not tested )
- Utility library. OK Doc RO Doc EN
- Internal EEProm file system. OK
- Software ram disk file system. OK
- Software timers created from one hardware timer. Not tested
3 comments:
The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!
Hi, let me say that your blog is very very nice :-).
Please, thake a moment to verify all link in ASM SDK because all link are broken, like this http://download.avrdevboardshop.hostzi.com/ASM_SDK/MorgothAvrAsmSdkV1.0.3.rar
Thank You.
Luigi
Great reading yoour blog
Post a Comment