Z80 Asynchronous data transmission using a Z80 SIO and a circular buffer

  Рет қаралды 3,381

Ready? Z80

Ready? Z80

Күн бұрын

Пікірлер: 12
@johnbullpit9481
@johnbullpit9481 3 жыл бұрын
Crumbs! I'll have to watch that a few times. From England
@TSteffi
@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
@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.
@mike94560
@mike94560 2 жыл бұрын
Very useful!
@stinchjack
@stinchjack 5 ай бұрын
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
@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.
@ReadyZ80
@ReadyZ80 3 жыл бұрын
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.
@activelow9297
@activelow9297 2 жыл бұрын
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...
@ReadyZ80
@ReadyZ80 2 жыл бұрын
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
@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
@ReadyZ80 Жыл бұрын
@@WeightlessBallast Thanks for watching. These retro computers seem to last forever!
Z80 Programming with no RAM! Crazy but challenging Mastermind game
19:10
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Ring Buffer
26:47
octetz
Рет қаралды 12 М.
The Madness of Z80 I/O
22:52
Noel's Retro Lab
Рет қаралды 77 М.
LCD Maze generating using the SPI Protocol on the Z80
25:50
Ready? Z80
Рет қаралды 2 М.
Z80 Retro #6 - I/O Interfaces
55:03
John's Basement
Рет қаралды 5 М.
I built my own 16-Bit CPU in Excel
15:45
Inkbox
Рет қаралды 1,7 МЛН
Inside the V3 Nazi Super Gun
19:52
Blue Paw Print
Рет қаралды 2,9 МЛН
Implementing a Circular Queue in C
11:23
Jacob Sorber
Рет қаралды 31 М.
Make a Z80 Computer talk with the SP0256-AL2 Speech Processor
21:16
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН