UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV 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.

Closed Thread
 
Thread Tools
Old 15th Sep 2017, 6:15 pm   #21
hysteresis
Tetrode
 
Join Date: Feb 2007
Location: Liverpool, Merseyside, UK.
Posts: 99
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  
Old 16th Sep 2017, 12:30 am   #22
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
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  
Old 16th Sep 2017, 7:57 am   #23
KeithsTV
Nonode
 
KeithsTV's Avatar
 
Join Date: Aug 2007
Location: South Bradford, West Yorkshire, UK.
Posts: 2,571
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 online now  
Old 16th Sep 2017, 10:05 pm   #24
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
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  
Old 16th Sep 2017, 11:22 pm   #25
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
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.
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments.
julie_m is offline  
Old 17th Sep 2017, 12:06 am   #26
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
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  
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  
Old 18th Sep 2017, 8:46 am   #28
Ancient Geek
Retired Dormant Member
 
Join Date: Aug 2017
Location: Bristol, UK.
Posts: 136
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  
Old 22nd Sep 2017, 8:46 pm   #29
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
Default Re: Help with 6802 Microcontroller

I have made progress, and the signal generator now boots up every time.

Problem was with a high resistance track to the ROM1 CE pin.

However there is a new problem, which I am presuming I have caused.

At the end of booting the IRQ is constantly pulsing, and it seems to be from the PIA. As soon as I touch a button the 6802 locks up.

I checked the DATA BUS for any floating logic, but found the waveform on all the DATA pins to be very poor (see picture).

I removed all other chips on the DATA line, so now the only components connected are the pull up resistors and the 6802, and the waveform is just as bad. I have replaced the 6802, and it is identical.

What can cause the problems, or is this normal?

The ADDRESS pins show a good square wave form on rising and falling edge.
Attached Thumbnails
Click image for larger version

Name:	IMG_4690.jpg
Views:	103
Size:	90.5 KB
ID:	149810  
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline  
Old 22nd Sep 2017, 9:19 pm   #30
cmjones01
Nonode
 
Join Date: Oct 2008
Location: Warsaw, Poland and Cambridge, UK
Posts: 2,669
Default Re: Help with 6802 Microcontroller

Some oddness on the data bus is normal: remember that it can be driven by different devices on the bus at different times, so there isn't always anything actually driving it. That means that a certain amount of 'floating' will usually be visible at some stage in the clock cycle. It's not usually anything to worry about.

If the PIA is generating interrupts constantly, find out why: what can cause an interrupt to be generated? Pin change? A particular input? Is it a 6821?

Chris
__________________
What's going on in the workshop? http://martin-jones.com/
cmjones01 is offline  
Old 22nd Sep 2017, 9:32 pm   #31
RogerEvans
Hexode
 
Join Date: Oct 2014
Location: Wiltshire, UK.
Posts: 378
Default Re: Help with 6802 Microcontroller

It is normal for NMOS devices to have a slower rising edge than falling edge but that should show on the address lines as well. Are you looking at read or write cycles? In one case the 6802 is driving the data bus, in the case of read cycles it is the addressed device and the edges might look different for a CMOS static RAM or the NMOS PIO.

Have you checked all the chip selects and control lines for the PIO? Maybe another bad track or a bad PIO.

Roger
RogerEvans is offline  
Old 22nd Sep 2017, 9:32 pm   #32
Ancient Geek
Retired Dormant Member
 
Join Date: Aug 2017
Location: Bristol, UK.
Posts: 136
Default Re: Help with 6802 Microcontroller

On the assumption that the 6821 is the keyboard interface (possibly other functions too, the schematic you posted doesn't show what it drives), it might be something as simple as a stuck down key.
Ancient Geek is offline  
Old 23rd Sep 2017, 11:16 am   #33
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
Default Re: Help with 6802 Microcontroller

Thanks

Yes absolutely correct on the pulses I saw. I expected to see a "sharp" rising and falling edge. (the picture was taken when no other components connected to the BUS except the pull up resistors, but the immage was identical when all other components installed.

I was puzzled about what was triggering the IRQ, as it was being sent by the PIA (a 6821), but there was NO activity on its CA1, CA2, CB1, CB2 or its PA BUS.

The IRQ was effectively "waking up" the 6802 (no activity on the ADDRESS BUS) untill the IRQ, then both BUS's went active, then it completely stopped for about half a second, then another IRQ would appear and off it would go again performing exactly the same instructions. Nothing was triggering the IRQ externally that I could see!

Anyway a late night on it found the fault, and all is fully working again

I was correct, and I had created this second fault on the board.

After finding the high resistance CA track I had checked continuity between all the DATA pins between the 6802 and all the other chips (ROM, RAM, PIA etc) using a bench meter. All looked good.

I then went through it again using a "ToneOhm" and noticed a different "pitch" when checking between the 6802 and the first EPROM on D7.

Further investigation showed a resistance of 150 ohms. Re-soldering all the vias and pins made no difference, to I linked out the bad part (via to EPROM) and after that everything is now working exactly as it should.

I had previously run a soldering iron down every pin on the EPROM sockets looking for dry joints, after finding the last bad high resistance track (I spotted this with a scope, as the CE pin was "floating") and must have disturbed a dodgy joint.

SO a big thanks to all the help and support, and corrections, received here without it, and also the opportunity to write, and think, about the problems I observed, I doubt I would have got it sorted.

I have learnt a great deal and now understand the basics of how these processor circuits work, but also know there is a great deal more i need to learn.

Thanks

Peter
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline  
Old 23rd Sep 2017, 11:39 am   #34
Station X
Moderator
 
Station X's Avatar
 
Join Date: Jan 2003
Location: Ipswich, Suffolk, IP4, UK.
Posts: 21,192
Default Re: Help with 6802 Microcontroller

Well done Peter.

I've repaired a couple of uP controlled Signal Generators, one more than once, and I know how difficult it can be.

Having a logic analyser must be a great help.
__________________
Graham. Forum Moderator

Reach for your meter before you reach for your soldering iron.
Station X is offline  
Old 23rd Sep 2017, 6:48 pm   #35
PETERg0rsq
Heptode
 
PETERg0rsq's Avatar
 
Join Date: Jun 2009
Location: St Helens, Lancashire, UK.
Posts: 641
Default Re: Help with 6802 Microcontroller

Yes a decent logic analyser is a big help, and I use it lots, especially for TTL and CMOS logic circuits.

I also use it to read data BUS, and Multiplexed display signals to locate issues.

However on this occasion I probably relied on it too much, as if I had used a scope earlier, to verify all the levels then probably I would have saved a lot of time. The logic analyser was showing the 6801 levels, but I never verified that they were also being seen at the other chips!

It was, however great for understanding how the CPU board worked, and I now have a basic understanding on how a MCU communicates with its ROM etc. Every cloud etc.

When i get some time i will do some more reading on understanding the internal functions of the MCU.

Now to clear the backlog of other equipment i need to repair. I think what I have learnt is going to come in useful.

Peter
__________________
SPECIALIST.....Knows everything about nothing
EXPERT..........Knows nothing about everything
PETERg0rsq is offline  
Old 23rd Sep 2017, 10:12 pm   #36
cmjones01
Nonode
 
Join Date: Oct 2008
Location: Warsaw, Poland and Cambridge, UK
Posts: 2,669
Default Re: Help with 6802 Microcontroller

Congratulations on getting it going. The experience of working on a microprocessor circuit like this one will stand you in good stead. Simply knowing what the various bus and control signals are supposed to look like can tell you so much.

I do a certain amount of repair and restoration on 1970s and 1980s video arcade games, and they are mostly based around standard microprocessors with memories and acres of logic for generating graphics. Poking around with an analogue scope on the pins of the microprocessor and memories can often reveal problems: data bus pins with odd-looking waveforms, pins stuck at indeterminate logic levels, missing clocks, and so on. Though I'm armed to the teeth with logic analysis gear, I've never actually used it on vintage boards. Logic analysers are great for debugging a design, but less so, I find, for working on faulty hardware. The faults tend to be loose connections and faulty chips, which show up better in the analogue domain.

A useful trick, especially with RAM chips (the popular 2114-type 1k x 4 RAM turns up in lots of equipment and is notoriously unreliable) is 'piggybacking' - simply putting a known-good chip on top of the suspect device so all the pins are in contact. It also works surprisingly well with TTL logic and buffers. You can do it while the power's on. If nothing changes, the chip on the board is likely to be OK. If something changes, it was almost certainly faulty.

Chris
__________________
What's going on in the workshop? http://martin-jones.com/
cmjones01 is offline  
Old 23rd Sep 2017, 10:15 pm   #37
julie_m
Dekatron
 
Join Date: May 2008
Location: Derby, UK.
Posts: 7,735
Default Re: Help with 6802 Microcontroller

That logic analyser would also be a great tool for diagnosing faults on 1980s-era home computers (basically just an 8-bit micro being pushed very hard), which are now being rediscovered for their trendy "retro" value.

In fact, there's another forum user having trouble with an Amstrad 464 just a ferry crossing away from you. Could be worth exchanging PMs -- but then please post publicly if you discover anything that might be of benefit to readers in future.
__________________
If I have seen further than others, it is because I was standing on a pile of failed experiments.
julie_m is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 2:03 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 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.