Video
LPC800 getting started with exodusino (arduino like) library
In the past, ARM processors were notoriously unfriendly in non-professional environments due to proprietary tool chains and unfamiliar instruction sets. Because of this, they were conspicuously absent from classrooms and hobbyists’ workbenches. LeafLabs aims to change this by providing an ARM tool-chain built from open source components and a programming environment that is intuitively easy to use.
If you’re familiar with Arduino then you’ll recognize the shape of the board, in fact the Maple is designed to be Arduino compatible and not just at the hardware level! The Maple IDE will make Processing/Arduino programmers feel right at home. By swapping the popular “avr-gcc” compiler with CodeSourcery’s "arm-none-eabi-gcc," LeafLabs manages to provide a nearly identical programming experience to Arduino despite targeting a completely different architecture. Also, while some Arduino shields are incompatible due to certain capabilities being allocated to different pins, several of them are currently supported and there are more to come. There is also a guide available on the product page for porting Arduino libraries and source code over to Maple.
As similar as it may be to the Arduino, the differences are what really make the Maple stand out. It harnesses the power of a 32-bit ARM Cortex-M3 clocked at 72 MHz to push 39 GPIOs, 16 analog pins, 12-bit ADC resolution and 15 PWM pins at 16-bit resolution. In order to make sure you have plenty of programming room to flex that hardware, the Maple also provides 128k Flash and 20KB SRAM. All of this performance is delivered in the same form factor as the Arduino Pro.
If your current Arduino-based project is pushing against the performance limits of the ATmega, porting it over to Maple may be the fastest and easiest way to continue developing your project without starting from scratch.
Anyway, here I am talking about STM32 VL DISCOVERY, a great $12 board, that is based on ARM CORTEX processor. This board is an excellent evaluation platform for the STMicroelectronics STM32.
The STM32 on the board is packed with peripherals, especially communication ports and timers, there is a lot that can be done with this “low end” part.
So, for beginners which used to work with arduino and its IDE, programming this board can be quite confusing. You are lucky, because there is Leaflabs Maple IDE, and with a little help i managed this IDE to work with STM32 discovery. If you want to try it, you can download it here. For example of usage and differencies from Arduino IDE, read here.
Maple IDE v 0.0.11
EEPROM (Electrically Erasable Programmable Read-Only Memory) is a type of non-volatile memory which can be programmed, erased, and re-programmed electrically while it is on the circuit board. The main problem of FLASH and RAM memories is in fact that they are not capatible for storing data which will be stored after loss of the electric power. A majority of PIC microcontrollers (for example PIC16F877a) come with some built-in EEPROM which is a great place to store data that should not be lost when the system is powered down. Actually, FLASH can be used for that purpose, but it is a little bit complicated and for data access you need to write a special software called Bootloader. PIC16F877 has a 256 bytes of EEPROM memory. A good example for EEPROM is a digital lock system where the access code can be stored in the EEPROM of microcontroller so that the contents remain intact even after the power supply has been removed. For more clearer example, you can use internal EEPROM to store the measured temperature values. Reading and writting to EEPROM is pretty straightforward, and it’ relativelly easy.
To read EEPROM you need to:
1.Write an address of EEPROM you want to read into EEADR register
2. Set EEPGD bit from EECON1 register to 0 so the next operations can refer to EEPROM (and not FLASHROM)
3. Set RD bit from EECON1 register to begin EEPROM reading
4. The data is stored in EEDATA register.
Sample code is below:
void delay(char n) { //function that inserts delay 5ms
char i; // we need it because we will send data from EEPROM to LED
OPTION=7; // diodes which are on PORTB
do {
clrwdt();
i=TMR0+39;
while(i!=TMR0);
}while(—n>0);
}
void main(void){
TRISB=0;
EEADR = 0;
EEPGD = 0; // 0 enables to read write from EEPROM-a ..
// EEPGD=1 means that we want read/write access to FLASHROM
unsigned char eeprom_address = 0;
for(eeprom_address = 0; eeprom_address< 0xFF; eeprom_address++)
{ // for loop for reading EEPROM and displaying it on PORTB
EEADR=eeprom_address;
while(RD); //wait to finish EEPROM reading
delay(50);
PORTB=EEDATA;
if(eeprom_address==0xFF)
eeprom_address=0;
}
}
I will write about writting to EEPROM in next post.
Hoće li išta
о meni znati onaj
što noću će, uz lampu i mrak uokolo,
ove redove čitati?
Hoće li čuti drhat, i strepnju
srca koje misli, dok biskao bude
slovo svako i redak, ко brižna majka
kosu dječiju, češljem najgušćim?
Hoće li išta, išta, uistinu znati?
Il jednaka će pustoš
u domu njegovom da zjapi i sja,
nad stolom i knjigom, dok sabran,
i težak od tuge, svoje,
ovu moju bude razgrtao,
vlat po vlat,
mrak po mrak?
A.Sidran
Znalo je biti vremena kad duša ciči.
Oči, srce i ruke, prepuni budu straha.
Na mrtve svoje u trenu počnem da ličim,
tijelo mi lomača biva, gnijezdo sveopšteg praha.
Znalo je biti vremena kad duša pjeva.
Vjetru i kiši, trnu i cesti, nasmijan pruža naklon,
kao da nikad nesretan ne bjeh ni gnjevan,
niti me ikad slamao očaj i stvari crni zakon.
Znalo je biti vremena kad duše nema.
U domu njenom stoglavo ništa zjapi
i tamne posvuda pipke širi nezbivanja neman,
a žestoke kiše udaraca niotkud ni kapi.
Tek tad je urliko u oku ustrijeljen vepar!
Svemu je duša sestrom znala biti, i bila,
al nje kad nema, dok svijetom vlada kosmički nepar
- blago je i toplo strašno lice ništavila.
A.Sidran
Here is what wikipedia says about Bosnian language: http://en.wikipedia.org/wiki/Bosnian_language :)
https://rapidshare.com/files/2968184648/lec01.mp4;
https://rapidshare.com/files/1095912649/lec02.mp4;
https://rapidshare.com/files/2361663880/lec03.mp4;
https://rapidshare.com/files/3795140206/lec04.mp4;
https://rapidshare.com/files/1772240076/lec05.mp4;
https://rapidshare.com/files/929959307/lec06.mp4;
https://rapidshare.com/files/3855895699/lec07.mp4;
https://rapidshare.com/files/3220084299/lec08.mp4;
https://rapidshare.com/files/1537614407/lec09.mp4;
https://rapidshare.com/files/3873529871/lec10.mp4;
https://rapidshare.com/files/887631679/lec11.mp4;
https://rapidshare.com/files/154278693/lec12.mp4;
https://rapidshare.com/files/954016232/lec13.mp4;
https://rapidshare.com/files/715910894/lec14.mp4;
https://rapidshare.com/files/2019258102/lec15.mp4;
https://rapidshare.com/files/2154454705/lec16.mp4;
https://rapidshare.com/files/4240804980/lec17.mp4;
https://rapidshare.com/files/3274204480/lec18.mp4;
https://rapidshare.com/files/3253339427/lec19.mp4;
https://rapidshare.com/files/382858833/lec20.mp4;
https://rapidshare.com/files/925947051/lec21.mp4;
https://rapidshare.com/files/2010012729/lec22.mp4;
https://rapidshare.com/files/148899075/lec23.mp4;
https://rapidshare.com/files/3461564047/lec24.mp4;
https://rapidshare.com/files/3515715742/lec25.mp4;
https://rapidshare.com/files/268087098/lec26.mp4;
https://rapidshare.com/files/2225718863/lec27.mp4;
https://rapidshare.com/files/3785410777/lec28.mp4;
https://rapidshare.com/files/3512592569/lec29.mp4;
https://rapidshare.com/files/4239789250/lec30.mp4;
https://rapidshare.com/files/1101258555/lec31.mp4;
https://rapidshare.com/files/2071664244/lec32.mp4;
https://rapidshare.com/files/1199200952/lec33.mp4;
https://rapidshare.com/files/2431935799/lec34.mp4;
https://rapidshare.com/files/3202796057/lec35.mp4;
https://rapidshare.com/files/2373613967/lec36.mp4;
https://rapidshare.com/files/3233880022/lec37.mp4;
https://rapidshare.com/files/2003063087/lec38.mp4;
https://rapidshare.com/files/261013949/lec39.mp4;
https://rapidshare.com/files/1068646618/lec40.mp4;
Recall that the mathematical expression
is called a Fourier series.
Since this expression deals with convergence, we start by defining a similar expression when the sum is finite.
Definition. A Fourier polynomial is an expression of the form
which may rewritten as
The constants a_{0}, a_{i} and b_{i}, , are called the coefficients of F_{n}(x).
The Fourier polynomials are -periodic functions. Using the trigonometric identities
we can easily prove the integral formulas(1)for , we have
(2)for m et n, we have
(3)for , we have
(4)for , we have
Using the above formulas, we can easily deduce the following result:
Theorem. Let
We have
This theorem helps associate a Fourier series to any -periodic function.
Definition. Let f(x) be a -periodic function which is integrable on . Set
The trigonometric series
is called the Fourier series associated to the function f(x). We will use the notation
Example. Find the Fourier series of the function
Answer. Since f(x) is odd, then a_{n} = 0, for . We turn our attention to the coefficients b_{n}. For any , we have
We deduce
Hence
Example. Find the Fourier series of the function
Answer. We have
and
We obtain b_{2n} = 0 and
Therefore, the Fourier series of f(x) is
Example. Find the Fourier series of the function function
Answer. Since this function is the function of the example above minus the constant . So Therefore, the Fourier series of f(x) is
Remark. We defined the Fourier series for functions which are -periodic, one would wonder how to define a similar notion for functions which are L-periodic.
Assume that f(x) is defined and integrable on the interval [-L,L]. Set
The function F(x) is defined and integrable on . Consider the Fourier series ofF(x)
Using the substitution , we obtain the following definition:
Definition. Let f(x) be a function defined and integrable on [-L,L]. The Fourier series of f(x) is
where
for .
Example. Find the Fourier series of
Answer. Since L = 2, we obtain
for . Therefore, we have