News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Rabs

Help getting RTS/CTS Flow Control on DART

Started by Rabs, 19:44, 22 September 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rabs

Hi,

I have been playing around with a Z80 DART and have this all working both Tx and Rx but with no flow control (RTS/CTS).

I am trying to get flow control working, but struggling.

It may be how I am programming DART or maybe how I have it wired up, or both.

I am using an FTDI and Tera Term.

This is how it is wired to the FTDI.

You cannot view this attachment.

I am concerned that I should have connected Pin 2 of J5 which is DSR on the FTDI but I tried this and did not work.

This is how Term Term is configured

You cannot view this attachment.

And this is how I am programming the DART

SIO_DART_DATA:
/*
    WR0
    7-6 00  Null Code
    5-3 011 Channel Reset
    2-0 000 Register 0
*/
DEFB %00011000 ; #18

/*
    WR4
    7-6 01  X16
    5-4 00  8 Bits
    3-2 01  1 Stop
    1-0 00  NO Parity
*/
DEFB 4,%01000100 ; #44

/*
    WR3
    7-6 11  RX 8 Bits
    5   0   No Flow Control (1 for RTS/CTS)
    0   1   RX Enable
*/
DEFB 3,%11100001 ; #C1 (#E1 for RTS/CTS)

/*
    WR5
    6-5 11 TX 8 Bits
    3   1  TX Enable
    2   0  No FLow Control (1 for RTS/CTS)
*/
DEFB 5,%01101100 ; #68 (#6C for RTS/CTS)

/*
    WR1
    7-0 0 Disable all Interrputs
*/
DEFB 1,%00000000 ; #00


Again it all works with no flow control but I would like to enable RTS/CTS.

This is the board

You cannot view this attachment.

Any help much appreciated.

SerErris

Really interesting project and I do see why you want to use a proper DART here.

However I do think the CPC would actually benefit from a UART, with a FIFO queue, so that it can do other stuff and read in blocks of 8 bytes for instance in one shot, instead of permanently getting interrupted to read a single byte.

Unfortunately I have no clue on Flow control.

You may want to look at the Vortex serial interface. They are also using the Z80 DART and have written some chapters in there manual regarding flow control. Maybe that helps to find the clue.

I think you are pretty close.
Proud owner of 2 Schneider CPC 464, 1 Schneider CPC 6128, GT65 and lots of books
Still learning all the details on how things work.

Rabs

Quote from: SerErris on 23:30, 23 September 23Really interesting project and I do see why you want to use a proper DART here.

However I do think the CPC would actually benefit from a UART, with a FIFO queue, so that it can do other stuff and read in blocks of 8 bytes for instance in one shot, instead of permanently getting interrupted to read a single byte.

Unfortunately I have no clue on Flow control.

You may want to look at the Vortex serial interface. They are also using the Z80 DART and have written some chapters in there manual regarding flow control. Maybe that helps to find the clue.

I think you are pretty close.
Thanks, this is really just a protyping board that so I can learn about the Z80 peripherals, Z80 assembly and the CPC. Although I do use this serial board as an event logger and binary software loader.

I have an old UART in my draw and may play with that next.

I spotted that my definition of WR5 is incorrect and RTS should be bit 1 not 2.

However, I think setting this just permanently enables RTS, as receive works but I still have to put a delay between the transmitted characters. Guess I could control this in software.

Sorry do you have a link to the vortex serial manual?



SerErris

Proud owner of 2 Schneider CPC 464, 1 Schneider CPC 6128, GT65 and lots of books
Still learning all the details on how things work.

GUNHED

The DART / SIO are cool chips for the Z80. They are even cooler when used together with IM2 interrupts.  :)

Did you try to connect two of your cards to each other, instead CPC to PC?
Maybe this helps to find the problem.
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod