Page 1 of 1

IPC clock.....

Posted: Fri Jul 18, 2014 11:58 am
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.

Re: IPC clock.....

Posted: Fri Jul 18, 2014 12:09 pm
by 1024MAK
Does the information in this Wikipedia entry help ?

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

Mark

Re: IPC clock.....

Posted: Fri Jul 18, 2014 2:14 pm
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.

Re: IPC clock.....

Posted: Fri Jul 18, 2014 5:35 pm
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

Re: IPC clock.....

Posted: Tue Jul 29, 2014 8:00 pm
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