EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ChristofferB on April 22, 2016, 05:39:36 pm

Title: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 05:39:36 pm
Hey, I'm having a bit(!!) of trouble with a computer I'm building, and I was hoping that someone might have some ideas for troubleshooting.

It's a euro card bus (ECB) system; pcbs with DIN4.1612 connectors on a backplane.
Currently it has three boards:
      -CPU
      -4K ram
      -Turnkey module
It's not an altair clone, but very similar, using the altair 8800b-turnkey serial monitor code, slightly modded for addresses to match.

I'll post all schematics, but here's the symptoms:

It should display a "." prompt and wait for input via UART, but it just sends the occasional (every 8 sec's or so) package of 00 00 and FF. - doesn't look like serial data but haven't looked at the actual packets (logic analyzer down for maintenance).

All code lies in a single 2764 EPROM, and ends at address 01FFH = 0000 0001 1111 1111B so A9 and upwards should never be high - though they are clearly seen flicker with a logic probe.

The RAM starting at 2000H are never accessed, even though the ROM routines should push stack values on it.

The processor is definitely running, all lines, /WR, /RD, M/IO are all pulsing happily along..

Here's the list file for the ROM:

Code: [Select]
0001   0000             ;***************************************************************
0002   0000             ;* THIS IS A 256 BYTE PROM MONITOR FOR USE WITH THE ALTAIR     *
0003   0000             ;* 8800B TURNKEY MODULE.  THIS MONITOR PROVIDES THE USER WITH  *
0004   0000             ;* THE FOLLOWING FUNCTIONS:                                    *
0005   0000             ;*                                                             *
0006   0000             ;*     1)  MEMORY EXAMINE AND CHANGE FUNCTION                  *
0007   0000             ;*             YOU CAN EXAMINE AND CHANGE THE CONTENTS OF ANY  *
0008   0000             ;*             VALID MEMORY LOCATION                           *
0009   0000             ;*     2)  MEMORY DUMP FUNCTION                                *
0010   0000             ;*            YOU CAN DUMP IN THE ALTAIR BINARY PUNCH FORMAT   *
0011   0000             ;*            BETWEEN ANY TWO VALID MEMORY LOCATIONS           *
0012   0000             ;*     3)  JUMP TO FUNCTION                                    *
0013   0000             ;*            YOU CAN CAUSE THE MONITOR TO JUMP TO ANY         *
0014   0000             ;*            LOCATION AND START EXECUTING THE PROGRAMS THERE  *
0015   0000             ;*                                                             *
0016   0000             ;* THE MONITOR CAN BE REENTERED FROM THE USER'S PROGRAM        *
0017   0000             ;* SO THAT THE FEATURES OF THE MONITOR ARE ALWAYS AVAILABLE    *
0018   0000             ;* TO ANY USER PROGRAM.                                        *
0019   0000             ;* EDITED FOR DIFFERENT SYSTEM BY CHRISTOFFER B. 19/04/2016    *
0020   0000             ;***************************************************************
0021   0000             ;
0022   0000             ; MITS TURNKEY MONITOR
0023   0000             ; C.W. VERTREES 01/13/1977
0024   0000             ; REVISED 01/17/1977
0025   0000             ; 01/19/1977
0026   0000             ; 01/20/1977
0027   0000             ;         
0028   0000             
0029   0000             ACIACR .EQU 00H ; SIO STATUS AND COMMAND REGISTER/IO ADDR 00H; WILL BE MIRR'D AT SOME ADDR.
0030   0000             ACIADR .EQU ACIACR+1 ; SIO DATA REGISTER  /AT IO ADDRESS 01H
0031   0000             SIORST .EQU 03H ; ACIA MASTER RESET 
0032   0000             SIOINIT .EQU 11H ; /16,8 BITS,NO PARITY,2 STOP,NO INTS (THE BAUD GEN USED ORIG. IS X16: REG. IF NEED)
0033   0000             
0034   0000             LEADCH .EQU 0DH ; PUNCH LEADER CHAR
0035   0000             LEADCNT .EQU 3CH ; PUNCH LEADER COUNT
0036   0000             SOFB .EQU 3CH ; PUNCH "START OF BLOCK" CHAR
0037   0000             
0038   0000             PROMPT .EQU '.' ; COMMAND PROMPT
0039   0000             
0040   0000             ;STACK EQU 0FC00H
0041   0000             STACK .EQU 02000H ;START OF STACK/START OF RAM - 4K OF RAM STARTING AT 2000H
0042   0000             
0043   00FF             .ORG 000FFH ;START OF MONITOR (ALMOST BOTTOM OF ROM)
0044   00FF             
0045   00FF 3E 03       MON: MVI A,SIORST ; RESET 2SIO  /PUT SIORST IN A
0046   0101 D3 00        OUT ACIACR ; AND INITIALIZE /ENABLE INT.
0047   0103 3E 11        MVI A,SIOINIT   
0048   0105 D3 00        OUT ACIACR      ;SET ACIA /16, 8 BITS, NO PARITY, 2 STOP, NO INTS
0049   0107             
0050   0107 31 00 20    ENTER: LXI SP,STACK ; LOAD STACK
0051   010A CD 9C 01    CALL CRLF ; FORMAT OUTPUT
0052   010D 3E 2E        MVI A,PROMPT ; HELLO MONITOR
0053   010F CD F1 01    CALL OUTCHK
0054   0112 CD E7 01    CALL INCH ; WHAT TO DO?
0055   0115             
0056   0115 FE 4D        CPI 'M'
0057   0117 CA 28 01    JZ MEM ; DO MEMORY EXAMINE
0058   011A             
0059   011A FE 44        CPI 'D'
0060   011C CC 4E 01    CZ DMP ; DO A MEMORY DUMP
0061   011F             
0062   011F FE 4A        CPI 'J'
0063   0121 C2 07 01    JNZ ENTER ; NOT A VALID CMD
0064   0124             
0065   0124 CD A6 01    CALL OCTL6 ; DO A JUMP, GET ADDRESS
0066   0127 E9          PCHL ; LOAD PC AND GO
0067   0128             
0068   0128             ; THIS CONTROL STRUCTURE HANDLES THE MEMORY
0069   0128             ; EXAMINE AND CHANGE FUNCTION
0070   0128             ;
0071   0128 CD A6 01    MEM: CALL OCTL6 ; GET ADDRESS
0072   012B             
0073   012B 3E          .DB 3EH ; "MVI A," SKIP NEXT (BOMB A)
0074   012C 23          CONT: INX H ; INCREMENT ADDRESS
0075   012D CD 9C 01    CALL CRLF ; NEW LINE
0076   0130             
0077   0130 54          MOV D,H ; STORE ADDRESS IN D/E
0078   0131 5D          MOV E,L
0079   0132 CD C8 01    CALL PRINT6 ; PRINT ADDRESS
0080   0135             
0081   0135 1A          LDAX D ; LOAD DATA
0082   0136 67          MOV H,A
0083   0137 CD CE 01    CALL PRINT3 ; PRINT DATA BYTE
0084   013A             
0085   013A CD A7 01    CALL OCTL3 ; GET NEW DATA
0086   013D             
0087   013D EB          XCHG ; RESTORE ADDRESS
0088   013E DA 2C 01    JC CONT ; NO NEW DATA
0089   0141             
0090   0141 77          MOV M,A ; STORE DATA
0091   0142 BE          CMP M ; COMPARE DEPOSIT
0092   0143 CA 2C 01    JZ CONT ; OK, DO NEXT
0093   0146             
0094   0146 3E 3F       ERR: MVI A,'?' ; FLAG BAD DEPOSIT
0095   0148 CD F1 01    CALL OUTCHK ; PRINT '?'
0096   014B             
0097   014B C3 07 01    JMP ENTER ; RETURN TO MONITOR
0098   014E             
0099   014E             ; ERROR CONDITIONS RETURN TO MONITOR VIA "ERR"
0100   014E             ; THIS CONTROL STRUCTURE RUNS THE MEMORY DUMP FUNCTION
0101   014E             ;
0102   014E CD A6 01    DMP: CALL OCTL6 ; GET START
0103   0151             
0104   0151 EB          XCHG ; STORE IN D/E
0105   0152 D4 E2 01    CNC SPACE
0106   0155             
0107   0155 CD A6 01    CALL OCTL6 ; GET END
0108   0158             
0109   0158 3E 0D        MVI A,LEADCH ; LOAD LEADER CHAR
0110   015A 06 3C       X1: MVI B,LEADCNT ; LOAD LEADER CNTR
0111   015C             
0112   015C CD F1 01    X2: CALL OUTCHK ; PUNCH LEADER
0113   015F             
0114   015F 05          DCR B ; DECREMENT COUNT
0115   0160 C2 5C 01    JNZ X2
0116   0163             
0117   0163 B8          CMP B ; THROUGH WITH LEADER?
0118   0164 78          MOV A,B
0119   0165 C2 5A 01    JNZ X1 ; PUNCH NULLS
0120   0168             
0121   0168 7D          MOV A,L ; SUB START FROM END
0122   0169 93          SUB E
0123   016A 6F          MOV L,A
0124   016B 7C          MOV A,H
0125   016C 9A          SBB D
0126   016D 67          MOV H,A ; HL CONTAINS TOT BYTES
0127   016E 23          INX H ; INCREMENT TOT BYTES
0128   016F             
0129   016F 05          BLOCK: DCR B ; B=FFH
0130   0170 7C          MOV A,H
0131   0171 B7          ORA A ; MORE THAN ONE BLOCK?
0132   0172 C2 76 01    JNZ NOTLST ; NOT LAST BLOCK
0133   0175             
0134   0175 45          MOV B,L ; LAST BLOCK LENGTH
0135   0176             
0136   0176 3E 3C       NOTLST: MVI A,SOFB
0137   0178 CD F1 01    CALL OUTCHK ; PUNCH "START OF BLOCK"
0138   017B             
0139   017B 78          MOV A,B ; B=BYTE CNTR
0140   017C CD F1 01    CALL OUTCHK ; PUNCH BYTE COUNT
0141   017F             
0142   017F 0E 00        MVI C,0 ; CLEAR CHECKSUM
0143   0181             
0144   0181 7B          MOV A,E ; PUNCH LOAD ADDR
0145   0182 CD F1 01    CALL OUTCHK ; L.S. BYTE
0146   0185 7A          MOV A,D
0147   0186 CD F1 01    CALL OUTCHK ; M.S. BYTE
0148   0189             
0149   0189 1A          DATA: LDAX D ; GET DATA BYTE
0150   018A CD F1 01    CALL OUTCHK ; PUNCH IT
0151   018D             
0152   018D 13          INX D ; INCREMENT ADDR
0153   018E 2B          DCX H ; TOTBYTES=TOTBYTES-1
0154   018F 05          DCR B ; DONE W/BLOCK?
0155   0190 C2 89 01    JNZ DATA ; NO
0156   0193             
0157   0193 79          MOV A,C ; YES, PUNCH CKSUM
0158   0194 CD F1 01    CALL OUTCHK
0159   0197             
0160   0197 7C          MOV A,H ; THROUGH W/ALL BYTES?
0161   0198 B5          ORA L
0162   0199 C2 6F 01    JNZ BLOCK ; NO, PUNCH NXT BLOCK
0163   019C             
0164   019C 3E 0D       CRLF: MVI A,0DH ; DO A CRLF AND RETURN TO MONITOR
0165   019E             
0166   019E CD F1 01    CALL OUTCHK
0167   01A1             
0168   01A1 3E 0A        MVI A,0AH
0169   01A3             
0170   01A3 C3 F1 01    JMP OUTCHK
0171   01A6             
0172   01A6             ; RETURN TO MONITOR THROUGH OUTCHK
0173   01A6             ; THIS SUBROUTINE BUILDS 3/6 OCTAL DIGITS IN H&L
0174   01A6             ;
0175   01A6             ; SPECIAL RETURN PROVIDED BY A "SPACE", CARRY BIT SET.
0176   01A6             ; ONLY VALID OCTAL OR "SPACE" ACCEPTED. ALL OTHERS FLAGGED AND
0177   01A6             ; CONTROL RETURNS TO MONITOR.
0178   01A6             ;
0179   01A6 06          OCTL6: .DB 6 ; LOAD B WITH A 6, SKIP NEXT
0180   01A7 06          OCTL3: .DB 6 ; LOAD B WITH 3
0181   01A8 03          .DB 3
0182   01A9 21 00 00    LXI H,0 ; CLEAR H/L FOR LESS THAN 6 DIG RET
0183   01AC             
0184   01AC CD E7 01    AGN: CALL INCH ; GET CHARACTER
0185   01AF 4F          MOV C,A ; STORE IN C
0186   01B0 FE 20        CPI ' ' ; COMPARE TO "SPACE"
0187   01B2             
0188   01B2 37          STC ; SET THE CARRY
0189   01B3 C8          RZ ; RETURN IF "SPACE"
0190   01B4 E6 B8        ANI 0B8H ; TEST FOR VALID OCTAL
0191   01B6             
0192   01B6 EE 30        XRI 30H
0193   01B8             
0194   01B8 C2 46 01    JNZ ERR ; BAD, FLAG & RET TO MON
0195   01BB             
0196   01BB 79          MOV A,C ; RESTORE CHAR
0197   01BC E6 07        ANI 7 ; STRIP OFF ASCII
0198   01BE             
0199   01BE 29          DAD H ; SHIFT H&L LEFT 3 BITS
0200   01BF 29          DAD H
0201   01C0 29          DAD H
0202   01C1 85          ADD L
0203   01C2 6F          MOV L,A ; PUT OCTAL IN H
0204   01C3 05          DCR B ; THROUGH?
0205   01C4 C2 AC 01    JNZ AGN ; NO, DO AGAIN
0206   01C7             
0207   01C7 C9          RET ; YES, NORM RETURN
0208   01C8             ; THIS SUBROUTINE PRINTS 3 OCTAL DIGITS FROM H
0209   01C8             ; OR 6 OCTAL DIGITS FROM H AND L
0210   01C8             ;
0211   01C8             ; DIGITS ARE FOLLOWED BY A SPACE
0212   01C8             ;
0213   01C8 06 06       PRINT6: MVI B,6 ; LOAD CNTR W/6
0214   01CA             
0215   01CA AF          XRA A ; CLEAR A
0216   01CB C3 D5 01    JMP NEXT1 ; SHIFT ONE BIT
0217   01CE             
0218   01CE 06 03       PRINT3: MVI B,3 ; LOAD CNTR W/3
0219   01D0             
0220   01D0 E6          .DB 0E6H ; SKIP NEXT, SHIFT 2 BITS
0221   01D1 29          NEXT3: DAD H ; SHIFT H/L LEFT 3 INTO A
0222   01D2 17          RAL
0223   01D3 29          DAD H
0224   01D4 17          RAL
0225   01D5 29          NEXT1: DAD H
0226   01D6 17          RAL
0227   01D7 E6 07        ANI 7 ; STRIP OFF OCTAL
0228   01D9             
0229   01D9 F6 30        ORI 30H ; ADD ASCII / 30H OR A
0230   01DB             
0231   01DB CD F1 01    CALL OUTCHK ; PRINT IT
0232   01DE             
0233   01DE 05          DCR B ; THROUGH?
0234   01DF C2 D1 01    JNZ NEXT3 ; NO, SHIFT NEXT THREE
0235   01E2             
0236   01E2 3E 20       SPACE: MVI A,' ' ; YES, PRINT SPACE
0237   01E4             
0238   01E4 C3 F1 01    JMP OUTCHK ; AND RETURN
0239   01E7             
0240   01E7             ; RETURN TO CALLING PROGRAM THROUGH OUTCHK
0241   01E7             ; THIS SUBROUTINE WILL INPUT A CHARACTER, STRIP
0242   01E7             ; PARITY AND AUTOMATICLY ECHO THE CHARACTER.
0243   01E7             ; IT WILL ALSO OUTPUT A CHARACTER WITH CHECKSUM CALCULATIONS.
0244   01E7             ;
0245   01E7 DB 00       INCH: IN ACIACR ; READ STATUS
0246   01E9             
0247   01E9 0F          RRC ; ROTATE A RIGHT THROUGH CARRY
0248   01EA D2 E7 01    JNC INCH ; NOT READY / BIT 0 OF REGISTER =0 (THIS CHECKS THE "RX DATA REGISTER FULL" FLAG)
0249   01ED             
0250   01ED DB 01        IN ACIADR ; READ CHARACTER INTO A
0251   01EF             
0252   01EF E6 7F        ANI 7FH ; STRIP PARITY
0253   01F1             
0254   01F1 F5          OUTCHK: PUSH PSW ; SAVE CHARACTER
0255   01F2 81          ADD C ; ADD IN CHECKSUM
0256   01F3 4F          MOV C,A ; UPDATE CHECKSUM
0257   01F4             
0258   01F4 DB 00       LOOP: IN ACIACR ; READ STATUS
0259   01F6 0F          RRC
0260   01F7 0F          RRC
0261   01F8 D2 F4 01    JNC LOOP ; READY ?
0262   01FB             
0263   01FB F1          POP PSW ; YES, GET CHAR
0264   01FC D3 01        OUT ACIADR ; PRINT CHARACTER
0265   01FE             
0266   01FE C9          RET ; FROM WHENCE YE CAME
0267   01FF             
0268   01FF              .ENDtasm: Number of errors = 0

One issue I have, is the "E" pin on the 6850B ACIA. I honestly have no clue what to do with it, and most UART's don't have a similar feature, so I searched for schematics using the chip, and found one just tying it to IO/M, but I really don't know if that's a good idea.

Note: There's some pull-up resistors missing from the CPU module schematic, that I've added on the circuit, but the processor DOES run.

Note2: The xtal and 15M resistor at the bitrate gen are replaced with an oscillator can of the same freq: 1.8432MHz
Really hope someone has some insight, as I'm at a bit of a loss. And here I thought debugging would be easy on more interchangable boards..

Thanks in advance!
Title: Re: Microcomputer/serial communication troubles
Post by: Andy Watson on April 22, 2016, 05:47:18 pm
Check the operation of the stack. I believe the stack pointer in this processor starts at its highest value and then decreases as data is pushed on to it.
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 05:58:07 pm
Ugh, you're absolutely right! That might explain a good deal of my issues.
Thanks!
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 07:05:10 pm
Updated stack to top of RAM instead of bottom, doesn't really make any change. No /CS'ing the RAM, still reading from ROM, still spewing a few randoms over serial.

Though that's indicative in itself, ofcourse, since it can't be executing any stack parts of the code..

hmm..
Title: Re: Microcomputer/serial communication troubles
Post by: Andy Watson on April 22, 2016, 08:16:37 pm
One issue I have, is the "E" pin on the 6850B ACIA. I honestly have no clue what to do with it,
What have you done with it?
The datasheet says that the Enable input "enables the bus input/output buffers and clocks data to and from the ACIA".  It also says, under operation of the transmitter, that the negative edge of the E signal is used to transfer data to Transmit Data Buffer - so it looks like you have to use to somehow synchronise the reading and writing of data - you can't just tie it up or down.

Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 08:57:22 pm
I didn't tie the E pin on the 6850 hi or lo. I connected it to the IO/M, as I'd seen in some other designs. So it is being toggled. Just don't really know if it's at the correct rate.

Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 09:13:52 pm
The "E" line is a feature of the MC6800 family, and, as far as I can tell, it's more or less just a clock output for timing things. Pin name "enable theta-2 output" - should it just be the processor clock?
Seems to be what would mimic the 6800 function the closest.
Title: Re: Microcomputer/serial communication troubles
Post by: rfeecs on April 22, 2016, 09:47:21 pm
The 6850 clocks data in/out on the trailing edge of E.  The 8085 uses the trailing edge of /R or /W.  One approach that works is nand /R and /W together and use that for E, and use the 8085 S1 for the 6850 R/W.

Make sure your /DCD and /CTS signals are wired appropriately.

You can check out your system with a simple echo program first:
http://www.solivant.com/altair_bootloaders/index.php?album=altair_bootloaders&pagen=1 (http://www.solivant.com/altair_bootloaders/index.php?album=altair_bootloaders&pagen=1)
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 10:20:34 pm
Just consulted the original 6850 serial card for the altair 8800, and nand'ing /RD and /WR is exactly what they've used for E. But with both /RD and /WR active low, wouldn't that essentially become an "and" ?

Is there any advantage in using S1 for R/W instead of just /WR ?

Thanks, this must be the way to go.
Title: Re: Microcomputer/serial communication troubles
Post by: rfeecs on April 22, 2016, 10:34:38 pm
/RD nand /WR = RD or WR

The advantage of using S1 is it is set at the beginning of the instruction cycle and held for the entire cycle, so it is stable when you clock E.

Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 22, 2016, 10:40:41 pm
Right, S1 it is, then.

Ah, sorry, read "NOR" - getting late. So you basically let it trigger on any change in read/write, as I see it?

I'll go ahead and redo the ACIA control.

Thanks!
Title: Re: Microcomputer/serial communication troubles
Post by: Andy Watson on April 22, 2016, 11:49:05 pm
Does the program run? Looking at the CE line for the EPROM it appears to be driven by an LS138 which has an enable and not-enable both tied to ground?
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 23, 2016, 12:00:52 am
The program appears to run, since the EPROM /CS line is toggling - it's a schematic fault I have corrected, the active high is of course to be pulled HI.
Sorry, haven't been keeping up with my schematic errata.

