6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 1:20 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: FT245R
PostPosted: Fri Mar 29, 2024 8:54 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 984
Location: Potsdam, DE
A handful of posts indicate that some posters here have used the FT245R with some success (Plasmo?).

I'm probably not reading the data sheet correctly, and I can't tell whether it presents as a TTY/serial interface at the host computer end (so on my linux box, as /dev/TTYUSBx). I'm wondering whether it could be used as a serial interface with a direct parallel input/output at the micro end... the problem with its FT232R brother (or the lovely adaptor cables containing that part) is that they require a UART to drive them with the proper output.

And to be honest, discrete UARTs that aren't sixty-four pin monsters are a dying breed...

Any hints?

Neil


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 9:46 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
the FT245R is a overall worse version of the FT240X. as it's twice as expensive (4 USD instead of 2 USD on mouser) and has a smaller FIFO than the FT240X, all while having the same exact functionality. plus the FT240X has 2 programmable pins which can be configured with FT_PROG (useful as you can use the chip as a 24/12/6MHz clock source)

both are direct USB to parallel FIFO chips. meaning that on the USB side it shows up as a regular serial port and on the other side it's a simple 8-bit wide async FIFO.

you can think of it as a regular UART combined with an FT232RL in a single tiny chip.


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 9:54 am 
Online

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1120
Location: Albuquerque NM USA
FT245R is parallel interface with 8 data lines and 2 handshakes. At the USB end, it appears as a serial port. I used TeraTerm terminal emulator to talk to it. For terminal characteristics setup, I used the standard 115200N81, but it actually run much faster.

So yes, it is like a serial terminal at the workstation end, but you don’t need a UART at the microprocessor end.
Bill

I see Proxy has posted an explanation of 240X vs 245R. I bought my 245R as an off-the-shelf module, don’t know if 240X is available as module.


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 10:07 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
the "UM"245R is the module based on the "FT"245R. there is no FT240X version of the module.
a custom module could be designed to be similar or pin compatibile with the UM245R, the obvious downside would be that you'd have to order all the parts and assemble it yourself. it would likely end up a bit cheaper than just buying a premade UM245R, even including shipping costs, but again you'd need to assemble it yourself.


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 10:46 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 984
Location: Potsdam, DE
Thanks both.

I'm considering using it as a simple parallel->USB 'uart' built onto a board, rather than as a dongle.

Reading the datasheet suggests that it can sit across a data bus with a bit of glue logic - sadly it lacks a ~CE pin so it would certainly need a bidirectional buffer (or bus isolator) and something to read/write the controls. Perhaps the RXF line could edge-trigger an interrupt?

Neil


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 11:12 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
you don't need a bi-directional buffer. you can just connect it's data lines to the CPU's, your logic just has to generate seperate read and write signals which would act like a chip select line.
keep in mind that RD is active-low, while WR is active-high. (opposite of the R/~W pin on a 6502/816). and you cannot simply connect them together and hook them up to the CPU's R/~W pin through an inverter as that would constantly read/write from/to the FIFOs, which would mess up data transfer.

to read out the RXF and TXE lines you do need a seperate tri state buffer or a VIA.
you could hook up RXF to the NMI pin, but you still need to be able to read it out manually because without it you cannot know when there no longer is data in the receiving FIFO.
you could also connect it to the IRQ pin, have the ISR read out a byte and then return, if there are more bytes it will immediately go back into the ISR. but that would give you horrible performance.


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 11:21 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 984
Location: Potsdam, DE
Ah, so it doesn't output data from the Rx FIFO until it's told to?

Neil


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 2:15 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
barnacle wrote:
And to be honest, discrete UARTs that aren't sixty-four pin monsters are a dying breed...

The Exar 88C92 is PLCC-44 and is readily available from stock.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 2:19 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 984
Location: Potsdam, DE
As it happens, BDD, I have the datasheet already open :D

Neil


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 2:47 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
barnacle wrote:
Ah, so it doesn't output data from the Rx FIFO until it's told to?

correct. think of it like a memory Chip which also have seperate OE (RD) and WE (WR) inputs to control the direction and contents of the data bus. (but without CS in case of the FT chip).

can i ask where you got the assumption from that it would constantly output data even when idle?
since i've never heard of any IO, or Memory Chip with a bidirectional bus work like that before. even hardware FIFOs with uni-directional busses like the IDT720x only output data when RD is asserted, otherwise it's tri-state.

of course, having an actual UART gives you more functionality and the RX/TX lines to connect to another UART. so the FT chips are only useful if you need a direct connection to a PC via USB with minimal logic and software overhead in a very small size (in terms of PCB space).


Top
 Profile  
Reply with quote  
 Post subject: Re: FT245R
PostPosted: Fri Mar 29, 2024 5:41 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 984
Location: Potsdam, DE
For some reason (age, brain fade, lack of beer...) I had it in my head that one wrote to it and the output appeared on the, er, output :mrgreen:

I don't know why; perhaps conflating it with the '8153 I was using last project but one. Or perhaps because it didn't have at first sight a 'data received' output (though of course, it does!)

One of those days...

For prototyping, I'd usually just use a 68b50 but in this case the clock speed is 3.2MHz which is theoretically too fast for the '50 (though I'll try it, you never know). I don't want to mess around with clock stretching which is bound to confuse me... or it. A later refinement of this circuit will use an STM32L073 as a generic IO with DMA, but again, I want at the moment to test one thing at a time.

Indeed, at the moment, I only need an input so it could/should be possible to glue something together with a couple of '163 and a '164 and a little glue logic... but again, one thing at a time.

Neil


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: Dr Jefyll, plasmo and 23 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: