Wednesday, July 7, 2010

ZiLOG Z8F64xx Timer Calculator

Sample code generator for ZiLOG's Z8F64xx Z8 Encore family of 8-bit Flash MCU's. Tested only with ZDSII v4.11 (C compiler-v3.60) on Z8F6423 running at 20MHz crystal. It's expected to work also with other parts, like Z8F6421 of e-Gizmo's IRC Slimboard. It generates sample codes of "timer interrupt" and "pulse width modulation(pwm)" for TIMER0, TIMER1, TIMER2, and TIMER3 peripherals. Please refer to the datasheet("part selection guide" table) of this family to see what timer peripherals are available on a particular part.

-----------------------------------------------------------------

Timer Interrupt Code Generator

System Clock Frequency: Hz
Select Timer Peripheral:
Desired Interrupt Rate: Hz


-----------------------------------------------------------------

PWM Code Generator

System Clock Frequency: Hz
Select Timer Peripheral:
Desired PWM Frequency: Hz
Initial PWM Duty Cycle: %

-----------------------------------------------------------------

note: I'm a newcomer to javascript. Please notify me of found "bugs" in these code makers.

-----------------------------------------------------------------