dlejob 0 Posted November 29, 2012 Share Posted November 29, 2012 Actually, I do have the code to display on the top row as well but it does not look too good due to the gaps between the row. I will clean up the codes a bit then release it. Keep in mind that this type of LCD need some delays between commands that could cause the audio mismatch. Thanks. Quote Link to post Share on other sites
dlejob 0 Posted November 30, 2012 Share Posted November 30, 2012 Hello, I am ready to release the source code. Can someone point me to the right place? Quote Link to post Share on other sites
bluehash 1,581 Posted November 30, 2012 Share Posted November 30, 2012 Use the code tag <> in the editor. or just paste it here, I'll take care of it. Quote Link to post Share on other sites
dlejob 0 Posted December 1, 2012 Share Posted December 1, 2012 Thanks, Here is the files location. Add/Replace these file to the original project from EuphonistiHack. https://docs.google.com/folder/d/0B2e01HJNFmp0Ym1reFdlR0Q5OGM/edit bluehash 1 Quote Link to post Share on other sites
CorB 64 Posted December 9, 2012 Share Posted December 9, 2012 Hi, Would anybody dare to state what the maximum frequency would be that can be analysed ? I am still thinking about using either the C2000 or the stellaris as a Batdetector (20khz - 100khz range). cheers CorB Quote Link to post Share on other sites
EuphonistiHack 0 Posted December 10, 2012 Share Posted December 10, 2012 Hey CorB, I'm going to venture a guess and say you'd be able to modify my code pretty easily to suit your needs. I don't have a datasheet handy, but if memory serves me right, the ADC peripherals on an lm4f120 have a max sampling rate of 1 MHz,. To get an upper bound of 100 KHz, you'd want to sample around 200 KHz. I'm fairly certain that the processor and DSP algorithms I use are good enough to give you a good data rate if you're sampling at that frequency. Your frequency bins are going to be a bit large though... The maximum FFT size that the CMSIS library allows is 2048, which means your bins are going to be 200,000/2048 wide, or ~100 Hz per bin. You're probably going to need to do something fancy for your analog input though. For one thing, standard microphones aren't normally designed for handling frequencies above ~25 Khz (since we can't hear much audio above that). You'll also want to be careful in your opamp selection. It shouldn't be hard to find one that can handle up 100 KHz, but I know the one I used for my project isn't spec'd for it. The final point to consider is what you're going to be doing with the data. If you want to take immediate action based on what's happening in a frequency range, you're good. If you want to keep a record of things happening though, you're probably going to hit memory restrictions real quick. I have a new version of my code that I'm going to be releasing this week, and the final compiled binary takes up 32,743 bytes of ram. Note that the chip has 32,768 bytes of ram total. When doing DSP on a microcontroller, memory gets scarce :/ Hope this helps, and happy hacking bluehash and ethepasty 2 Quote Link to post Share on other sites
CorB 64 Posted December 10, 2012 Share Posted December 10, 2012 Hi Euphonistichack, Thanks for answering. I am using a pre-amp scheme I have used before for a heterodyne batdetector. Nothing excotic, Options are to use a 40khz ultrasonic transducer (ive used those sucessfully) or to use an electret micro with some additional filtering. Theres many schemes around. I wont need that many bins in the FFT as I am planning to display the data directly on an LCD and a resolution of 1 bin/khz would deliver enough information to determine the species by. Recording data is indeed not easy unless I would simply store the "footprint" with the data /bin. Thanks for confirming the possibility to use the stellaris to do this. cheers CorB abecedarian 1 Quote Link to post Share on other sites
EuphonistiHack 0 Posted December 15, 2012 Share Posted December 15, 2012 Hey everybody, I don't know if I should make this a new post or just update here, but I just released a pretty heavy duty update to my project. Let me know what you think! http://euphonistihack.blogspot.com/2012/12/the-writeup-2-electric-boogaloo.html RobG, larsie, YanuarPrijadi and 2 others 5 Quote Link to post Share on other sites
CorB 64 Posted December 15, 2012 Share Posted December 15, 2012 Great !! You have closed down the gap for me. 80Khz would be great for a bat-detector ... that would probably give a 40khz maximum readout ? cheers CorB Quote Link to post Share on other sites
EuphonistiHack 0 Posted December 15, 2012 Share Posted December 15, 2012 That is correct. Honestly, though, the only reason I cap it at 80K is because there's no reason to go higher than that in my project. The hardware is capable of handling higher frequencies, but the larger the maximum value, the more difficult it is to set the value using the touchscreen slider. You can change the maximum sampling frequency pretty easy in my code by editing a single macro. Quote Link to post Share on other sites
CorB 64 Posted December 16, 2012 Share Posted December 16, 2012 Hi, Ive tried to load your new project into CCS but it failed. During the import I get an error : Error: Import failed for project 'freq_analyzer' because its compiler definition is not available. Please install the ARMv5.0 compiler before importing this project. the led project imported just fine. Cor Quote Link to post Share on other sites
EuphonistiHack 0 Posted December 16, 2012 Share Posted December 16, 2012 bwar... I recently had to update to CCS 5.3 to for an unrelated project. I'm assuming this will be a common issue, as 5.3 was released pretty recently. If you want to get up and running right now, updating CCS should fix it. I think I still have version 4.9 or 4.7 of the compiler somewhere on my build system... I'll see if I can revert the compiler version in my project settings and push that to github. Quote Link to post Share on other sites
CorB 64 Posted December 16, 2012 Share Posted December 16, 2012 I am on CCS 5.2 ... should not be too much of a difference. Quote Link to post Share on other sites
bluehash 1,581 Posted December 16, 2012 Share Posted December 16, 2012 Nice! Make sure you add it to the POTM. Quote Link to post Share on other sites
EuphonistiHack 0 Posted December 16, 2012 Share Posted December 16, 2012 Well, with 5.3, the CCS guys changed around a bunch of tool names, including the tms470 compiler that is used for the Stellaris line (they now call it the ARMv5 compiler). That's why you're seeing the "Please install the ARMv5.0 Compiler" message... if it were just that my project was using a newer version of the tms470, CCS would still let you import, but give you a warning. Since my project is using a compiler with both a different version and a different name from the one you have, it's outright not letting you import the project. I'll push an update sometime today or tomorrow with the compiler set to the tms470... in the meantime, you can try poking around the .project files in the ccs directory to see if you can find out where the compiler is declared and switch that to whatever you're using. bluehash and abecedarian 2 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.