6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 1:31 am

All times are UTC




Post new topic Reply to topic  [ 163 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 11  Next
Author Message
PostPosted: Tue Oct 12, 2021 1:01 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
GARTHWILSON wrote:
When you start pushing the speed limits, by all means, go with BDD's method.


Thank you Garth, and thank you BDD!

Edit: I just switched it to the BDD method, used an extra NAND gate that I had laying around anyways!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 1:11 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
sburrow wrote:
BigDumbDinosaur, thank you for all of that information. Instead of quoting quotes of quotes, I'll summarize here.

Ok, got the idea with NMIB now, that makes a lot of sense. Thank you for reminding me of what I read before, with all of this so quickly I sometimes forget things too. Thank you for your patience with me.

As per Phi2 and 62256, I agree with your reasoning, that actually makes a lot of sense tying it into ~WE instead of ~CS. STILL, just to verify, my base model was Garth's "potpourri" model:

https://www.wilsonminesco.com/6502primer/potpourri.html

I am sure that I am seeing Garth put Phi2 on ~CS, not ~WE here. He did a big article about why he does this, and I was just following in step with mine. Again, your call to tie it to ~WE makes perfect sense, too! So, which should I go with? What is the difference?

Interactive console sounds super nice. Is this something that you would suggest?

https://www.electrodragon.com/product/r ... max232-ic/


For simplicity, you might want to pick up one of these:

Attachment:
DS_LC234X.pdf [570.48 KiB]
Downloaded 65 times


You simply wire it up to a UART as a 5-wire interface and plug it into a USB port on any computer. It configures as a com port on Windows, OSX or Linux and just works.

And yes, if you can, start with a UART and get a simple working system first, get a decent monitor setup and then start adding I/O devices.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 1:37 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
floobydust wrote:

You simply wire it up to a UART as a 5-wire interface and plug it into a USB port on any computer. It configures as a com port on Windows, OSX or Linux and just works.

And yes, if you can, start with a UART and get a simple working system first, get a decent monitor setup and then start adding I/O devices.


Wow, that's awesome, it's seriously an all-in-one package deal. Very nice, thank you for that link.

And yes, start with one thing, then to the next and the next. Good plan. Thank you again.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 1:51 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
I've used that one for a portable interface when prototyping... very convenient. On my last Pocket SBC I used their DB9-USB interface:

Attachment:
DS_DB9-USB-15654.pdf [605.73 KiB]
Downloaded 42 times


These mount as a standard DB9 connector (male or female versions) and have interface voltage levels of 3.3V, 5.0V or 12V (RS-232). I'm using the 5V and 3.3V Male versions on my current setups. They cost more (sadly) but they are excellent interfaces.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 3:45 am 
Offline
User avatar

Joined: Wed Feb 13, 2013 1:38 pm
Posts: 586
Location: Michigan, USA
I've been lookin' at the 74HC682 as part of a 2-chip jumper configurable decoder + glue logic solution (including four I/O device select outputs)... Compared to the 74HC688 it has an additional active low P>Q output that I use to drive both the active low FLASH ROM /CE input and the active high SRAM CS2 input. While RAM or ROM is selected every clock cycle, half of a 74HC139 decoder is used to route PHI2 qualified /MRD and /MWR signals to memory only during clock cycles with an address above or below the I/O page address. The other half of the 74HC139 is used to provide four I/O strobes spanning the I/O page for peripheral ICs.

Good luck on your project.

Cheerful regards, Mike, K8LH


Attachments:
temp2.png
temp2.png [ 171.2 KiB | Viewed 4879 times ]


Last edited by Michael on Mon Oct 25, 2021 2:00 pm, edited 6 times in total.
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 7:01 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
floobydust wrote:
Serial port... yup, no modern PC uses them anymore

I think I'll get one of these:
https://adek.com/product/MB-800V
Image

They're making brand-new motherboards with RS-232 ports, a parallel printer port, onboard VGA, 3 ISA slots, 3 PCI slots, Ethernet, two IDE controllers, a floppy-disc drive controller, plus USB and all the modern stuff. I want the ISA slots for my EPROM programmer, and for a Trident 8900 video board for hi-res in DOS if the onboard video chip set isn't Trident-8900-compatible. My DOS machine's motherboard went down, and I replaced the computer with another old one I had here but I don't have all the functionality back. If I get this new one, it should be good for as many years as I continue dong this stuff.

_________________
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: Tue Oct 12, 2021 7:39 am 
Offline

Joined: Thu Mar 12, 2020 10:04 pm
Posts: 690
Location: North Tejas
GARTHWILSON wrote:
I think I'll get one of these:
https://adek.com/product/MB-800V


Too bad they picked the Pentium 4 which is considered by many to be the dog of the family.

If you do get it, I may ask that you to perform a test to determine whether the floppy controller can handle single density formats.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 8:08 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
I have DD and HD floppy discs here, in both 3.5" and 5.25", and many drives. Hmmm... maybe I do have some SD 5.25" discs in the garage. I just have not had a working FDD controller in a while. I'm not crazy about the Intel processor thing, but performance will be ridiculously fast when running DOS applications that were written back in the days of 16MHz 286's or earlier.

_________________
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: Tue Oct 12, 2021 10:04 am 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
floobydust,

So correct me if I'm wrong, but this is how I see those components being used (I use Linux, not sure if you are familiar with that side of things):

1) I plug a USB port from my computer into the DS_LC234X. Linux automatically sees "/dev/ttyUSB0" is a serial port. (I believe all the FTDI drivers are built in now, if not download/install.)

