??? 03/08/06 05:03 Read: times |
#111579 - but WHEN? Responding to: ???'s previous message |
Under precisely what conditions do you want to sample those signals?
Do you need to know when the three signals occur with respect to some other event? Do you need to have the relationship with the system clock? Do you just need to know whether a particular state ever occurs? What information are you hoping to derive from this exercise? (Forgive me, but I'm unfamiliar with this particular part, so those signals don't mean much to me.) What's been said about the parallel port in general is quite true. However, if you use, say, a really fast 805x, such as my own personal favorite, the DS89C430, you can sample these signals a very fast rate and buffer the result in an external 64KB or smaller SRAM. That MCU executes 1 instruction cycle per clock, and the maker claims 1.6 cycles, on the average, per instruction in a typical mix. They also assert the thing can run at 33 MHz, so if you clock it at some precise multiple of your other mcu's clock, or with that very clock, since this part can also multiply the clock by either 2 or 4 internally, you can probably get quite a few samples, as well as triggering on some other well-defined event. If you have a single external event that you want to use as trigger, you can combine that into a trigger signal and use the trigger signal as an interrupt, where your ISR merely captures the signals you want and buffers them in external RAM. When the DPTR overflows, you can dump the resulting buffer into the PC via a serial link. If you want history before the trigger, then you make monitoring the trigger event a part of your sampling routine. you then sample until the buffer is full, produce an enable to the external trigger and then capture until you've captured 32K or 48K or some other convenient number of samples after your trigger. That will get you fast enough samples to ensure you capture what you want to see, yet gives you a low-cost, yet effective way to get the information into your PC. These MCU's cost about $8 according to www.maxim-ic.com. That's just another way to do it, of course, and plenty of potentially adequate means have been put forth. Just remember, the more general you make your device, the longer it will be of service to you. RE |