Sam, >Is it just for the programming state machine, in order not to "fry" >the memory if Tbus is too long, even if EE-clock would be within range? As the note at the top of page 26 in the EETS4K Block User Guide V02.06 states, the restriction is because of the effect of clock synchronization on the functional timings. Just keep the bus clock above 1MHz and you should be in good shape. I agree, the flow chart in Figure 4-1 is *very* confusing. Here's the assembly code I use for determining values for the ECLKDIV & FCLKDIV registers: ; OscClk: equ 16000000 Eclock: equ 24000000 ; final E-clock frequency (PLL) RefClock: equ 8000000 REFDVVal: equ (OscClk/RefClock)-1 SYNRVal: equ (fEclock/RefClock)-1 if OscClk>12800000 FCLKDIVVal: equ (OscClk/200000/8)+FDIV8 else FCLKDIVVal: equ (OscClk/200000) endif ; Regards, Gordon Sam Laur wrote: >Gordon Doughman wrote: > >>You do *not* need to change the values of the ECLKDIV & FCLKDIV >>registers when changing the bus clock frequency. The values written to >>the ECLKDIV & FCLKDIV registers is based on the oscillator frequency >>(EXTAL). >> > >I can see that, but why is Tbus (in any way) related to those values? >See for example S12EETS4KV2.pdf Figure 4-1 where Tbus is in many >places. If I say that that diagram is a bit complicated, it's an >understatement, but I digress. I see from the block diagram >though that it is related only to the oscillator clock. > >Is it just for the programming state machine, in order not to "fry" >the memory if Tbus is too long, even if EE-clock would be within range? > >With a 16 MHz crystal, switching the bus clock from 8 MHz to 24 MHz >shouldn't do anything to the EEPROM clock dividider, since the >Tbus is so short compared to the minimum 5 s criterion. > >Anyway, I should have done more of the unpopular RTFM activity before >posting here. The problem was indeed solved by setting ALTCLK to the >correct value. Now I can step right over the PLL setting instruction, >and the software goes on as if nothing special happened. > >Thanks for all the help. > >Best wishes, >Sam Laur >Aumec Systems Oy >-------------------- > >">http://docs.yahoo.com/info/terms/ > -- =============================================================== Gordon Doughman Ph: 937-438-6811 Motorola Semiconductor Fax: 937-434-7457 Field Applications Engineer Pager: 800-759-8352 Pin: 1304089 Suite 175 3131 Newmark Drive Miamisburg, OH 45342 Check out my HC12 book at: http://www.rtcbooks.com/programming.php |