Jump to content

Photo

TI 99/4A interfacing


150 replies to this topic

#26 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Wed Apr 29, 2015 8:20 PM

Here's a schematic of the TI-Rpi interface. It really is a universal interface for connecting the parallel port to the Rpi, as all the control and data lines are accessible and easily managed. It could be used for a variety of things like robotics, remote sensing etc... Before I go ahead and create a PCB layout, if you guys could give it a cursory look for any obvious errors or design suggestions I would greatly appreciate it. Note: the schematic shows 74LS125 chips when in actuality I am using 74HCT125 ones.

 

TI Rpi Interface

 



#27 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Thu May 14, 2015 2:50 PM

I finished creating a PCB layout for the circuit above and am just waiting for some supplies before creating the PCB itself using the photoetching process.
 
In the mean time, I dug out my COSMAC ELF replica (the Membership Card by Lee Hart) last night and decided to interface it to my TI. The ELF is programmed using toggle switches to input one byte at a time, a painfully slow and error prone process, not to mention the finger callouses after a few dozen bytes! The MC replica brings out some of the RCA 1802 processor lines to a DB25 connector, and so I used this facility to hook up my TI's PIO port to the MC and transfer a program from the TI directly into the MC's memory, thus bypassing the toggle switches altogether. I wrote a small assembly program on the TI to do this, and the ELF program is hard coded into it. This is just a proof of concept and eventually I will expand the transfer program to import a text file with 1802 assembly mnemonics and convert it to HEX then transfer it to the MC.
A little diversion, but a very useful one nonetheless :)

 



#28 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Fri May 22, 2015 11:43 PM

I finished the etching of the TI-Rpi interface. I had never done a double sided PCB before, and it was fussy work for sure to get everything aligned, but it worked. The photosensitive coating got scratched accidentally after exposure, which led to some broken traces on the bottom side which I patched. This won't win me any awards in aesthetics, but hey as long as it does the job :)

 

TI-Rpi interface component side
TI-Rpi interface artwork side

 

Next I have to drill it and solder in the components. Let's just hope all this work will solve my spurious signals issue!



#29 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,140 posts
  • Location:Cookeville, TN

Posted Sat May 23, 2015 3:55 AM

Holy cow, that thing is beautiful! That must have taken alot of time and patience... Respect...

#30 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Sat May 23, 2015 7:14 AM

Thanks :) Yes it is kind of masochistic to try to do this from scratch when so many professional and inexpensive outfits are available to do this for you, but I find that there is value in being able to create your own PCB's plus it adds character and true ownership to any project.



#31 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Tue May 26, 2015 8:08 PM

I have a question for the electronics gurus among you :)

I have a circuit that pulls a pin low on an IC with a certain trigger. Is there a way to trigger one of the joystick port pins (say Right) using that signal without having to use a relay to close the the contact between the joystick select pin and the joystick right pin?



#32 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,547 posts
  • Location:BUR

Posted Wed May 27, 2015 2:09 AM

Not really.... (you could use a transistor instead of a relay, but I don't think you were asking about the mechanical side ;) ) the problem is that the joystick lines are multiplexed with the keyboard, if you hold one of them low it will interfere with keyboard reads. You could do it if your software never needs the keyboard (or the other joystick), but that would probably be excessively awkward, since you'd need to release the line to load the software.



#33 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Wed May 27, 2015 2:24 PM

I was afraid of that... Regarding using transistors though, I'm not clear how you would wire them up. The IC pin will go to the base (PNP transistor) and activate it when low. But then how would you connect the Emitter and Collector to the joystick pins? With a relay, the external circuit will trigger it and it will simply close the connection between the joystick select and directional pins.



#34 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,547 posts
  • Location:BUR

Posted Thu May 28, 2015 2:33 AM

Relay is a lot simpler, yes... I don't get transistors well enough to say off the top of my head. I would have to go review, and it's probably better if someone who uses them more speaks up. :)

 

The joystick select line is either LOW or floating, and the input needs to be low or floating... if that helps someone with the layout.


Edited by Tursi, Thu May 28, 2015 2:34 AM.


#35 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Thu May 28, 2015 4:19 PM

I figured it out and it's actually pretty simple :). Here's the schematic:

 

Transistor Joystick Control
 
Pressing the switch will activate the PNP transistor and connect the joystick select pin 9 to the move right pin 7. In real life, the switch will be replaced by the IC output. This example is equivalent to moving the joystick to the right.
 
I do plan on powering up the joystick port directly from the TI per Thierry Nouspikel's instructions, thus avoiding the use of an external power supply.


#36 Stuart OFFLINE  

Stuart

    Dragonstomper

  • 634 posts
  • Location:Southampton, UK

Posted Thu May 28, 2015 5:14 PM

Have doubts that the schematic will work as shown. Particularly as the transistor appears to be connected across the power supply!

 

So what is it you're trying to do again? When the joystick is scanned (pin 7 goes low), you want to feed the output of your IC to the joystick right line (pin 9)? Instead of using a transistor which needs bias and current limiting resistors, how about using a 74LS125 (Google for the datasheet). Connect joystick pin 7 to the C input, your IC to the A input, and the Y output to the joystick pin 9. The Y output is floating when the C input is high, so it shouldn't affect keyboard scanning. I think.  ;-)



#37 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,547 posts
  • Location:BUR

Posted Thu May 28, 2015 5:34 PM

You also have pin 7 (joystick 1 select) tied to ground directly and pin 9 (right) tied to +5v -- that configuration will likely damage the 9901.

 

The buffer seems like overkill, on the other hand, it probably is a lot simpler. I agree that it should work as Stuart describes (just make sure your IC output is always high or low, no floating, and tie the other C inputs on the chip high so they don't interfere.

 

And as a side benefit you can set up 3 more inputs if you want, just as easily. :)


Edited by Tursi, Thu May 28, 2015 5:34 PM.


#38 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Thu May 28, 2015 6:15 PM

Have doubts that the schematic will work as shown. Particularly as the transistor appears to be connected across the power supply!

 

So what is it you're trying to do again? When the joystick is scanned (pin 7 goes low), you want to feed the output of your IC to the joystick right line (pin 9)? Instead of using a transistor which needs bias and current limiting resistors, how about using a 74LS125 (Google for the datasheet). Connect joystick pin 7 to the C input, your IC to the A input, and the Y output to the joystick pin 9. The Y output is floating when the C input is high, so it shouldn't affect keyboard scanning. I think.  ;-)

 

I had tested it prior to posting the schematic and it worked perfectly, but will likely need a current limiting resistor for the transistor before the emitter for anything longer than brief pulses. No need for bias as I am operating the transistor as a switch, not as an amplifier.

Using a 74LS125 is brilliant! With its quad configuration, it will cover all the directional pin with just one chip instead of using 4 transistors and 4 resistors. I'm going to test it out as soon as I get my hands on one (I may actually have one somewhere in my parts box).



#39 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Thu May 28, 2015 8:28 PM

You also have pin 7 (joystick 1 select) tied to ground directly and pin 9 (right) tied to +5v -- that configuration will likely damage the 9901.

 

 

 

Hmmm... Looking at the joystick port circuitry schematic from Nouspikel's site, I don't think this arrangement will likely cause any damage. Could someone more knowledgeable than me please verify this? The last thing I want is damage my console... 



#40 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,547 posts
  • Location:BUR

Posted Thu May 28, 2015 9:21 PM

You're running 5v directly into the Joystick right line and it's working?? Like Stuart, I think there's something weird about the right side of that schematic. :) Waiting for a third opinion then!

 

It's true I didn't look at the schematic, i'm not sure what's between the joystick port and the 9901 - i was thinking about interfacing directly to the 9901. :)



#41 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,822 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu May 28, 2015 9:37 PM

You should have a resistor between the VCC input and the transistor collector.  You run the risk of shorting out the power supply, frying the transistor, or both in its current form.  In this design, it will be called a "pull-up" resistor.



#42 --- Ω --- OFFLINE  

--- Ω ---

    --- Ω ---

  • 9,785 posts
  • Location:Virgo Supercluster, Gould Belt in the Orion arm of Milky Way galaxy.

Posted Thu May 28, 2015 9:45 PM

I've got just enough half-forgotten knowledge to be dangerous, but I seem to recall from quite a few years back that I once used a ' decoupling capacitor'  to prevent unwanted stray current from damaging a piece of equipment.  Since DC cannot go through a CAP, could this principle apply here? 



#43 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,822 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu May 28, 2015 10:05 PM

I've got just enough half-forgotten knowledge to be dangerous, but I seem to recall from quite a few years back that I once used a ' decoupling capacitor'  to prevent unwanted stray current from damaging a piece of equipment.  Since DC cannot go through a CAP, could this principle apply here? 

 

In an AC circuit, like audio output, yes, but not here since he is working with TTL voltages which is DC.  Put a cap in that circuit and it will not work.  Put it in parallel somewhere and it will create a delay in both set and unset, which may be desirable.



#44 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Fri May 29, 2015 4:39 AM

You should have a resistor between the VCC input and the transistor collector.  You run the risk of shorting out the power supply, frying the transistor, or both in its current form.  In this design, it will be called a "pull-up" resistor.

 

That's what happens when amateurs try to play with electronics  :D I'm amazed I haven't blown up the house yet! A resistor is definitely needed. What would be a good value for it here assuming I'll be powering the circuit from the TI power supply (I don't know what the current rating of that supply is to plug it into Ohm's law...)? I'm thinking at most a 100 ohm resistor. 

I should really stick to medicine, but this is too much fun :)



#45 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Fri May 29, 2015 4:46 AM

You're running 5v directly into the Joystick right line and it's working?? Like Stuart, I think there's something weird about the right side of that schematic. :) Waiting for a third opinion then!

 

 

It is! (never mind that I neglected to have a current limiting resistor is my experiment and by some miracle did not fry the power supply, the transistor or the TI...) My thought was when the transistor is switched on, it will pull pin 9 to ground which is what I want. Having +5V at pin 9 otherwise does nothing that I can detect...

Like Kevan, I know just enough to be dangerous, but sometimes I get lucky  :P



#46 OLD CS1 OFFLINE  

OLD CS1

    River Patroller

  • 3,822 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Fri May 29, 2015 7:35 AM

 

That's what happens when amateurs try to play with electronics  :D I'm amazed I haven't blown up the house yet! A resistor is definitely needed. What would be a good value for it here assuming I'll be powering the circuit from the TI power supply (I don't know what the current rating of that supply is to plug it into Ohm's law...)? I'm thinking at most a 100 ohm resistor. 

I should really stick to medicine, but this is too much fun :)

 

Why not?  I used to "play doctor" around my house.



#47 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Fri May 29, 2015 10:39 AM

OK too much information  :D



#48 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Tue Jun 2, 2015 3:25 PM

I had a chance to test Stuart's suggestion of using an 74LS125 quad buffer and it also worked very nicely indeed. I hooked up the control chip pin to the Output Enable pin, the joystick select pin to the A input, and the desired directional pin to the output. When the control pin goes low, given that the joystick select pin is low as well, then the directional pin becomes low. If the control pin in high, then the buffer is placed in high impedance mode, thus isolating the joystick port from outside interference.

And being a quad chip, I get to connect all the directional lines at once instead of having to use 4 transistors and 4 resistors.

Thanks for that great idea!



#49 Stuart OFFLINE  

Stuart

    Dragonstomper

  • 634 posts
  • Location:Southampton, UK

Posted Tue Jun 2, 2015 5:25 PM

That's my quota of great ideas for this year used up.  ;-)


Edited by Stuart, Tue Jun 2, 2015 5:26 PM.


#50 Vorticon OFFLINE  

Vorticon

    River Patroller

  • Topic Starter
  • 2,566 posts
  • Location:Eagan, MN, USA

Posted Fri Jun 5, 2015 11:46 AM

Here's the completed interface. It was very labor intensive as I had to connect all the vias with thin hookup wire. I also did not account for the fact that connections on the component side were going to be problematic since the soldering was happening on the other side, which made for messy solutions (more hookup wire). Live and learn I guess. It's not very pretty for a prototype for sure  :grin:

But will it work? I'll find out later tonight...

 

TI Rpi interface





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users