Re: 8085 SBC needs help



On Feb 2, 10:25 am, Allen Bong <allenbsf6...@xxxxxxxxx> wrote:
I have wired a simple SBC based on the basic 8085 chip.  Using 74LS373
as a latch clocked by
ALE, 2716 for program storage, 2x 74LS138 for decoding the /CE for
2716 and the /IOR, /IOW,
/MR and /MW signals.  I need only 1 bit input and 1 bit output so I
used 74LS373 for input
and 74LS244 for output.  The input is connected to a switch and output
conmected to a LED.
When the switch is making, the LED will flash at about 1Hz.  When the
switch is off, the LED
goes off.  There was no RAM as my program doesnt use subroutines.
Actually the program is
less than 256 bytes so I tie A8-A10 of the 2716 to ground.
Below is the connection of the 2 decoders and the I/O.

        74LS138                     74LS138
       .------.                      .------..
     1 |    Y0o----- /ROM CS       1 |    Y1|-----/MR
A13----|A     |               /WR----|A     |
A14--2-|B   Y1o-----          /RD----|B   Y2|-----/MW
A15--3-|C     |              IO/M----|C     |
       |    Y2o-----                 |    Y5|-----/IOR
VCC--6-|      |               VCC---6|      |
  +--4-o      |                 +---4|    Y6|-----/IOW
  +--5-o      |                 +---5|      |
  |    |      |                 |    |      |
  |    '------'                 |    '------'
  |                             |
 ===                           ===                   VCC
 GND                           GND                    |
                                                     .-.
                                                     | |
           OUTPUT                         INPUT      | |10K
           74LS373                       74LS244     '-'
          .------.                      .------.      |
  D0-----3|D0  Q0|2----+         D0--18-|Y0  A0|-2---++
          |      |     |                |      |     |
          |      |    .-.               |      |     o |
 /IOW--+  |      |    | |               |      |       |=|
       |  |      |    | |470            |      |     o |
+------+  |      |    '-'               |      |     |
| |\      |      |     |                |      |     |
+-| >O--11|LE    |     |                |      |    ===
  |/      |      | LED -                |      |    GND
    -----1|/OE   |     ^ ->    /IOR---1-|/OE   |
    |     '------'     |                '------'
   ===                VCC
   GND

(created by AACircuit v1.28.6 beta 04/19/05www.tech-chat.de)

And the program I wrote to test the circuit.

        .equ    sensor, h'00
        .equ    led,    h'00

        .org    h'0000

start:  mvi     a,h'ff          ;turn off led at start
        out     led
mloop:  in      sensor          ;check sensor
        rar
        jnc     led_on
        jmp     mloop
led_on: mvi     a,h'00          ;turn on led
        out     led
delay1: lxi     d,h'ffff
dloop1: nop
        dcx     d
        jnz     dloop1
        mvi     a,h'ff          ;turn off led
        out     led
delay2: lxi     d,h'ffff
dloop2: nop
        dcx     d
        jnz     dloop2
        jmp     mloop
        .code
        .end

I was wondering if I didnt fully understand the instructions correctly
or the hardware was
in problem.  On the 74LS138 I used for memory decoding, I was getting
pulses on all the
output instead of just Y0 output.  The IO/M pin was a permanent lo and
the /WR signal from
8085 was always high.
Do I need extra signals on the enables for the decoders to decode
correctly?
Any feedback is much appreciated.  Thank you.

Allen

I have just spotted a software mistake. The DCX D dosent affect the
zero flag when decrements through zero, so my program must have
stucked in a loop. SOme correction was made after the DCX D.

dloop1: nop
dcx d
mov a,d
ora e
jnz dloop1
[snip]
dloop2: nop
dcx d
mov a,d
ora e
jnz dloop2
jmp mloop

I have also included a link if you want to take a look at the
schematic.

http://www.flickr.com/photos/11236051@N08/2236545530/

Allen
.



Relevant Pages

  • Re: Dropping packets
    ... 445Mbps which never drops a packet, the other has a combined tx/rx ... loops on the switch? ...   Hardware is Gigabit Ethernet, ... in and bytes out) for all ports. ...
    (comp.dcom.sys.cisco)
  • Re: Anyone ever try to fix a heat/AC swtich (in dash)
    ... The switch to control heat, defroster, and AC has been on ...   Now ... The lower 3 speeds stopped working all at once long ...
    (rec.autos.tech)
  • Re: Anyone ever try to fix a heat/AC swtich (in dash)
    ... The switch to control heat, defroster, and AC has been on ...   Now ... sure if the heater core and AC are working, ...
    (rec.autos.tech)
  • Re: *Expelled* writer admits he opposes the entire foundation of
    ...    detonation of the atmosphere into hydrogen fusion. ... controversial when the guys that perpetrated the scam are running the ... bait and switch on anyone that believed them about the ID scam. ... had started to run the bait and switch on their own supporters. ...
    (talk.origins)
  • Re: Nice Stupid Deal Of The Day...
    ... bass and treble controls with a shape switch for instant access to an ... variable frequency control to tune out feedback, ...    * Digital reverb ...
    (alt.guitar)