Jump to content



1

Using unused outputs on 74138?


7 replies to this topic

#1 KubaCZ OFFLINE  

KubaCZ

    Chopper Commander

  • 106 posts
  • Location:Prague/CZE

Posted Sun Jan 22, 2012 7:50 AM

I've been looking on 800XL schematics and I've noticed that D1,D4,D6,D7 outputs of 74138 are unused. Can they be used to connect for example led diode and control it using pokes? That 74138 uses inputs A8-10, so to get D7 output high I need to poke to 1024(A10)? Or is it done different way? I always wanted to connect some of my hardware(led diode is just example) and control it using basic.

Edited by KubaCZ, Sun Jan 22, 2012 7:57 AM.


#2 Rybags OFFLINE  

Rybags

    Quadrunner

  • 10,314 posts
  • Location:Australia

Posted Sun Jan 22, 2012 8:58 AM

It works differently to that.

The outputs are enabled by the MMU - if any system address from $D000 - $D7FF is selected then the A8-A10 feed activate the relevant output.

D1 goes to PBI devices - on the XLs the devices actually have to decode and recognise that selection by the address bus, XE it's output goes to the ECI.

D4 is Antic - Antic has the full address bus and doesn't need a CS, so that output is generated but not used. But if you used it then any output you generated would need a read or write to Antic.

D6/D7 are kind of spare but used by some expansions like VBXE.


All that aside, it's a multiplexor not a latch. The outputs only become active on a cycle when the CPU or Antic is accessing an address on those ranges. So it's not going to be any good to drive an LED or anything.

Also, only one output can be active. The function of the multiplexor is to allow a small number of select lines to drive one of a larger number of outgoing lines.

An easier way would be to just use a joystick port for output functions but the current available isn't very much.

Or you could use a latch as part of a bigger circuit - you could e.g. use the D7 output to enable the latch which then captures whatever is on the Data bus at the time. Some cartridges use that sort of thing for bank selection.

Edited by Rybags, Sun Jan 22, 2012 9:00 AM.


#3 KubaCZ OFFLINE  

KubaCZ

    Chopper Commander

  • 106 posts
  • Location:Prague/CZE

Posted Sun Jan 22, 2012 9:27 AM

I don't have VBXE/Covox installed so they're probably free.

I'm going to use arduino for that. So if I want to enable D6 I need to set A9 and A10 and to get D7 high I need A8-10 = D6 is $D600 and D7 is $D700, right?

Edited by KubaCZ, Sun Jan 22, 2012 9:28 AM.


#4 sloopy OFFLINE  

sloopy

    River Patroller

  • 2,258 posts
  • lookin for bits, i like bits...
  • Location:in my cave of despair, surrounded by toys...

Posted Sun Jan 22, 2012 9:38 AM

If you want to turn on/off LEDs and other real world control of devices, you may want to consider adding a second 6520 in your machine, and then have 16 lines of I/O...

sloopy.

#5 KubaCZ OFFLINE  

KubaCZ

    Chopper Commander

  • 106 posts
  • Location:Prague/CZE

Posted Sun Jan 22, 2012 11:23 AM

2nd PIA is good idea, but I don't have any spare right now.

I've connected arduino to pin 7 and it reports it's high all time since boot even if I poke $D700(55040). Why?

Edited by KubaCZ, Sun Jan 22, 2012 11:23 AM.


#6 candle OFFLINE  

candle

    Stargunner

  • 1,909 posts
  • Location:Lublin, Poland

Posted Sun Jan 22, 2012 12:17 PM

because its way too slow, or your eyes are way to slow to notice any change

#7 Mathy ONLINE  

Mathy

    Stargunner

  • 1,167 posts
  • Location:Heerlen, NL

Posted Sun Jan 22, 2012 1:18 PM

Hello guys

$D6xx is also used by PBI devices. And PIA's only need 4 bytes, so there is plenty of space in the $D3xx area, where the first PIA already sits.

Mathy

#8 KubaCZ OFFLINE  

KubaCZ

    Chopper Commander

  • 106 posts
  • Location:Prague/CZE

Posted Sun Jan 22, 2012 1:38 PM

Of course my eye doesn't refresh at 1,7 Mhz ;)

It was problem in arduino, because I've set serial speed to 9600 which was not enough... now at 115200 it detects fine :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users