[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3891)
Open Music Labs Forums • View topic - Problems with FHT code

Problems with FHT code

Problems with FHT code

Postby taco » Wed Oct 24, 2012 12:24 pm

taco
 
Posts: 4
Joined: Wed Oct 24, 2012 12:19 pm

Re: Problems with FHT code

Postby guest » Wed Oct 24, 2012 3:27 pm

to save time in the code and reduce jitter, TIMER0 is disabled by the TIMSKO = 0; line. so anything that requires TIMER0 will not work, including delay() and micros(). you can try commenting that line out, and see what it does.

also, just to check, are you using this on a MICrODEC, or an Arduino? there are some slight differences between the 2.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Problems with FHT code

Postby guest » Wed Oct 24, 2012 3:48 pm

also, the cli() and sei() are there to block interrupts while it processes. im not sure why this had to be done, but with ardunio1.0 the UDRE interrupt would slow the process way down. it would take at least 10 times as long. i have no idea why that was the case. it worked fine in arduino-0022. at any rate, micros() might require that interrupt as well.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Problems with FHT code

Postby taco » Thu Oct 25, 2012 9:06 am

taco
 
Posts: 4
Joined: Wed Oct 24, 2012 12:19 pm

Re: Problems with FHT code

Postby guest » Thu Oct 25, 2012 10:30 pm

guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Problems with FHT code

Postby guest » Fri Oct 26, 2012 12:26 am

ok, so after a bit of digging, it is specifically the pointer register that was causing the problem. i read up a bit on register usage:

http://www.nongnu.org/avr-libc/user-man ... _reg_usage

and it turns out that all functions that use r2:r17,r28:r29 must save and restore, and r1 must be cleared (which i was already doing). its not too much more to save everything, so i might just do that to be on the safe side anyways.
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Problems with FHT code

Postby guest » Fri Oct 26, 2012 1:47 am

a new file is up on the wiki
http://wiki.openmusiclabs.com/wiki/ArduinoFHT

i have yet to fix the FFT library
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Problems with FHT code

Postby taco » Fri Oct 26, 2012 9:51 am

Wow, thanks for fixing that so quick. It works great now! Thank so much.
taco
 
Posts: 4
Joined: Wed Oct 24, 2012 12:19 pm

Re: Problems with FHT code

Postby guest » Sat Oct 27, 2012 1:18 am

thanks for finding the bug. keep us posted on how your project turns out
guest
Site Admin
 
Posts: 449
Joined: Thu May 20, 2010 11:58 pm

Re: Problems with FHT code

Postby taco » Fri Nov 02, 2012 1:40 pm

For this project, I was developing a code base that can be used by our researchers and students. I've posted a blog entry here that shows the final code:

http://vtchl.illinois.edu/node/557

Thanks!
taco
 
Posts: 4
Joined: Wed Oct 24, 2012 12:19 pm


Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest


cron