I should probably make a test eprom with a tiny routine jumping between 10 addresses, in a loop, so I know exactly what address pins should be toggling, then that way get the ROM part verified, then maybe a program that just writes to all locations in RAM, to check out that board, THEN figure out the EPROM thing.

The changing of "E" and R/W on the ACIA didn't seem to change anything, so I suspect the program not running must be the primary fault.

Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 23, 2016, 11:38:58 pm
Okay, after solving some smaller issues (like not soldering a decoder pin on the RAM card  :palm: and a solder blob tying ALE to gnd :palm:) I've tried a ROM with a tiny routine:
Code: [Select]
0001   0000             ;***************************************************************
0002   0000             ;*       SIMPLE ROM PROGRAM TO TEST TURNKEY ROM LOCATIONS      *
0003   0000             ;*      PROGRAM JUMPS BETWEEN VERY FEW ADDRESSES, ALLOWING     *
0004   0000             ;*     PROBING OF ADDRESS LINES THAT SHOULDN'T BE ACCESSED.    *
0005   0000             ;*     PROGRAM IS ONLY 6 BYTES LONG, SO A4-15 SHOULD BE LOW.   *
0006   0000             ;*            WRITTEN BY CHRISTOFFER B. , 23/04/2016           *
0007   0000             ;***************************************************************
0008   0000             
0009   0000             
0010   0000             
0011   0000             
0012   0000             .ORG 0000H
0013   0000             
0014   0000 3E FF       ROMSTART: MVI A,0FFH  ;LOADS ACCUMULATOR WITH FFH
0015   0002 78          MOV A,B  ; LOADS A INTO B
0016   0003 C3 00 00    JMP ROMSTART ; JUMPS TO ADDRESS 0
0017   0006             .ENDtasm: Number of errors = 0

As the comment said, it only takes up 6 bytes, and since no IO ports or memory higher than that is addressed, all address pins higher than A3 should be LOW and it should loop in those 3 instructions.

They're still flickering happily, though, so that doesn't work. It seems, interestingly enough, that the hi/lo time increases (doubles, it looks like) with every higher address line, indicating that it's in fact just counting up on the addresses, as if it doesn't read any memory (I only have CPU and EPROM/UART card installed).
The EPROM /CS is still toggling.
Maybe there's a timing issue with EPROM output enabling.




Title: Re: Microcomputer/serial communication troubles
Post by: Andy Watson on April 24, 2016, 12:39:43 am
Maybe there's a timing issue with EPROM output enabling.
Maybe! Have you checked the propagation delay through the address selection and chip-select paths? My vague memory of using the 8085 is that we only had timing problems with the slowest of slow EPROMs when the processor was being run with a 6MHz crystal. Could you temporarily substitute a 1MHz crystal?
You have indicated some bus termination resistors - it looks like the EPROM needs to be able to drive this termination - can it? You might also try removing anything that can be unplugged from the data bus to ensure that there is no contention.
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 24, 2016, 01:08:59 am
The  pullup resistors are 5.5 k - no pulldowns and only on data lines.

I actually just substituted the crystal for a 1,5 MHz one - the previous 3,6 MHz is above what my particular chip was rated at. Problem persists, though.

Quote
Have you checked the propagation delay through the address selection and chip-select paths?

Well the datasheets for the 74LS devices say about 18 ns per chip =36 ns.
but I haven't measured it myself.

The EPROM is a 81 vintage Mitsubishi M5L2764K-2, must be 200 ns access time. Maybe I should try with a newer one, but 200 ns is pretty ordinary for EPROM's if I recall correctly.


Title: Re: Microcomputer/serial communication troubles
Post by: Andy Watson on April 24, 2016, 01:49:22 am
Can you isolate the processor card and force instructions on to the data bus (using appropriate resistive pull-up/downs)? NOPs (00h) should see the processor read through its entire address range. Restart (ffh) should cause the processor to sit in a tight loop reading instructions from address 0038h (I think), whilst pushing the stack to a decreasing address.
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 24, 2016, 02:04:20 am
FF's is easy, actually, since the data bus is already pulled up.
If there are no other boards installed, that should be enough to make it read RST 7's That's a really good idea!

NOP's could be accomplished by putting some resistors connected to gnd directly into the backplane sockets. Should be doable.

edit: the force-FF needs stronger pullup' it seems. I'll have to try that.
Title: Re: Microcomputer/serial communication troubles
Post by: ChristofferB on April 29, 2016, 10:17:06 pm
Okay, so, sorry for reviving an old thread, but I'm going absolutely nuts.

I fixed most of the (plentiful) issues I had (including adding pull-up's to everything), and got the system running.
I've even gotten it to transmit via serial, using a slightly modified version of this:
http://www.solivant.com/altair_bootloaders/index.php?album=altair_bootloaders&pagen=1 (http://www.solivant.com/altair_bootloaders/index.php?album=altair_bootloaders&pagen=1)
serial card test routine that starts by spitting some characters out:
Code: [Select]
0001   0000             ;***************************************************************
0002   0000             ;                       UART REFLECTOR TEST                    *
0003   0000             ;                SHOULD REFLECT ANY INPUT TO ACIA.             *
0004   0000             ;***************************************************************
0005   0000             
0006   0000             
0007   0000             SIORST .EQU 03H ; ACIA MASTER RESET
0008   0000             SIOINIT .EQU 35H ; 8/N/1, /16
0009   0000             ACIACR .EQU 00H ; SIO STATUS AND COMMAND REGISTER   
0010   0000             ACIADR .EQU ACIACR+1 ; SIO DATA REGISTER  /AT IO ADDRESS 01H
0011   0000             
0012   0000             .ORG 0000H
0013   0000             INIT:
0014   0000 3E 03        MVI A,SIORST
0015   0002 D3 00        OUT ACIACR ;RESET ACIA
0016   0004 3E 35        MVI A,SIOINIT
0017   0006 D3 00        OUT ACIACR ;SETUP ACIA
0018   0008 3E 54        MVI A,54H
0019   000A D3 01        OUT ACIADR
0020   000C 3E 45        MVI A,45H
0021   000E D3 01        OUT ACIADR
0022   0010 3E 53        MVI A,53H
0023   0012 D3 01        OUT ACIADR
0024   0014 3E 54        MVI A,54H
0025   0016 D3 01        OUT ACIADR
0026   0018 3E 0D        MVI A,0DH
0027   001A D3 01        OUT ACIADR
0028   001C 3E 3E        MVI A,3EH
0029   001E D3 01        OUT ACIADR ;"TEST"CR">"
0030   0020             
0031   0020 DB 00       LOOP: IN ACIACR ;READ STATUS REG.
0032   0022 0F          RRC
0033   0023 D2 20 00    JNC LOOP ;WAIT FOR IN CHARACTER
0034   0026 DB 01        IN ACIADR ;GET CHAR
0035   0028 D3 01        OUT ACIADR ;WRITE CHAR BACK
0036   002A C3 20 00    JMP LOOP ;REPEAT FOREVER
0037   002D             .END
0038   002D             
0039   002D             
tasm: Number of errors = 0

And I do see the "TEST >" characters. But for the life of me I can't get the ACIA to READ any serial data.
I've traced the RX signal all the way from my terminal PC to the output of the RS232->TTL converter (MC1489) - But the UART/ACIA doesn't seem very interested.

I'm unsure whether it's a code thing (unlikely, the ports are correct, since it writes, and the loop is very very basic)
-Given that the code just mirrors, even messing up parity or start/stop bits shouldn't matter.


I'm attatching the updated serial/rom card schematic, but my only other guess is that the MC1489's "response control" lines can't be left floating, but I can't find anything on that, and I can see the data on both sides.

Any hints would be much appreciated!