R6551 & Arduino
R6551 & Arduino
Hello all! I've just started working on adding an R6551 to my 65c02 computer. I have read over some of Garth's RS-232 primer guide and just had a quick question - is it possible to use an Arduino as a RS-232 transmitter to an R6551 receiver without a line driver/receiver, like the MAX232? Thanks!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: R6551 & Arduino
Well, I guess my first question is:
What do you plan on using the 6551 for? Is it as a console or just an I/O device to communicate with another machine? Second question: what is your preferred method of connecting the 6551 to another device (or machine)?
Last I checked, I don't think an Arduino has a +/- 12-volt supply or I/O pins that would be able to provide the RS-232 voltage levels, as you mentioned using it in place of a MAX-232 level converter.
If you want to attach it as a serial device to a typical computer, there are numerous USB to Serial interfaces available from FTDI and other vendors. As most newer machines do not have serial ports (aka RS-232 ports), these interface devices will give you a serial port via a USB port. This can allow direct TTL level attachment between the 6551 and the USB to serial interface.
Not sure if this helps, but perhaps you can be more specific in what you're trying to accomplish.
What do you plan on using the 6551 for? Is it as a console or just an I/O device to communicate with another machine? Second question: what is your preferred method of connecting the 6551 to another device (or machine)?
Last I checked, I don't think an Arduino has a +/- 12-volt supply or I/O pins that would be able to provide the RS-232 voltage levels, as you mentioned using it in place of a MAX-232 level converter.
If you want to attach it as a serial device to a typical computer, there are numerous USB to Serial interfaces available from FTDI and other vendors. As most newer machines do not have serial ports (aka RS-232 ports), these interface devices will give you a serial port via a USB port. This can allow direct TTL level attachment between the 6551 and the USB to serial interface.
Not sure if this helps, but perhaps you can be more specific in what you're trying to accomplish.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: R6551 & Arduino
To start with, I just wanted to get it working - that is, load data into RAM from an Arduino. I was thinking since the 6551 chip is TTL, the Arduino could send bits to the RxD pin directly. I don't really understand how the 6551 chip works, to be honest. Reading over the 6551 datasheets doesn't seem to click with me, for some reason.
It sounds like using the USB to Serial might be a similar situation, then? Using TTL level voltage to send bits?
Thanks for the assistance!
It sounds like using the USB to Serial might be a similar situation, then? Using TTL level voltage to send bits?
Thanks for the assistance!
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: R6551 & Arduino
Okay, I agree that you're not quite aware of how the 6551 works... no problem. In short, the 6551 is a serial controller, meaning it allows serial communication at various baud rates with the usual RS-232 signals. Before it will operate, it needs to be configured for things like baud rate, number of data bits, parity, stop bits, etc. Unless you configure it first, it doesn't do anything.
As you're looking to use an Arduino to load some level of initial code into RAM (others have done this), you would need to halt the processor and tristate the address and data lines (from the processor), which would allow the Arduino to control the address lines and push data into memory. Once that's done, you un-tristate the address and data lines and then let the processor come out of Reset.
Note that the 65C02 datasheet is your friend... control lines like Reset, RDY, BE are specific ones to read up on. As for the Arduino, I'm guessing you're already familiar with that, so you can likely put something together to interface to the 6502 system.
Do some searching on the forum.... you'll find that others are loading RAM from other machines... Gordon (Drogon on the forum) comes to mind with his Ruby systems.
As you're looking to use an Arduino to load some level of initial code into RAM (others have done this), you would need to halt the processor and tristate the address and data lines (from the processor), which would allow the Arduino to control the address lines and push data into memory. Once that's done, you un-tristate the address and data lines and then let the processor come out of Reset.
Note that the 65C02 datasheet is your friend... control lines like Reset, RDY, BE are specific ones to read up on. As for the Arduino, I'm guessing you're already familiar with that, so you can likely put something together to interface to the 6502 system.
Do some searching on the forum.... you'll find that others are loading RAM from other machines... Gordon (Drogon on the forum) comes to mind with his Ruby systems.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: R6551 & Arduino
Sorry! I know I'm not being very clear on what I am asking for; that's my fault. I did read over the 6551 datasheet and added some code to initialize it, setting up the command and control registers for parity, baud rate, echo, and all that. I made sure to read back the registers to make sure my hardware address decoding works and it does. I have previously used an Arduino connected to a 65c22 to bit-bang data into RAM after pressing a physical button and that works (more or less). It loads all the data into RAM and then jumps to the data's entry point.
I want to now add the RS-232 style of adding bytes into RAM, similarly by pushing a button (for now and for testing). I know the RS-232 standard uses ~12 volts and uses a line driver/receiver to drop it down to 5 volts. I think that is correct? Maybe my understanding is flawed?
I want to now add the RS-232 style of adding bytes into RAM, similarly by pushing a button (for now and for testing). I know the RS-232 standard uses ~12 volts and uses a line driver/receiver to drop it down to 5 volts. I think that is correct? Maybe my understanding is flawed?
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: R6551 & Arduino
So you have some ROM (EPROM/EEPROM) in the system already? How about posting a schematic and what it is you're doing code-wize.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: R6551 & Arduino
ty9000, I have not gotten into Arduino, but I suspect it does not have the RS-232 line drivers and receivers, but instead just uses TTL signal levels, making it less bulletproof but perhaps more convenient. This has become quite common in recent years, particularly as most PCs don't have RS-232 ports anymore. The '51 itself just operates with the TTL levels too. It doesn't know or care if you're using line drivers or receivers. If that's what the Arduino also does, you should be able to hook them up straight across. The FTDI converters which floobydust mentions come in different versions, with and without line drivers and receivers. Just make sure you get the right one.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: R6551 & Arduino
GARTHWILSON wrote:
ty9000, I have not gotten into Arduino, but I suspect it does not have the RS-232 line drivers and receivers...
GARTHWILSON wrote:
If that's what the Arduino also does, you should be able to hook them up straight across. The FTDI converters which floobydust mentions come in different versions, with and without line drivers and receivers. Just make sure you get the right one.