I have a 8 bit MCU in my system,most of the signals are used as GPIOs,and there are 5 ADC be used as key detect.
Because the MCU is connect to DSP through UART, I'm afraid that response of the keys will too slow.
Is it better to use 16 bit MCU,or doesn't matter.
Maybe you can consider the MSP430 Serise . It have Uart port and 200K Sample rate ADC . And It is 16bits MPU. It is very suitsble your application. You can visit the TI's Web to find it .
8 bit or 16 bit, 32 bit... you should not associate with serial communication speed.
If you say that your MCU is connected with DSP trough UART you probably don't know what is the bps.
Just imagine this: because your MCU has built-in UART it does not occupy its time while the UART sends data out. The MCU just supplys next byte and "forgets" about this function... One of the most common speed in serial communication is 9600bps.
This is close to 105µs per bit, so one frame will be (including start and stop bits, 8 bits of data and no parity...) more than 1ms. Now, it is very likely that A/D conversion is performed in less than 100µs and that your 8-bit MCU executes instructions in less than 10µs (except some codes).. so there is still plenty of time before next byte has to be delivered to the UART....
Conclusion: don't worry about number of bits..8-bit MCU is more than you need!!!
Do you mean that after ADC complete,it might be "waste" some times then be delivered to the UART?
That is exact I worried. My DSP need to have fast response to do something after press the keys. Will it be delayed by UART ?
The answer is YES and NO. Depending on the baud rate the MCU will be waiting (ie wasting) some time or at certain speed there will be nalmost no breake between conversion time and "delivery" time. Again, this has nothing to do with 8 or 16 bit architecture!!!
And another thing is this: your response time is approximately 0.5s (from you see something untill you press a key) and this is 500 000µs...and even at slow baud rate and single µs of execution time is thousands and thousands time less than your response time...I just would not worry very much about it!!!
The key is an mechanical switch and when you press it
it not connected directily it make noise for few ms like 10ms-20ms (see datasheet of key)
you must after first detection of the key make a debounce (delay for key fix)
or if you sample it fery fast you will see the key pressed more time then one.
If you build a resistor network (ie. doubling the resistor values) on the keys , then you can use only one A/D to read the keys. Read as the voltage drop on the resistor that got connected to GND.
try identifying the bottlenecks in your system ... by the looks of it i dont think an 8 / 16 bit processor is a real issue ... the serial communication baud rate can be ...
for the switch interface try using a latch instead of handling the debouncing in software ... try using a MCU with built in ADC options ... cygnal has several good options in that regard
depends on the micro...if is a low pin count pic for example,using the adc is a nice trick to read a keyboard on only one input...if more io pins are available,is a better idea to scan a matrix in the classic way,will be faster than waiting for the ad converter...i'm almost sure he's talking about a 12f675....