6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 5:40 pm

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Mar 01, 2024 10:16 pm 
Offline
User avatar

Joined: Fri Jan 26, 2024 5:47 am
Posts: 40
Location: Prague; Czech Republic; Europe; Earth
@Garth Wilson: Thanks for your generous offer, but as I wrote to Yuri, I will build my own version - putting chips to breadboard is way faster then wait for post (Czech Post is terrible company, slow, chaotic, it can take literaly weeks for package to get from one side of city to another) a in my planned version of computer this will be on main board as integral part.

_________________
http://micro-corner.gilhad.cz/, http://8bit.gilhad.cz/6809/Expanduino/Expanduino_I.html, http://comp24.gilhad.cz/Comp24-specification.html, and many others


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 02, 2024 6:28 am 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 257
Location: Texas
gilhad wrote:
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.


I see, interesting. I was not aware people used the RTS in that way.

Quote:
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)


Ah! That makes a bit more sense; so yes looking at more detail I can see how this would allow you to manipulate a bit in fewer instructions.

That being said, if I couldn't modify the hardware to do this, I would do it in software like so:

Code:
STI       ; Disable interrupts
LDA #$08  ; Load bit to toggle
EOR $8000 ; Toggle bit in accumulator
STA $8000 ; Save bit to location
CLI       ; Re-enable interrupts


This is about as close to atomic as you can get with a 6502, at least as far as I know. There's usually more to it, the devil is in the details as you say.

Best of luck!


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 02, 2024 6:52 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Yuri wrote:
This is about as close to atomic as you can get with a 6502, at least as far as I know.

He's using a 65c02, which has the TSB and TRB instructions.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 02, 2024 6:57 am 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 257
Location: Texas
GARTHWILSON wrote:
Yuri wrote:
This is about as close to atomic as you can get with a 6502, at least as far as I know.

He's using a 65c02, which has the TSB and TRB instructions.


Just knew the moment I posted that someone was going to show me a faster way. :mrgreen:


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: