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

All times are UTC




Post new topic Reply to topic  [ 298 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 20  Next
Author Message
PostPosted: Fri Mar 06, 2020 2:20 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
Dr Jefyll wrote:
Proxy wrote:
i tried multiple cables, and currently i'm used the same cable i use for my TL866 II plus Programmer, so i know it's not the cable.
I would consider trying a different computer in case there's a defect on its USB port or something associated.

That may seem impossible, given that your TL866 II (presumably) works using that port. But it's possible for a USB port to be semi-defective -- I have witnessed this. I have a laptop with two USB ports. One of the ports isn't right -- it communicates properly with some devices but not others. It caused me some head scratching at first!

-- Jeff


i tried it on a laptop as well as multiple USB Ports with the exact same result.

it's not a PC or cable problem, it has to be either the PCB or the chip itself.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 06, 2020 4:23 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Proxy wrote:
Dr Jefyll wrote:
Proxy wrote:
i tried multiple cables, and currently i'm used the same cable i use for my TL866 II plus Programmer, so i know it's not the cable.
I would consider trying a different computer in case there's a defect on its USB port or something associated.

That may seem impossible, given that your TL866 II (presumably) works using that port. But it's possible for a USB port to be semi-defective -- I have witnessed this. I have a laptop with two USB ports. One of the ports isn't right -- it communicates properly with some devices but not others. It caused me some head scratching at first!

-- Jeff


i tried it on a laptop as well as multiple USB Ports with the exact same result.

it's not a PC or cable problem, it has to be either the PCB or the chip itself.

Is there any way you can get access to an oscilloscope? 'Scoping the signals may quickly reveal the problem.

BTW, what exactly is your USB function expected to do?

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 06, 2020 4:35 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
BigDumbDinosaur wrote:
Is there any way you can get access to an oscilloscope? 'Scoping the signals may quickly reveal the problem.

BTW, what exactly is your USB function expected to do?

well i was thinking of just buying myself an oscilloscope one day. i just don't know what is a good choice.
(personally i only got 2 critirias for a scope: it has to be digital, and fast enough for the stuff i work with here (~20Mhz))
or would a logic analyzer be better? since i could look a lot of signals at the same time to check timings

and the FT240X is basically just a UART, but works over USB instead of RS232. it has all the needed USB protocol stuff build in, you don't need to initalize it, you don't need to program it, nothing.
you just connect it to power and the USB Data lines and it'll work.

but for some reason it doesn't on this board. i must've done some mistake that prevents it from properly communicating with a PC.
but there are only 5 connections this thing needs to work, Vcc, GND, D+, D-, VCCIO (last one is just a bridge between pin 3 and 15).
the data pins, and R/W are not needed for it to build a connection to a PC.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 06, 2020 4:47 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
A 20MHz scope might be too slow to notice problems on a 12Mbps USB signal. The common advice nowadays is to get a 100MHz scope for basic digital work. That should be fast enough to see distorted or glitchy clock signals that modern logic might get confused by.

Getting one of those cheaply is the tricky part.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 06, 2020 4:51 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
Proxy wrote:
well i was thinking of just buying myself an oscilloscope one day. i just don't know what is a good choice.
(personally i only got 2 critirias for a scope: it has to be digital, and fast enough for the stuff i work with here (~20Mhz))

The Rigol DS1054Z is a classic "very cheap but pretty good" 'scope, and has the advantage of having four channels. (This can make life significantly easier.) It's got the sampling rate to deal with 20 MHz just fine. I've got one and I'm extremely happy with it. (A warning, though, don't expect to use it for extensive protocol decoding. It's got decoders built in, but it can only decode what's on the screen, which is kind of limiting.)

Quote:
or would a logic analyzer be better? since i could look a lot of signals at the same time to check timings

A logic analyzer is good in that way, but if you have signal problems (such as what you might be experiencing now with the USB thing) that mean the digital signal isn't being decoded properly, the logic analyzer won't help much with finding that. I'd definely go for a 'scope first.

Quote:
and the FT240X is basically just a UART, but works over USB instead of RS232. it has all the needed USB protocol stuff build in, you don't need to initalize it, you don't need to program it, nothing.
you just connect it to power and the USB Data lines and it'll work.

Well, it's a bit different from that; it's more its own custom interface, from what I could tell, that works much faster than the standard serial over USB protocol. But your problem comes before that; from what you posted the computer can't even do the basic generic identification sequence that should work for any USB device, so that points to a communications issue at a fairly low level.

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2020 7:03 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
cjs wrote:
The Rigol DS1054Z is a classic "very cheap but pretty good" 'scope, and has the advantage of having four channels. (This can make life significantly easier.) It's got the sampling rate to deal with 20 MHz just fine. I've got one and I'm extremely happy with it. (A warning, though, don't expect to use it for extensive protocol decoding. It's got decoders built in, but it can only decode what's on the screen, which is kind of limiting.)


hmmm, looks good. but i also found the "SDS1104X-E" thanks to a video from EEVblog.
but it is more expensive and i personally don't think i need something faster than 50MHz for the stuff i do.

cjs wrote:
A logic analyzer is good in that way, but if you have signal problems (such as what you might be experiencing now with the USB thing) that mean the digital signal isn't being decoded properly, the logic analyzer won't help much with finding that. I'd definely go for a 'scope first.


a logic analyzer would be more useful to check the function of the actual computer, since it would allow you to look at the data bus, RD/WR signals, etc at the same time without having to single step through everything, and manually check with a logic probe.

cjs wrote:
Well, it's a bit different from that; it's more its own custom interface, from what I could tell, that works much faster than the standard serial over USB protocol. But your problem comes before that; from what you posted the computer can't even do the basic generic identification sequence that should work for any USB device, so that points to a communications issue at a fairly low level.


so it either is my soldering, the chip being broken, a problem with the PCB, or the traces.

Attachment:
chrome_2020-03-07_07-27-30.png
chrome_2020-03-07_07-27-30.png [ 159.99 KiB | Viewed 837 times ]

this is a section of my schematic, showing the USB connector (top) and the FT240X (bottom).
pin 15 and 3 are connected to eachother like the datasheet says,
Vcc and GND are connected as well,
USBDP is connected to pin 3 (D+) of the USB Connector, and USBDM is connected to pin 2 (D-) of it.
SI/WU is being held high at all times so that one deos nothing.
the Data lines, RXF/TXE, and RD/WR are completely irrelevant at the time (but i checked the RD/WR pins and they are held high as well)
pin 17 (which is actually VCORE) and CBUS5/6 are also not needed and therefore just left unconnected.
CBUS5/6 are programmable but by default are used to detect if the device is plugged into a host, and to keep the device from putting itself into a stand-by mode when not plugged in.

i did actually use that CBUS5 pin to see if the device even considers itself plugged in. and when plugging it into my PC it pulses High a few times but afterwards stays low. (it's always the same pattern when i un/replug it)

I'm almost tempted to make a new PCB that just has the FT240X, a USB Cnnector, some passives, and a few pin headers on it.
so i can see if that one would work, and that way i could have a functional USB device that i could compare to my currently not working on.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2020 7:48 am 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 730
Location: Tokyo, Japan
Proxy wrote:
hmmm, looks good. but i also found the "SDS1104X-E" thanks to a video from EEVblog.
but it is more expensive and i personally don't think i need something faster than 50MHz for the stuff i do.

The DS1054Z is actually software-upgradable to 100 MHz as well (and this can be done for free using key-code generators on the 'net, if you're brave enough; it worked great for me and lots of other people) and so the two scopes are pretty similar in specs. Remember, though, that the MHz figures are talking only about the analogue front-end; you still need a sampling rate fast enough to be useful. (The DZ1054Z drops to 250 megasamples per channel when all four channels are on, which can be pretty dodgy for 100 MHz signals unless you really know what you're doing.) This sort of stuff is explained all over the 'net, though, so there's no need to get into the details here. I don't think there's really such a huge difference between the most popular low-end desktop 'scopes, though they certainly generate thousands of comments on EEVblog.

Quote:
a logic analyzer would be more useful to check the function of the actual computer, since it would allow you to look at the data bus, RD/WR signals, etc at the same time without having to single step through everything, and manually check with a logic probe.

Well, the logic analyzer is useful if you really need more than four channels or need a lot of memory. For that quite different kind of debugging I suspect that a PC-based system might be ok. (Unlike PC-based oscilloscopes, which are universally considered to be a pain.) That's easy to try out cheaply; grab one of the cheap <$10 USB interfaces (pictured below) and use it with Sigrok. If you're still on the edge about getting a 'scope, going ahead and doing that might be a good start, since it's nearly free except for your time. That said, I have one of these and have yet to plug it in; I've found that for my limited needs debugging with just four channels has been fine so far.

Quote:
so it either is my soldering, the chip being broken, a problem with the PCB, or the traces.

Or just a problem with the design. One thought occurs to me: are you absoutely certain that you have the D+ and D- lines wired correctly? Reversing those would definitely confuse USB interfaces since the polarity of them is what's used to determine the transfer speed.


Attachments:
cheap-usb-logic-analyzer.jpg
cheap-usb-logic-analyzer.jpg [ 91.43 KiB | Viewed 835 times ]

_________________
Curt J. Sampson - github.com/0cjs
Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2020 7:57 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Darn. Somehow I lost my post. I'll do it again:

Proxy wrote:
i personally don't think i need something faster than 50MHz for the stuff i do.

In the head post, you wrote, "if possible i'd like to run it at 16, 14 or 10 MHz." A 50MHz 'scope is definitely not fast enough to use on 16MHz square waves and see setup and hold times that are a fraction of a half cycle at 16MHz. The SDS1104X-E 100Mhz 'scope you mention is marginally fast enough. I would say don't go any slower than that.

_________________
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 07, 2020 8:26 am 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
cjs wrote:
The DS1054Z is actually software-upgradable to 100 MHz as well (and this can be done for free using key-code generators on the 'net, if you're brave enough; it worked great for me and lots of other people) and so the two scopes are pretty similar in specs. Remember, though, that the MHz figures are talking only about the analogue front-end; you still need a sampling rate fast enough to be useful. (The DZ1054Z drops to 250 megasamples per channel when all four channels are on, which can be pretty dodgy for 100 MHz signals unless you really know what you're doing.) This sort of stuff is explained all over the 'net, though, so there's no need to get into the details here. I don't think there's really such a huge difference between the most popular low-end desktop 'scopes, though they certainly generate thousands of comments on EEVblog.


hmm, ok i'll put the DZ1054Z on my amazon list for now. but i'll still wait a bit before getting it.

cjs wrote:
Well, the logic analyzer is useful if you really need more than four channels or need a lot of memory. For that quite different kind of debugging I suspect that a PC-based system might be ok. (Unlike PC-based oscilloscopes, which are universally considered to be a pain.) That's easy to try out cheaply; grab one of the cheap <$10 USB interfaces (pictured below) and use it with Sigrok. If you're still on the edge about getting a 'scope, going ahead and doing that might be a good start, since it's nearly free except for your time. That said, I have one of these and have yet to plug it in; I've found that for my limited needs debugging with just four channels has been fine so far.


thing is that i would like to look at exactly what the CPU is doing at all times, which would require me to check the data bus, address bus, chip select pins, etc. which is a bit more than 4 channels can handle.
i think i can actually do that right now since the CPU can easily run with a slow clock, so i can use one of my arduinos to generate the clock for it, and capture the data/address bus on every clock cycle... to see what it's trying to do.
which is more useful for debugging actual programs than anything else.
but since i also want to test the function of the computer it would be useful for me. i'll have to look into arduino programming again later.
because timings of the 65c02 still confuse me, and i don't know if it's accessing the ROM correctly because the test program i'm trying to run doesn't work as intended.

cjs wrote:
Or just a problem with the design. One thought occurs to me: are you absoutely certain that you have the D+ and D- lines wired correctly? Reversing those would definitely confuse USB interfaces since the polarity of them is what's used to determine the transfer speed.

Yes i'm very sure.
using the image below (USB B, Device) i confirmed that 1 is Vcc, and 4 is GND exactly as shown.
2 is D- and checking with my multimeter is connected to pin 14 of the FT240X, which is USBDM (USB Data Minus)
3 is D+ and checking with my multimeter is connected to pin 13 of the FT240X, which is USBDP (USB Data Plus)

that looks correct to me.
Attachment:
Unti453tled.png
Unti453tled.png [ 619.62 KiB | Viewed 830 times ]


EDIT: can i just say that WinCUPL hates me for no reason? i'm trying to simulate one of my Decoders... but i get this:
Attachment:
Wincupl_2020-03-07_12-32-50.png
Wincupl_2020-03-07_12-32-50.png [ 11.71 KiB | Viewed 820 times ]

it says there are errors, but also says there were 0 errors... and none were listed either.
what even is this program.


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2020 9:29 pm 
Offline

Joined: Sat Jun 04, 2016 10:22 pm
Posts: 483
Location: Australia
proxy wrote:
pin 17 (which is actually VCORE) and CBUS5/6 are also not needed and therefore just left unconnected

Are you sure you don't need VCORE? That sounds pretty critical to me.

And yeah, WinCUPL is rather infamous for giving wierd errors and generally behaving behaving wierdly. I think it's mostly the GUI that's the problem, probably because it's so old. The command-line utilities it backs onto worked more or less fine in the build script I ended up using.


Last edited by DerTrueForce on Fri Mar 13, 2020 6:20 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2020 10:34 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
DerTrueForce wrote:
Are you sure you don't need VCORE? That sounds pretty critical to me.
I agree it sounds critical. Surprisingly, it may be "left unterminated."
Attachment:
pwr pins.png
pwr pins.png [ 29.62 KiB | Viewed 798 times ]


"Synchronous and asynchronous bit bang interface options." Interesting product! Datasheet attached. But I barely skimmed it.

Among other things, it does mention "storing device descriptors and FIFO I/O configuration." Sounds like there could be potential for a show-stopper there...


Attachments:
FT240X USB fifo.pdf [952.67 KiB]
Downloaded 70 times

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 07, 2020 11:42 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
Dr Jefyll wrote:
DerTrueForce wrote:
Are you sure you don't need VCORE? That sounds pretty critical to me.
I agree it sounds critical. Surprisingly, it may be "left unterminated."
Attachment:
pwr pins.png

Yes as the datasheet says it's a 1.8V output. there is nothing on the chip that requires 1.8V, and if you check the example circuits below it doesn't even show VCORE anywhere.

Dr Jefyll wrote:
"Synchronous and asynchronous bit bang interface options." Interesting product! Datasheet attached. But I barely skimmed it.

Among other things, it does mention "storing device descriptors and FIFO I/O configuration." Sounds like there could be potential for a show-stopper there...

problem is that in order to program the chip you need to use FTDI's software for it... which as you might guess connects via USB. so if the Chip is not connecting it cannot be programmed.
if you look into the datasheet (section 8.1) it mentions the default values that are pre-programmed into it.

DerTrueForce wrote:
And yeah, WinCUPL is rather infamous for giving wierd errors and generally behaving behaving wierdly. I think it's mostly the GUI that's the problem, probably because it's so old. The command-line utilities it backs onto worked more or less fine in the build script I ended up using.

Yea, it's Win95 software... it even has an MS-DOS button.
i wish someone would rewrite it for a modern OS and just fix all the issues with it.
but i guess that'll never happen as these devices are dying out anyways.

EDIT: one thing i also wanted to mention.
another reason i choose this USB chip instead of a standard RS232 Serial connection was because i have this USB-8 bit module which also uses an FTDI chip. i used it with my breadboard Z80 computer and it worked perfectly, looking at the Datasheet (section 8) you can see the schematic it uses. which is basically identical to my design (except it has jumpers to be more configurable, and the actual chip used is different)
and yes i also checked the D+ and D- lines and they are connected identical to my design. (D+ to USBDP and D- to USBDM)

and i'm slowly regretting putting that USB chip on there at all for the first deisgn, i should've just made the computer without any serial communication. then i could've used something external (like the UM245R module) to communicate with it, so that i could just focus on getting the Computer working before attaching some USB hardware to it. but nooooo, i had to skip to the full design and risk running into multiple problems... oh well.

.

I'm still thinking of doing a new design for the Computer, but without the USB chip on it. just the CPU, RAM, ROM, decode logic, clock, and the pin headers to connect something to it. maybe also a connector for the UM245R module. since i know that works it would be functionally identical to my current design except i wouldn't need to worry about the USB part not working.
i could order multiple different designs. so i could try to solder my own USB Module thingy, and if that doesn't work again for some reason i can still use the premade one.
would that be more worth it than trying to fiquire this problem out?


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 08, 2020 3:13 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
ok, so since i'm not really getting anywhere with the USB thing i focused my attention to the actual computer.

I made a program that turns one of my Arduino Megas into a specialized 6502 logic analzyer, so i can look at the Data Bus, Address Bus, and the RWB signal for every half clock cycle.
I also wrote a small text program that just loads a value from ZP, increments it, and stores it back into the same ZP location. that way i can test if the CPU, ROM, and RAM works. (it also stores to 0xDFFF because that was where i had my D-FF as a test IO Device. but i removed it to connect the Arduino
)
here a little explaination of the format of the data:
A: <Address bus>; D: <Data bus>; <Read/Write>; <current Clock state>

I copied the beginning of the data that the analyzer gave and commented it, to make it understandable.
Since Memory is only active while the clock is HIGH i deleted all lines that were printed during the LOW state of the clock (all of which had 0xFF on the Data bus anyways)
Here it is:

Code:
A: 0x6EFD;  D: 0x11; RD;  HIGH
< RST acknowledged >

< CPU does some stuff on the Stack, only reading though >
A: 0x01FC;  D: 0x22; RD;  HIGH
A: 0x01FB;  D: 0xC0; RD;  HIGH
A: 0x01FA;  D: 0x05; RD;  HIGH

< CPU reads the Reset vector which points to 0xE001>
A: 0xFFFC;  D: 0x01; RD;  HIGH
A: 0xFFFD;  D: 0xE0; RD;  HIGH

< This is setup code that clears the A, X, Y Registers and the SP>
A: 0xE001;  D: 0xA9; RD;  HIGH
A: 0xE002;  D: 0x00; RD;  HIGH
A: 0xE003;  D: 0xAA; RD;  HIGH
A: 0xE004;  D: 0x9A; RD;  HIGH
A: 0xE004;  D: 0x9A; RD;  HIGH
A: 0xE005;  D: 0xA8; RD;  HIGH
A: 0xE005;  D: 0xA8; RD;  HIGH

< This next part writes a 0x00 to ZP 0x69 >
A: 0xE006;  D: 0x64; RD;  HIGH
A: 0xE006;  D: 0x64; RD;  HIGH
A: 0xE007;  D: 0x69; RD;  HIGH
A: 0x0069;  D: 0x00; WR;  HIGH

< This is where the main loop begins >
< LDA $69 >
A: 0xE008;  D: 0xA5; RD;  HIGH
A: 0xE009;  D: 0x69; RD;  HIGH
A: 0x0069;  D: 0x00; RD;  HIGH         (here you can see it loads a 0)

< STA $DFFF >
A: 0xE00A;  D: 0x8D; RD;  HIGH
A: 0xE00B;  D: 0xFF; RD;  HIGH
A: 0xE00C;  D: 0xDF; RD;  HIGH
A: 0xDFFF;  D: 0x00; WR;  HIGH

< INC A >
A: 0xE00D;  D: 0x1A; RD;  HIGH

< STA $69 >
A: 0xE00E;  D: 0x85; RD;  HIGH
A: 0xE00E;  D: 0x85; RD;  HIGH
A: 0xE00F;  D: 0x69; RD;  HIGH
A: 0x0069;  D: 0x01; WR;  HIGH         (here you can see it stores a 1, so the INC worked)

< BRA #$F6 >
A: 0xE010;  D: 0x80; RD;  HIGH
A: 0xE011;  D: 0xF6; RD;  HIGH

< This is the HALT instruction at the very end, why is the CPU reading it when it just did a Jump? >
A: 0xE012;  D: 0xDB; RD;  HIGH

< Here is where it loops back >
< LDA $69 >
A: 0xE008;  D: 0xA5; RD;  HIGH
A: 0xE009;  D: 0x69; RD;  HIGH
A: 0x0069;  D: 0x01; RD;  HIGH         (here you can see it loads a 1, this confirms that the SRAM is working)

< STA $DFFF >
A: 0xE00A;  D: 0x8D; RD;  HIGH
A: 0xE00B;  D: 0xFF; RD;  HIGH
A: 0xE00C;  D: 0xDF; RD;  HIGH
A: 0xDFFF;  D: 0x01; WR;  HIGH

< INC A >
A: 0xE00D;  D: 0x1A; RD;  HIGH

< STA $69 >
A: 0xE00E;  D: 0x85; RD;  HIGH
A: 0xE00E;  D: 0x85; RD;  HIGH
A: 0xE00F;  D: 0x69; RD;  HIGH
A: 0x0069;  D: 0x02; WR;  HIGH         (here you can see it stores a 2)

< BRA #$F6 >
A: 0xE010;  D: 0x80; RD;  HIGH
A: 0xE011;  D: 0xF6; RD;  HIGH
A: 0xE012;  D: 0xDB; RD;  HIGH

< and so on >


This atleast confirms that the Computer itself seems completely functional, just the USB interface is busted.

This test program also made me notice that i accentically switched the INC A and DEC A OPcodes. because i was really confused why it was decrementing at first until i looked up the OPcode and realized it was wrong in my Assembler.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 08, 2020 4:59 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Proxy wrote:
another reason i choose this USB chip instead of a standard RS232 Serial connection was because i have this USB-8 bit module which also uses an FTDI chip...

Garth and I have pointed out at various times in the past that the "universal serial bus" is anything but universal. Also, USB is technically inferior in a number of ways to TIA-232, and its cousins, TIA-422 and TIA-485. By the way, just how "universal" is a standard having nine different connectors? TIA-232 has one officially-specified connector (DB-25), although DE-9 (incorrectly referred to as DB-9) and 8P8C (incorrectly referred to as RJ45) are widely used. All three connector types are "hobby-friendly," which definitely can't be said about the connectors used by USB.

Unlike TIA-232 and its cousins, USB legally is a closed standard. The FTDI device has to be licensed with the USB Implementers Forum (USB-IF), who finance their activities by charging device manufacturers a royalty (note that Microsoft is part of that group, which should tell you something). Device manufacturers pass that royalty through to the end user.

USB was developed to support a specific connectivity niche, which is consumer products. Also, USB was intentionally made a closed standard, which meant the group owning the standard could control its use and charge money for implementing it. USB was never intended for use in ad hoc connectivity situations of the type I routinely encountered back in the days when I worked in clients' factories hooking up disparate hardware to disparate hardware. For that, TIA-232 or TIA-422/485 was the preferred choice.

Then there are cable length limitations to be considered. Almost any TIA-232 hardware made since the 1990s can reliably operate at 115.2 Kbps over at least 50 meters using cheap CAT5 UTP cable and 8P8C connectors (incorrectly referred to as RJ45). Experimenting with POC V1.1, which has two serial ports, I discovered it was possible to run the interface at 900 Kbps over a three meter long cable without error, which is no small feat for an interface that is unbalanced to ground. Contrast that with USB, for which five meters of cable is the outer limit, with USB 3.0 limited to three meters.

Given both the technical and legal issues surrounding USB, I would never consider it in any project I would build, hobby or commercial. TIA-232 is much simpler, royalty-free and unlike USB, really is universal. Virtually any desktop computer made can be equipped with at least one TIA-232 port using a cheap plug-in card. Laptops can be attached to TIA-232 hardware using inexpensive USB-to-serial adapters (although these vary widely in performance and quality—caveat emptor). Many intelligent shop machines, e.g., CNC machining centers, are equipped with TIA-232 ports—USB is technically impractical in such situations due to cable length limitations and noise susceptibility. Shops with intelligent machine tools frequently use TIA-232, TIA-422 or TIA-485 to link up the machines with one or more computers—I have a client that has a TIA-485 multi-drop hookup, which is usually referred to as an industrial shop network.

When you do your next design, I recommend you include at least one serial port—two ports is easy with modern hardware. Programming is easy as well. Unlike USB, there is no special "protocol" with TIA-232 and no opaque standard to get in the way. Once serial data format and rate has been set, you read and write like anything else in your system. Give it a try. :D

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


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 08, 2020 6:01 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
BigDumbDinosaur wrote:
Unlike TIA-232 and its cousins, USB legally is a closed standard. The FTDI device has to be licensed with the USB Implementers Forum (USB-IF), who finance their activities by charging device manufacturers a royalty (note that Microsoft is part of that group, which should tell you something). Device manufacturers pass that royalty through to the end user.

I mean it's not that much to be honest. a single one of the FT240X's cost 1.94 EUR, plus the added benifit of requiring no other external circuity to get it to work.
unlike a UART which in most cases needs a specific clock input and a converter to/from RS232 voltages. (which overall will cost you more)

BigDumbDinosaur wrote:
Then there are cable length limitations to be considered. Almost any TIA-232 hardware made since the 1990s can reliably operate at 115.2 Kbps over at least 50 meters using cheap CAT5 UTP cable and 8P8C connectors (incorrectly referred to as RJ45). Experimenting with POC V1.1, which has two serial ports, I discovered it was possible to run the interface at 900 Kbps over a three meter long cable without error, which is no small feat for an interface that is unbalanced to ground. Contrast that with USB, for which five meters of cable is the outer limit, with USB 3.0 limited to three meters.

This is why (i think) even modern industrial devices have Serial ports on them (in addition to USB), though that slowly gets replaced by Ethernet.
either way this doesn't sound like a relevant problem for hobbyist projects though. i mean when was the last time you wanted to send some data to a DIY computer 50m away?

BigDumbDinosaur wrote:
Given both the technical and legal issues surrounding USB, I would never consider it in any project I would build, hobby or commercial.

well unless you're gonna sell your projects the legal stuff is basically completely irrelevant. FTDI already programmed the chip with all the needed legal identification and stuff.
and on the technical side (ciruitry) it is the same or even simplier than RS-232 based hardware.

BigDumbDinosaur wrote:
When you do your next design, I recommend you include at least one serial port—two ports is easy with modern hardware. Programming is easy as well. Unlike USB, there is no special "protocol" with TIA-232 and no opaque standard to get in the way. Once serial data format and rate has been set, you read and write like anything else in your system. Give it a try.

how is it simplier? you just literally read/write 8 bit values from/to a chip in both cases... i'd even say USB is simplier since you don't need any initialization code to set the baud rate or anything (it automatically adjusts to whatever the PC's device manager has set it to).
plus the fact that i only need a single USB cable (Power and Data) instead of 2 (one for Power and one DE-9 to USB Adapter to communicate with it)

overall USB still sounds much better, mostly thanks to FTDI.
if i would need to do all the USB protocol stuff myself, buy a license, etc, then i would quickly switch to RS-232.
but i don't need to, the chip does all of that, so i don't see why i should switch (other than in this case where i got no communication at all at the time).


anyways, back to the topic.

i'm still kinda set on the idea of redoing part of the board to remove the USB chip, and have a connector that my UM245R Module can plug into instead.
then also design a PCB that has the same exact pinout of the UM245R but with my own design and different USB Chip.
that way i can test the computer with the module i know already works, and compare it to the one i made myself.
plus if it works i basically got 2 of those modules for testing, which would be great as one of these costs like 20 bucks.

but before i do any of that i'll ask around a bit more on other sites. to get a bit more information and all that.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 298 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12 ... 20  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 14 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: