Yuri wrote:
gilhad wrote:
Short: Device to simply and atomicaly set/reset single bit output informations
Problem:
I need (for MC68B50 - ACIA) way to set "Ready to Read" flag to pause incoming serial data until I make space in buffer. As input data may be 32kB+ IHEX which need be burned to EEPROM (slow for HW reason) it is not good way to reserve buffer for that all time, much better is to controll trafic, but MC68B50 does not have pin, which may be set to signal "Stop sending data to me, but continue listening to me sending data to you". So another way to communication is requiered.
Also I want to have more Serial in my future computer.
...
Or if it is even good idea or is there better approach to the problem.
A few thoughts come to my mind with this.
1) The 6850 appears to already have RTS and CTS pins that can be controlled with a register on that IC. I think that's what you're looking for. (Assuming I'm not misunderstanding what you need)
2) From your diagram, it looks a lot like you can do something very similar using the 6522. Might be worth while to see what that IC is capable of before designing a large board to solve the problem.
3) Another option might be to use the SC26C92 UART instead. It has a set of input/output pins intended for general purpose IO and flow control.
Thank you for response
1) Yes, it have this pins, but devil is in details - the chip came here from prehistory, when Tyranosaurus Rex was autodialing modem over steam powered, paid and unstable telephone lines and then it was just perfect
- the CTS is OK - it is input pin and when The Other assert it (effectively saying "be silent and listen to me" ), my Transmit is blocked (and for me it looks like sending the last character is taking forever - until CTS is disasserted and I can talk again) - perfect, easy, convenient
- the RTS (Request To Send) is meant to power down the modem (and end call and save money and free line for peaople to use it) and so when it is asserted, it automatically prevent the chip from sending interrupt, when Transfer is complete (remember - modem is power down, nobody to talk to)
- but I would like to have something like "reverse CTS" to say The Other "YOU be silent and listen to ME", when the data came faster, than I can process (or buffer). And be able to send all responces to all requests, that The Other send me so far. And then again let The Other to speak more. There is no modem to hang up, there is not charge for the meter long cable to the PC on the same table, but small 8bit cannot run as fast as mighty 64bit is able dump its memory over line.
So the solution is get other output pin somewhere and connect it to CTS on other side (where my RTS would be, but I do not want also silence myself). Yes, The Other is probabely moder era and take RTS as complement to CTS. Sadly my 6850 is ancient and in its HW it still expect steam powered modem or something like that.
I suppose, that on new ICs (from this millenium, not last one) the RTS/CTS works exactly as I would need. But I want put to use, what I have at home in this case.
2) Basically yes, I do. 8 bit output, 8bit input, both times two (with Port B). But details are a bit different again
- this setting enable to set or reset just one bit, without possibly affecting others, in one atomic instruction (so also safe from interferrence from interrupts). In easy way: put in A which bits are you want (set the bits 1, others 0)
- write it to Set Register. Coresponding bits will go up, all others will stay as they are
- write it to Reset Register. Coresponding bits will go down, all others will stay as they are
no need to Read all bits before hand, then Manipulate just those interesting for this code and then Write it back (and risk, that some interrupt will change things in between)
It will may be worth to use 6522 instead with some overhead and wasting lot of its potential, but this idea looked for me as simple (before I start to elaborate on it). I was also curious, if some chip with Set-Reset single bits does exist. And I was also curious, how good or bad this idea is.
The result is, that the idea may work, but is overly complicated and there are way better solutions to the problem.
GARTHWILSONs module is far better approach and solves everything I wanted to do with my module in only 3 chips (and can it double or quadruple with bonus of reusing the '138). So I will go this way.
But Southern California (USA) is nearly on other side of globe, than Prague (Czech, Central Europe), and the postage would be probabelly way higher, than the prize of the module itself (and also I will have probabely problem to find good pay method). Also I want incorporate this to my computer as one of core parts, so I will that Grath Wilson on first part of his generous offer, as I had at home nearly everything, except the IDEA and I can easily connect such simple circuits.
Quote:
Use the information in the data sheet to make your own on your board, or you can buy mine as a module to plug into your board.
3) Yes, it would be probably too good option, but I would like put my 6850 into some use and also I want start playing with it soon, but any improvement takes me at least few day of study and aditional plannig, so I will postpone this possibility to next version/iteration. (And again it is one more chip, I was not aware of, and I am happy, that I widen my knowledge about existence of this one. )