PRESA Raphaël
/
FSK_EX
exemple gene carre
Revision 0:a882c1c6acaa, committed 2016-05-23
- Comitter:
- rpresa
- Date:
- Mon May 23 06:16:46 2016 +0000
- Commit message:
- exemple gene carre
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 23 06:16:46 2016 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + + +DigitalOut FSK(p20); + + +void myIRQ() { + LPC_TIM0->IR |= 1 << 0; + FSK = !FSK; +} + + +int main() { + + + + while (1) { + + LPC_TIM0->MR0 = 104; // Match count for 114kHz + LPC_TIM0->MCR = 3; // Interrupt and Reset on Match + LPC_TIM0->TCR = 1; // Enable Timer0 + NVIC_SetVector(TIMER0_IRQn,(uint32_t)&myIRQ); + NVIC_EnableIRQ(TIMER0_IRQn); + } + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon May 23 06:16:46 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7c328cabac7e \ No newline at end of file