2) I plug/solder the DS_LC234X into a 6551 ACIA or something similar, which would then go to the 6502.

3) Use Linux terminal and/or additional software to send/receive serial data through "/dev/ttyUSB0".

Am I understanding this correctly?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 10:37 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1399
Location: Scotland
sburrow wrote:
floobydust,

So correct me if I'm wrong, but this is how I see those components being used (I use Linux, not sure if you are familiar with that side of things):

1) I plug a USB port from my computer into the DS_LC234X. Linux automatically sees "/dev/ttyUSB0" is a serial port. (I believe all the FTDI drivers are built in now, if not download/install.)

2) I plug/solder the DS_LC234X into a 6551 ACIA or something similar, which would then go to the 6502.

3) Use Linux terminal and/or additional software to send/receive serial data through "/dev/ttyUSB0".

Am I understanding this correctly?


Essentially, yes.

Any cheap USB serial device will work. Just ebay/amazon for one. the serarch term is usualy USB TTL SERIAL.

I use generic ones which are under £10 when I don't care. Some have it all built into the USB plug too with just flying leads for Tx, Rx, 5v and Gnd.
e.g.

https://www.amazon.co.uk/FT232RL-Adapte ... B083LLPY9G

Linux (which I use) supports them all and has done for many years now - some appear as /dev/ttyUSBx and some as /dev/ttyACMx. Technically there is a difference but they all work the same from a serial port point of view. Then minicom, Putty, etc. on the Linux side as your terminal.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 3:25 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
drogon wrote:
Essentially, yes.


Thank you Gordon, that is good to hear.

I'll be making changes and posting a newer schematic sometime soon, when I get time. Might just be including a 6551 now as well. And of course, I'll be considering the feature creep.

Thank you all!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 3:49 pm 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
sburrow wrote:
drogon wrote:
Essentially, yes.


Thank you Gordon, that is good to hear.

I'll be making changes and posting a newer schematic sometime soon, when I get time. Might just be including a 6551 now as well. And of course, I'll be considering the feature creep.

Thank you all!


Having found the Xmit bug in the recently released W65C51 ACIA, I wouldn't recommend using one. You can likely find some older Rockwell R65C51 parts if you shop around, if you're really set on using one. I'd suggest one of the newer NXP parts, like the SC28L92 or if you prefer a DIP component, look for the older SCC2691. These are fairly easy to get working, plus there's code around that takes full advantage of them already. No need to reinvent the wheel ;-)

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 12, 2021 4:18 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
floobydust wrote:
if you prefer a DIP component, look for the older SCC2691


https://www.nxp.com/docs/en/data-sheet/SCC2691.pdf

That is a beautiful IC, wow so cool. I'll be reading more about this one specifically.

Thank you!


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 13, 2021 12:02 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 703
Location: Texas
This is an excerpt from Garth's RS-232 Primer page:

"We should mention that although UARTs are mentioned throughout this introduction, it is possible (as you probably already figured out) to do the UART job in software, doing what we call "bit-banging" with individual parallel port bits of I/O ICs like the 6522. "Bit-banging" is where the software handles the shifting, timing, error-checking, etc., instead of letting a UART do it in its hardware shift registers, timers, counters, and other circuits. I believe the Commodore 64 did it with a 6526 (which is a general parallel-I/O IC). This should only be considered a last resort however. (There is a forum topic here on bit-banging 57,600bps on a 1MHz 6502.) Using a real UART is much easier from the programming perspective, usually allows higher speeds, and allows the processor to work on other things between byte transmissions or receptions. Don't confuse asynchronous serial (like RS-232) and synchronous serial (like SPI, Microwire, and I²C). Synchronous serial interfaces with their separate clock line usually do not have the tight timing requirements that RS-232 does, so they're much easier to bit-bang if you have to, and to do so at comparatively high speeds. "

http://wilsonminesco.com/RS-232/RS-232primer.html

I've been thinking it over and over and last night while lying in bed I had an idea to 'bit-bang' UART with a 6522. Why COULDN'T it be done? After researching this morning, I find that Garth mentioned it, and some other places on the net have as well.

In an effort to reduce chip count, board size, cost, and overall complexity, is it possible to use UART on a 6522? Yes, with a low baud rate. And yes, I will probably need some 1-2 MHz oscillator can that would effectively divide for said low baud rate. I was going to run a 1 MHz clock anyways. This is just for talking back and forth with my Linux box, nothing fancy here, no high speeds needed. This is still assuming I'd be using floobydust's suggestion to use something like this:

https://protosupplies.com/product/ft232 ... e-adapter/

Thoughts? I know y'all are professionals, but I gotta start small. I'm already going to be including the 6522 so why not multi-purpose the thing?

Thank you all.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 13, 2021 12:29 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3349
Location: Ontario, Canada
Quote:
I had an idea to 'bit-bang' UART with a 6522. Why COULDN'T it be done?
Having done this, I can tell you it's not impossible but it is a bit tricky (certainly a lot more so than bitbanging SPI).

Also, to receive and transmit properly, the bitbang code will probably need the CPU's full attention (unless you undertake the additional challenge of making it run in the background, driven by periodic interrupts). That means the CPU will be unable to do anything else during the time it's transmitting a character, or listening to see if there's a character to receive.

If that tradeoff seems acceptable then maybe the bitbang approach is a good choice for you.

-- Jeff

_________________
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  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 163 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 11  Next

All times are UTC


Who is online

Users browsing this forum: robbbates and 6 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: