16 Bit Microcontroller or a 32 bit Microcontroller?

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Hello,
I have a quite general question.
I have experince working with a 16-Bit 89C51 mcu family,
built a 7 band equalizer using MSQEQ7 .

These days I plan on building a 20 Band equalizer using active filters,
and instead of using 3 latches (One latch - 8, 2nd latch - 8, 3rd latch - 4),
I though of using a 32-Bit microcontroller with a 20-Bit or 32-Bit Latch.

Question is,
Is there any diffrences between 16 Microcontroller and 32 bit Microcontroller,
regarding code aspect (I intend to use the reg51.h library in keil),
critical internal facts that need attention?

Thank you. :)
 

Wendy

Joined Mar 24, 2008
23,415
The Completed Projects Forum is for Completed Projects only. It is meant to allow members to show plans for projects they built so other members can duplicate them if desired. New threads are also automatically moderated per Moderator review for this reason. Your thread does not belong in this forum, and was moved here.
 

Gibson486

Joined Jul 20, 2012
355
Your instruction sets may be bigger and more complex, and you may have to mask more bits, but, overall, nothing really changes concept wise.
 

MrChips

Joined Oct 2, 2009
30,714
People get hung up on the differences between 8-bit and 16-bit computers and 16-bit and 32-bit computers. An 8-bit computer can do the same computation as a 32-bit computer. The difference is in clock speed and throughput.

What you really need to analyze is the throughput. If I were to build a 20-band equalizer I would probably do it in software. For this I would select a fast digital signal processor (DSP), 16-bit or 32-bit which ever gives me the throughput required. The C51 family would not make the grade (as far as I know).
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Bill_Marsden,
sorry for the trouble, not doubt it wont happend again.

Thank you guys for ur answers.
I cant see the issue with C51.
I'll just use the LTC1099 A/D converter which has a max of 2us conv time (fastest around for an 8 bit converter).

With that said, someone might explain me why it would not be good enough to make a fast enough cycle in the led matrix?
 

ErnieM

Joined Apr 24, 2011
8,377
With that said, someone might explain me why it would not be good enough to make a fast enough cycle in the led matrix?
What tasks are going to be assigned to the micro? Is it just running the LED light show (or visual graphic display), or is it doing other tasks?

See, we assume this would be (because it could be) a digital equalizer, where the analog signal is sampled then the equalized version computed and output. But just running the lights is a far simpler task, can be done with most any processor.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
My goal is making a digital equalizer, not a simple led play.
In other words,
I cant seem to understand why a C51 will struggle with such assignment,
someone might enlighten me?

Thanks again. :)
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Only sending commands to the LEDs
Matrix, telling it how much leds to light up in a row according to the value the c51 recived from the adc.

There will be 20 active filters connected to the adc, which will be referred to as the 20 channels.

At the input of the active filters, an aux port will be connected carrying the input audio signal.

That's the concept of the project in genaral.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Let me just correct you,
There are 20 channels and 16 LEDs per channel.

As to your question,
In a time a channel in the led matrix is being addressed,
the number of LEDs that will be turned on will indicate the amplitude of the wave that has the frequency that represented by this channel in this very moment.
 

Meixner

Joined Sep 26, 2011
117
Thats a lot of leds, I suppose it's doable with an 8051. There are some fast varients available. I worked on a product once where we multiplexed 8 channels through an ADC and processed the output. It used an 8052 running at 12 Mhz.

In your plan the 8051 would need to "hand over" the digitized data to a display circuit that would store and display the data for each channel until it is refreshed with new data. Something like a 20 x 16 RAM to store the led data, and circutry to read it and send it to the led drivers. As well as allowing time for the 8051 to write new data to the RAM.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Thats an idea, but dont you think it will be slow?
I though about addressing each column separately, in an individual time, one after one and lighting up the required number of leds.

And go on and on in a loop, covering all the rows.
 

ErnieM

Joined Apr 24, 2011
8,377
Running the LEDs directly out of most any micro is very workable. 20 channels of 16 LEDs just need 21 lines to drive them, assuming 16 bits for the level data and 5 lines for a channel select. That needs a 5 to 20 line driver external chip of course.

What is not going to work is getting any sort of realistic level from the D2A. Sound is logarithmic, while the D2A is linear.

Someone better at the math then I would have to answer how many bits of resolution you need to do this with any sort of accuracy.
 

Meixner

Joined Sep 26, 2011
117
Thats an idea, but dont you think it will be slow?
The idea of using 2 stages running at the same time is to allow it to go faster. the first stage is a micro that digitizes all 20 channels and saves each channel to a block of RAM. Then this data is handed over to another micro to display the data on the leds. The first micro then goes back to reading the 20 channels through the ADC again.
 

Thread Starter

erezMASTER

Joined Jan 11, 2012
25
Running the LEDs directly out of most any micro is very workable. 20 channels of 16 LEDs just need 21 lines to drive them, assuming 16 bits for the level data and 5 lines for a channel select. That needs a 5 to 20 line driver external chip of course.

What is not going to work is getting any sort of realistic level from the D2A. Sound is logarithmic, while the D2A is linear.

Someone better at the math then I would have to answer how many bits of resolution you need to do this with any sort of accuracy.
Why would I need a D/A?
Its a spectrum analyzer - I am only converting the peak given in each frequency, and lighting up the required leds.

I'm just sampling the music input in the peak moments and conevrting it the digital, mean I need A/D not D/A.

The thing is,
Could I connect it as it shown here? :
 

Attachments

Top