IPC clock.....

Nagging hardware related question? Post here!
Post Reply
prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

IPC clock.....

Post by prime »

Hi all,

I tried searching the 8048 datasheet and either missed it or it isn't there......

The 8048 / 8049 IPC in the QL operates from an 11MHz crystal, but does anyone know what the relationship between clock cycles and instruction rate / machine cycles is ? I know that for the 8080 (and derivatives such as the Z80) the ratio is generally one machine cycle per 4 clock cycles.

Anyone know what the correct figure for the 8048 is ?

Cheers.

Phill.


User avatar
1024MAK
Super Gold Card
Posts: 593
Joined: Sun Dec 11, 2011 1:16 am
Location: Looking forward to summer in Somerset, UK...

Re: IPC clock.....

Post by 1024MAK »

Does the information in this Wikipedia entry help ?

See pages 13 and 14 of this document MCS-48 family architecture pdf

Mark


:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :)

QL, Falcon, Atari 520STFM, Atari 1040STE, more PC's than I care to count and an assortment of 8 bit micros (Sinclair and Acorn)(nearly forgot the Psion's)
prime
Trump Card
Posts: 192
Joined: Fri Feb 18, 2011 8:58 pm

Re: IPC clock.....

Post by prime »

Cheers Mark,

That's exactly what i needed.

Looking at that, the machine cycle of the IPC is 1/ (11MHz/3) = 272ns.

So in the keyboard read routine :

Code: Select all

05C8: 39      OUTL P1,A       output A on P1
05C9: AB      MOV  R3,A       
05CA: 80      MOVX A,@R0      put P0 in read mode=HI-Z ??
05CB: 00      NOP             wait a bit
05CC: 00      NOP             
05CD: 00      NOP             
05CE: 00      NOP             
05CF: 00      NOP             
05D0: 00      NOP             
05D1: 08      IN   A,P0       get P0 into A
05D2: 93      RETR            
It looks like I have about 2.72us between the out and the in if I where wanting to drive the keyboard lines externally with a microcontroller.

Cheers.

Phill.


Derek_Stewart
Font of All Knowledge
Posts: 4763
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: IPC clock.....

Post by Derek_Stewart »

Hi,

When not look at the 8049 disassembly, which is located in the Disassembly Section on Dilwyn's web site or QL Today DVD.

Derek


Regards,

Derek
Nasta
Gold Card
Posts: 462
Joined: Sun Feb 12, 2012 2:02 am
Location: Zapresic, Croatia

Re: IPC clock.....

Post by Nasta »

prime wrote:Cheers Mark,

That's exactly what i needed.
Looking at that, the machine cycle of the IPC is 1/ (11MHz/3) = 272ns.
Careful with that. The 8048 clock is divided by 3 from the crystal, but each cycle takes 4 clocks, so it's effectively 11MHz/12


Post Reply