UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Reply
 
Thread Tools
Old 15th Sep 2017, 5:15 pm   #21
hysteresis
Tetrode
 
Join Date: Feb 2007
Location: Liverpool, Merseyside, UK.
Posts: 69
Default Re: Help with 6802 Microcontroller

Quote:
Originally Posted by PETERg0rsq View Post
It looks like the most significant byte is getting corrupted to 0xFF
As it is only the first byte read immediately after reset that's being corrupted, might the problem be due to something as simple as insufficient decoupling of the ROM1 Vcc line?
hysteresis is offline   Reply With Quote
Old 15th Sep 2017, 11:30 pm   #22
PETERg0rsq
Hexode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 357
Default Re: Help with 6802 Microcontroller

Today things not looking so promising!

With the same setup the signal generator refuses to boot up!

I am also having problems with my logic analyser, which is not clocking on the E line.

When I use the internal clock (20MHz), the E is a perfect squarewave, but not getting reliable results when using E as external clock.

Need to sort this out before I can move on again. I am sure I am close. I have lost confidence in the data I am looking at!

When I scope all the logic and PSU lines they are all a good 5V, with no significant noise. I scoped the E line looking for wide, or short pulses but found nothing

The power supplies are all up before RESET.

I will look to see if I have any spare EPOMS and burn some new ones to try.

My capacitors have arrived, so will replace all these.

I cant do anything over the weekend, so will come back as soon as I have anything more to add

Thanks for all the help

peter
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline   Reply With Quote
Old 16th Sep 2017, 6:57 am   #23
KeithsTV
Nonode
 
KeithsTV's Avatar
 
Join Date: Aug 2007
Location: South Bradford, West Yorkshire, UK.
Posts: 2,026
Default Re: Help with 6802 Microcontroller

I have a 6802P (the 1MHz version) surplus to requirements should you want to try another processor.

PM me if you want it FOC.

Keith
KeithsTV is offline   Reply With Quote
Old 16th Sep 2017, 9:05 pm   #24
PETERg0rsq
Hexode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 357
Default Re: Help with 6802 Microcontroller

Keith

many thanks for your offer.

I have ordered a couple from china, but with a long lead time, and there are some local ones up for sale shortly.

Managed to sort out my logic analyser problems, somewhere along the line I reset the clock data, and it went into clocking only on rising edge, not both! User error!

Got a little time today, and pulled all the chips connected to the bus except the two EPROMs which get addressed exclusively on the initialization.

Got exactly the same results, so the other chips are not causing the problem.

I wrote new EPROMS, but again no change.

I then compared what the 6802 address bus was addressing, and the returned data values, by comparing with my readout of the EPROMS, and the 6802 is receiving the data it is requesting, so that eliminates any reading problems.

The fault occurs straight after the FFFF, FFFE sequence, and the received data for these addresses is identical when boots successfully, or not. Straight after this the Most significant two bytes are corrupted to FF, which is all bits ON (which coincidentally are the same as in the start addresses!)

The DATA lines are correct for the sent ADDRESS lines

As my logic analyser is directly on the 6802 pins, before any buffers or pull ups on the ADDRESS lines, I can only conclude the fault is in the 6802.

Can anyone argue against this?

If not I will put it away untill my new 6802's arrive.

Peter
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline   Reply With Quote
Old 16th Sep 2017, 10:22 pm   #25
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 6,082
Default Re: Help with 6802 Microcontroller

Could you write some new firmware that simply toggles an LED on and off (you should be able to work out the addresses to use by reverse-engineering) or even just reads memory sequentially (you should see an increasing value on the address lines temporarily, flicking back to the program memory to read the next instruction), and write that to a blank EPROM?

That might help confirm or deny the processor as the culprit.
__________________
Julie {formerly known AJS_Derby}
julie_m is offline   Reply With Quote
Old 16th Sep 2017, 11:06 pm   #26
PETERg0rsq
Hexode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 357
Default Re: Help with 6802 Microcontroller

It would be an interesting idea.

Unfortunately I know very little about programming 6802, or any MPU.

ASM in PIC world is my level.

Looking through the logic from the 6802 when it boots, I can just about work out what is happening, but I just dont understand it!

I guess I would need to learn assembly programming
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline   Reply With Quote
Old 17th Sep 2017, 10:39 pm   #27
PETERg0rsq
Hexode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 357
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   Reply With Quote
Old Yesterday, 7:46 am   #28
Ancient Geek
Triode
 
Join Date: Aug 2017
Location: Chipping Sodbury, South Gloucestershire, UK.
Posts: 21
Default Re: Help with 6802 Microcontroller

Quote:
Originally Posted by PETERg0rsq View Post
If VMA (Valid Memory Address) is LOW, then all ROM, EPROM's output FF
Just for any newcomers to logic circuits reading this thread, the ROMs do not output anything unless both CE and OE are low. They hold their outputs tri-state. The 6802 is reading FF because the data lines are held up by resistor pack R20.
Ancient Geek is offline   Reply With Quote
Reply

Thread Tools



All times are GMT. The time now is 10:40 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright ©2002 - 2017, Paul Stenning.