RE: lpc 2148 based pc oscilloscope
2) The maximum frequency of an analog signal depends on what you want to see and your external filters. The more samples you have per full oscillation of your analog signal the better the image will get. But suffice it to say your max input frequency will be "low", less than 100kHz.
3) This one is simple, assuming you mean 9600 baud on uart with 8 databits, no parity and one stop bit. one byte of data is 8 bits ad to that a start and a stop bit and you will have 10 bits. However you have a 10 bit ADC value therefore you need to send two bytes. this will make, 10 bits times 2, 20 bits. With 9600 bits per second you can send 9600/20 = 480 adc samples per second. Thats more than 833 times less than your sample rate.
That's difficult to say. Even if you could toggle the pins at 10 MHz, there is no reason to believe you could read them that fast. Code takes time to execute and branches flush the pipeline. Yes, you can use conditional op codes in assembly language but that gets involved.
Those bus interfaces you see in the device block diagram limit how fast pins can actually change state. Regardless of what the code thinks.
I think the absolute fastest way to do this is to poll the pins in assembly code keeping tight track of timing in the loop. Interrupt the loop when the time runs out or, better yet, just stop when the buffer gets full.
But I still don't know how fast it can be done. Maybe up into the MHz range with VERY tight coding. The code loop would 1) read the pins 2) write the value to memory at an address in another register and increment the register 3) loop back to 1 if there is more room in the buffer. Better yet, store the data backwards so when the register gets to zero, you are finished.
So, maybe we can execute 60 million instructions per second. Maybe there are 10 instructions in the loop. Maybe we can make 6 million loops per second. We might actually be faster than the pins. I don't think the datasheet has this number (I just looked and didn't see it). I remember being terribly disappointed at how slow GPIO was on the 2106. The 2148 added Fast IO but I never went back to find out how fast.
Write some assembly code to toggle the pins and see how fast it is. Remember that the code will tell the pins to toggle but they may not actually be able to keep up. You can try it in C but typically, that won't be nearly as fast.
I wouldn't actually build a logic analyzer with a microcontroller. And neither does anyone else if they want any kind of speed. The fast ones are built with FPGAs whether they use A/D channels or digital channels. Digital scopes are built the same way.
A nice 200 MHz Logic Analyzer is described in this project:
I have been using it for several years.