Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC32MZ interrupt speed

Status
Not open for further replies.

BillDee

New Member
Does anyone have an idea of whether the PIC32MZ (200 Mhz)
can process interrupts at 4 Mhz?
That's minimum. But what about 20 MHz?
With some "minimal (small-ish) amount of processing" for each interrupt sequence.

I want to fully emulate a CDP1802 microprocessor at chip-pin-signal level,
and I was thinking about running the XTAL clock pin
for the emulated chip as an interrupt of the PIC32MZ.

That way I could run it as a really fast 1802 (hopefully)
and also have it be plug-compatible so that it could be
used in any 1802 computer. (these mostly run at < 4 MHz)

I do need one to run VERY fast, at at least 20 MHz,
but that could be a mode -- "Run All Out".

If anyone has a suggestion for a better microcontroller to use,
PIC or other, I'm open to whatever.

TIA
 
Hi Bill , I started with 1802 in the 70's had some enjoyable coding ,had a 'DOS' running in 2k mem... actual instruction time was around 8 micro sec, 1802 @ 2Mhz, some opcodes are 2 machine cycles, PIC32 at 200mhz may be a bit over the top, PIC24 will do 70MIPS and easier to program in my opinion.
Edit , still have 1802 bible!
RCA1802.jpg
 
Last edited:
Hi Bill.. Welcome to the Forum.

Interesting question. If it weren't for your enhanced speed requirement I'd simply suggest augmenting a "real" CDP1802 with a PIC, AVR, or other microcontroller which can provide the clock, reset, loader, RAM, and some memory mapped I/O. I did something like this using a PIC last year and it worked quite well...

Cheerful regards, Mike
 

Attachments

  • Pocket 1802 Rev 3a (small).png
    Pocket 1802 Rev 3a (small).png
    471.7 KB · Views: 294
  • Pocket 1802 Rev 3 (small).png
    Pocket 1802 Rev 3 (small).png
    634.6 KB · Views: 322
  • 1802 Running.png
    1802 Running.png
    262.4 KB · Views: 290
PIC32 at 200mhz may be a bit over the top, PIC24 will do 70MIPS and easier to program in my opinion.

Thanks. I was looking at that, but thought 70 MIPS would be too slow. Someone already did this with a PIC (PIC16F886 IIRC),
which I haven't completely looked at yet, that could run at 40 MIPS, and he said was pushing it to make it effectively run at
1.7 MHz "output". (to emulate the 1861 Pixie video chip, too) I think he was running it at either 7 or 14 MHz, and then
multiplying it by 4 using the PLL. (not completely sure why about that last)

It's the NMI that I'm also concerned about. Not only emulating the 1802 instruction set, but also the hardware signals,
all within an Interrupt Service Routine, at up to 4 MHz and ideally up to 20 MHz.
 
I did something like this using a PIC last year and it worked quite well...

Thanks. Yes, I've looked at your stuff and would like to mess with that, as well.
But IIRC you don't have a website with the code and such available, right?
Just those nice photos that show how you did it hardware-wise?
Are those good enough to completely allow someone to make the hardware?
And what about the software?
 
Bill. a quick pencil to paper + calculator ... a 20Mhz 1802 will have a machine cycle ( PIC interrupt) of 400 ns , a PIC24 @ 70MIPS has instruction cycle of 14 ns , 400/14 = 28.57 PIC instructions.... not many although a good many 1802 instructions are simple bit manipulation , interrupt over head i guess is not many , the 1802 instruction 'look up ' may be difficult , what MIPS for a 32MZ ?
 
32MZ quote DMIPS , ( scratch head ) , actually a 16 bit PIC will be a sinch for the 1802s 16 x 16 bit data registers, you need 38 IO something like a 53 I/O dsPIC33EV256GM106 ( think right) will do 5v as well + 16k ram, put one on a breakout board and give it a whirl..

Edit could you write some 1802 instructions in PIC asm ....
 
32MZ quote DMIPS , ( scratch head ) , actually a 16 bit PIC will be a sinch for the 1802s 16 x 16 bit data registers, you need 38 IO something like a 53 I/O dsPIC33EV256GM106 ( think right) will do 5v as well + 16k ram, put one on a breakout board and give it a whirl..

Edit could you write some 1802 instructions in PIC asm ....

Yeah.
It does, ideally, also need to be 5V. I don't want to mess with 3V <==> 5V interfacing.
They're cheap enough that I can breadboard one, hook up a freq gen to the NMI,
and write a routine to count how many instruction cycles can execute before
the next interrupt. That will give me absolute real-world values.

I'm also looking at GHz microcontrollers. Or even microprocessors.
It's just a matter of how much external logic you need for support / i/o / memory.

I need something fast enough that you could, for example, make a hardware
"debugger" with full data displays (LEDs) and be able to monitor a 4 MHz 1802's
databus and be able to monitor and interpret code execution and accumulator/register
values and such. And I want the program that does all that to also be 1802 code.
(instead of using the native microcontroller and its code to do it, which would obviously be easier)
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top