View Single Post
Old 17th Sep 2017, 11:39 pm   #27
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
Default Re: Help with 6802 Microcontroller

OK

Spent some time working out how the 6802 boots, and finally have got it!

If VMA (Valid Memory Address) is LOW, then all ROM, EPROM's output FF

So the 6802 reads FF until there is a valid address on the address pins (buffers) (so obvious now!)

After a RESET the 6802 sets FFFE on its ADDRESS lines, and turns ON VMA

The relevant EPROM (from the chip select bits) returns the DATA that was addressed, and the 6802 reads it.
This data represents the high byte.

The 6802 then outputs FFFF and reads the DATA from the EPROM
This DATA is the LOW byte.

This high and low byte is put together and is the ADDRESS for the first instruction.

Sorry if this is so obvious and basic, but this understanding is my eureka moment of the week

Looking at the first few addresses and data, after a reset, I can now see what is happening.

After a reset the 6802 puts address FFFE on the address bus, and sends VMA high. However it is reading FF from the EPROM. It should read C3

It then addresses FFFF and correctly reads CD from the EPROM. So its next address is FFCD instead of the correct C3CD.
It then goes into a loop, and i presume the watchdog timer shuts everything down.

It looks like problem might be with the timing on CE to the EPROM's.

However it only seems to do it on the very first instruction. Every other read instruction I have checked is correct.

I will measure the timing of the various lines relative to VMA.

I will try with the logic analyser using its internal clock (I should see much more detail on the first few clock cycles after a reset), or with an isolated input scope I have.

Just feel I am getting closer every day!
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline