Author Topic: A couple MC6809 questions  (Read 2414 times)

0 Members and 1 Guest are viewing this topic.

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4036
  • Country: nz
Re: A couple MC6809 questions
« Reply #25 on: March 17, 2023, 04:09:32 am »
PTM is pretty easy. Every modern microcontroller has internal timers.
 

Offline johnh

  • Regular Contributor
  • *
  • Posts: 213
  • Country: au
Re: A couple MC6809 questions
« Reply #26 on: March 17, 2023, 05:31:43 am »
I thought the HD63P01 where compatible  with the 6801, except you can mount a eprom on top

 

Offline metertech58761Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: A couple MC6809 questions
« Reply #27 on: March 17, 2023, 06:00:19 am »
brucehoult: One of the timers (programmable delay) should be trivial to replace in code - it's just seconds and fractions thereof.
The transmit clock should also be fairly easy as that's a 12.5kHz clock that is turned on and off as required.
The receive clock, though... it's an odd frequency and which is tied to the MPU's IRQ line.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14199
  • Country: de
Re: A couple MC6809 questions
« Reply #28 on: March 17, 2023, 08:32:35 am »
The timers of most "modern" (AVR , PIC,..) µCs should have no problem with genrating the delays and clocks. They should be more powerful than the 6840.

Many µCs also include comunication units that can handle most seriell transfer protocol. So one may be able to move even more to the hardware.

For relays there is usually no real need to use addition optocouplers, an extra diver transistor is already quite some extra isolation. Of cause it depends on the details if a realy is better places (e.g. supply or routing / leakage currents) in an isolated domain.
 

Offline metertech58761Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: A couple MC6809 questions
« Reply #29 on: March 17, 2023, 12:50:06 pm »
Kleinstein: The relay sense inputs are the only ones where I am thinking of adding optocouplers, as right now they are protected from excess voltage only by a set of resistors and diodes.

The two output relays would be run direct - one merely provides a contact closure for the device being tested while the other switches a circuit on the analog board between transmit and receive modes.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14199
  • Country: de
Re: A couple MC6809 questions
« Reply #30 on: March 17, 2023, 12:53:14 pm »
For an external input an optocoupler can make sense, also to avoid possible ground loops.
 

Offline metertech58761Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: A couple MC6809 questions
« Reply #31 on: March 23, 2023, 01:31:41 am »
While trying to make heads or tails of the code previously mentioned, I took another look at the schematic of the board that uses the 6801 variant and realize I have a question about IRQs.

I've attached the schematic of the full panel - the portion of interest is U10, pins 3 (IRQ2) and 4 (IRQ1).

This board is used in three products (FCT / LMT / DCT) - I'm only interested in those parts pertaining to the LMT version; I've already figured out the FCT version and want to eventually scrub everything specific to the DCT version.

Moving along -

U10 pin 3 is tied to the PIA (U14-37), and is likely for capturing some event on the PIA CB1 pin via pin J3-12 / U14-18.

U10 pin 4 is tied to the WD_I line from the watchdog (which is fed from the WD_O line on the PIA; I can see in the code where that line is periodically manipulated to satisfy the watchdog timing).

In the code, I have vectors to the 'internal' IRQ at $FFF6 and 'external' IRQ at $FFF8.

The internal IRQ code sets a bit in one memory location before jumping to a section of code where it messes with the PTM and PIA settings before falling into an infinite loop (until the next pulse appears on the NMI line).

The external IRQ code also manipulates a couple other variables before going into the same section as above.

FWIW, there is also a hook for SWI that follows roughly the same path as the internal IRQ code (but there are NO instances in the code at hand - any instances were likely contained in the daughterboard EPROM at $E000).

After all that...

What I want to do is to correlate the IRQ1 and IRQ2 lines to the "internal" / "external" IRQs as above, so I can try to get a better understanding of this code...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf