Jump to content

Capture Feature - LPC1769


Fabigode
 Share

Recommended Posts

Hi guys!

I want to capture the frequency of a square wave signal, using LPC core. But MIOS system doesn't have this "peripheral module" avaiable. How can I directly access these hardware feature of LPC, mixing a MIOS application with these need that I have?

Do I need to turn off some MB module on mios config? Will I have some conflict problem between this directly hardware access and MIOS access?

Thanks in advance!

Link to comment
Share on other sites

Hi,

I can give you a working example soon, because porting the CV Autotune application from STM32 to LPC17 is on my TODO list :)

-> http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fexamples%2Fcv_autotune%2F

Do I need to turn off some MB module on mios config?

this won't be required.

Timers LPC_TIM0, LPC_TIM1 and LPC_TIM2 are not allocated as long as they haven't been initialized via MIOS32_TIMER_Init()

Will I have some conflict problem between this directly hardware access and MIOS access?

no, but you have to take care that the application doesn't use these timers (there is no automated conflict detection/reporting)

Best Regards, Thorsten.

Link to comment
Share on other sites

Addendum: I remember that the IRQ handler has to be disabled via the mios32_config.h file, otherwise you won't be able to create an own.

And I noticed that the names of the IRQ handlers were taken from STM32 in LPC17xx/mios32_timer.c - I corrected the names!

E.g.:

#define MIOS32_DONT_ALLOCATE_TIMER0_IRQ 1

Please update your repository.

Best Regards, Thorsten.

Link to comment
Share on other sites

I adapted the CV Autotune application to LPC17 and it's working fine! :)

-> http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fexamples%2Fcv_autotune%2F

Even if you haven't connected an AOUT module (btw.: you haven't mentioned for which purpose you are planning to use frequency measurements...), the current frequency at the J18.CAN pin will be displayed periodically in MIOS Terminal, which is nice for debugging.

Best Regards, Thorsten.

Link to comment
Share on other sites

I adapted the CV Autotune application to LPC17 and it's working fine! :)

-> http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fexamples%2Fcv_autotune%2F

Even if you haven't connected an AOUT module (btw.: you haven't mentioned for which purpose you are planning to use frequency measurements...), the current frequency at the J18.CAN pin will be displayed periodically in MIOS Terminal, which is nice for debugging.

Best Regards, Thorsten.

Hi Thorsten!

Thank you for your personal attention!! hehe! :thumbsup:

I'm not working on my application yet, because I don't have the LPC module yet. But it is coming!! Postal service here in Brazil is terrible! So for now, I'm just studying the system...

My project is completely different from the musical world. I'm developping a digital speedometer and tachometer for use with experimental cars. Then, to capture these sensors, I will need that feature you well showed.

I plan to use AOUT to send an analog signal to the ECU (electronic control unit), with some crucial information to the engine operation.

I already developed an application with MIOS8, 5 years ago, "midifying" a guitar valve amp. Basicaly, the MB controlled a bunch of relays and opto-couplers that routed the signal for different paths inside the preamp, changing the tone, gain and other things...

Lately, I have developed automotive applications. As an off-topic (hehe) my last project was a drive-by-wire controller, using a PIC18F4431: http://www.youtube.com/user/fabigod

Now, I'm returning to MIOS world... hehe! :frantics:

Thanks again Thorsten... As soon my module arrive, I will start programming...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...