Crumbs! I'll have to watch that a few times. From England
@TSteffi Жыл бұрын
Around +25:00 you explain that you disable the transmit interrupt if the buffer is empty. To prevent it from firing again. But looking at the technical manual for the Z80 SIO, it states explicitly that the interrupt only fires when the buffer *becomes* empty. So if you don't send anything, the tx interrupt should not fire. It should only fire after a byte is transmitted.
@ReadyZ80 Жыл бұрын
Thanks for your comment. After reading the spec again, looks like the transmit interrupt fires when the SIO buffer becomes empty and only once. This should only occur when data was received and cleared. I based my code off an example in Levanthal's Z80 Subroutine book. He states that this interrupt could fire when no data is available. But I'm not sure how that could happen. I'll have to set up the SIO again and try it out.
@mike945602 жыл бұрын
Very useful!
@stinchjack5 ай бұрын
Hmm interesting. When I built my Z80 project, I used an Intel 8250 for serial, and connected both RTS and CTS to the FTDI chip. I can use RTS/CTS flow control to avoid the need for a circular buffer if I want to get input from my PC that way. I have an HT6542 connected to a PS/2 Keyboard, but the chip(s) in the keyboard itsself handle the buffering if needed.
@jan10n Жыл бұрын
Nice! The read interrupt does not save and restore most registers used....
3 жыл бұрын
"LD HL,CIRCBUF" then "LD L,B" ... Hmm I would write "LD H,CIRCBUF>>8" then "LD L,B". If you assembler supports the ">>" operation but probably "/256" is also fine. Also for sure to work it requires that your buffer do not cross 256 page boundary, but it's a limitation of the original code too.
@ReadyZ803 жыл бұрын
Hey, thanks for the reply. Yes looking at it again doing a LD HL then LD L just overwrites L again. This will save a byte and 3 T-states. Good pickup. If I was doing a LD B,01H and LD C,02H, I would often combine them by doing a LD BC,(01H * 256) + 02H.
@activelow92972 жыл бұрын
51200 baud? There is no such thing. Why?? Incidentally, the correct way to do it is to use a 1.843mhz crystal for your baud rate generator.. then you get all the standard baud rates by dividing out. x16 is 115.2, x64 is 28.8, x96 is 19.2, etc...
@ReadyZ802 жыл бұрын
Yes 51200 baud is odd. It came about because computer was using a colour burst crystal at 3.57954Mhz. I wanted something of similar speed that divided okay. Good point.
@WeightlessBallast Жыл бұрын
@@ReadyZ80 This seems like a cool channel. I own an MZ-80K that I bought in 1982 and it still works. 30 years ago I modified a PC serial port card to support MIDI by changing its crystal so that 38400 baud became 31250, the MIDI standard speed. And I modified the circuitry so that it supported 5mA current loop.
@ReadyZ80 Жыл бұрын
@@WeightlessBallast Thanks for watching. These retro computers seem to last forever!