What i'm thinking, in pseudocode for now:
Code:
- Run Once Setup of the 6551
- Outer Loop Label: set the ROM data array index pointer(s)
- Inner Loop Label:
- Timing NOPs to make sure the 6551 got its byte out. will be determined with scope and observation. Its a dumb train animation. It only
needs to look okay enough to the eye, as in not too laggy.
- Read current rom index from my byte array in memory
- write value from that address to the 6551 transmit register
- modify rom index.
-compare to end array value, which is going to burn some cycles since I'm counting to 53k. I'm mostly familiar with ARM Cortex M, so
mentally I don't have a good count right now of how this is going to work 8bit, but we have cycles to burn anyways waiting on the 6551
- jump back to Inner Loop Label if not to the end of the array, jump back to Outer Loop Label if rom index is the
end of array
Is there a reason that the number of NOPs would need to be drastically different from loop iteration to loop iteration? Shouldn't this be pretty deterministic, or about as deterministic as something that uses UART can get? There's no user input, or anything firing interrupts, to disrupt my loop as far as I can see, the RPi is buffered and at 19200 is unlikely to fill its buffers since its also locked in the case and not being used for anything else. If the Pi decides to do some linuxy maintenance crap once in a rare while and the animation chops for a few minutes a week, its not a big deal. Am I missing something big here like I did with my decoder logic?
floobydust said:
Quote:
Well, based on your required memory map, I would suggest you implement a PLD to handle it. With a single glue chip, you can get the desired memory map (RAM, ROM and I/O) along with qualified read and write signals for memory (and non-65xx I/O devices) access. I would also suggest switching to a different UART and avoid writing workaround code as well. The PLD option will give you a flexible memory map which can be changed easily without a hardware design change.
You know, I was just looking at CPLD's since we have all the hardware I need at work to program them already. We use them in some courses. It would save a lot of wiring mess on the breadboards and probably be the easiest with this rather bizarre memory map.