??? 07/10/07 17:42 Modified: 07/10/07 17:51 Read: times |
#141694 - coping with the wierdness is my job Responding to: ???'s previous message |
Jan Waclawek said:
Well, Richard, it appears that you are going to do something really weird - and you will need to cope with that yourself, then. I wouldn't call it particularly wierd. It's just acquisition of data for later processing. It's part of a larger task, and it produces data that must be analyzed in order to extract undocumented specifics. However, a few concluding remarks.
If you intend to capture a long stream of data, do some processing and transmission to PC, you might consider double- or multiple-buffering schemes. Those fast (cache) SRAMs are not that expensive, especially if you pull them from thrown-out old PC motherboards. Yes, I have plenty of them, though I did consider using fast-page DRAM's since that would reduce the number of I/O's. However, that would demand that I use too large a memory array, as the DRAM array would have to be at least two banks, else I wouldn't be able to use the page mode. Timing and burst-length tracking would be burdensome (requires resources), too, since the MCU is a one-clocker with a 25 ns bus cycle when it's in the filtering/compression process. I would drop the PLL-ish thing, too, for simplicity, and post-process the raw stream - whatever it is - in PC, but we discussed that earlier. I think that would be foolhardy. What the "PLL-ish thing" does is to ensure that it samples in the correct phase with a transition on the input signal. It's just a 4-bit counter, so it's easier to program it into the CPLD than to write the hundreds of lines of code necessary to detect a frame-slip (which is difficult), determine its sense (also tricky), and make the adjustments (add a bit or discard a bit) over the entire downstream set of samples (and do that each time a slip is detected). It's 2 minutes' effort in designing the CPLD vs a half-hour of typing, not to mention debugging, etc, in the PC. I know the hardware works adequately and that it does exactly what I want. Also, you don't really need to address the "sampling" memory from the '51, as you are most probably going to use the sampled data exclusively sequentially. I used this trick once - the addresses are fed from a counter (in the CPLD) advancing at each read cycle, the only thing you need is a facility to reset the counter from '51. This would require a separate chip for the intermediate data and code, though. Actually, once this circuit is built, and until I have need to "unbuild" it, for want of the board or some components in it, it may find use in some other application. For that reason, too, I have to consider what will be more widely useable, hence, I prefer to make the memory accessible to the MCU in a standard sort of way, as it increases the likelihood that it will be useable elsewhere. Richard said:
SDRAM would be fast enough and cheap enough, but, while the capacity is WAY too large to be necessary for this, the packages are WAY too small to be convenient to use in a hand-built prototype. Since this is a freebie for a colleague doing ongoing research on a restricted budget, I'm doing it as cheaply as I can and with technology I can easily implement myself. A link just for inspiration, both for the idea and for "homemade realisation": http://www.myplace.nu/avr/dram/index.htm Jan I'm VERY familiar with DRAM, and I'd quickly point out that there is a substantial difference between DRAM and SDRAM, both in its configuration and its usage. The SDRAM, for one thing, requires considerably more setup than DRAM, and that, alone can be quite a burden in autonomous hardware. Moreover, you'd have trouble getting anyone to sell you DRAM these days, though I do have plenty of it lying about. I did consider using a 1Mx10 DRAM array, in order to track the behavior of the HDC's Write-Gate signal with respect to the drive's SYNC strobe, but I think I can do that adequately with the 'scope. SDRAM packages seem, typically, IIRC, to have 0.5 mm pin-pitch on their rather large-pin-count packages. For an old man, one who has to look for his glasses in order to find the correct pair of glasses, using parts like that is not so friendly. RE |