In this paper implementation of selftuning digital PID controller on 8bit Freescale MC68HC908GB60 microcontroller which is intended for general purpose applications is described. Controller firmware was created on development board M68EVB908GB60 by Axiom manufacturing providing number of useful peripherals for comfortable application development. Controlled process is identified using modified recursive least squares method with adaptive directional forgetting resulting in δ model representation of controlled plant. This approach results in better numerical stability of identification process and allows lower sampling periods. Parameters of PSD controller are designed by pole placement method on the basis of estimated plant coefficients. Controller firmware was created in Freescale CodeWarrior integrated development environment in C and assembly language. Software works under realtime operating system RTMON for HCS08 which was created on our department. Controller was verified by temperature controlling of two different heat plant models. Delta models, Freescale MC68HC908GB60, microcontroller, pole placement, selftuning control. I. INTRODUCTION RESENTday very rapid progress in electronics and computer science influences all areas of human activities. Production technology improvements of new microcontrollers lead to their miniaturization, increased central processor unit performance, decreased power consumption and price. Thus modern 8bit onechip microcontrollers have enough computing power not only for simple control loops consisting of fixed parameters controllers like PS or PSD. They are able to handle tasks from the origin of modern control methods such as adaptive control. Due to some limitations, mainly in main memory capacity, microcontrollers cannot substitute powerful industrial PCs or special programmable logic controllers, which can work with number of control loops simultaneously. However, area of microcontroller usage is a bit different – in embedded systems that is in systems where are laid stress on low price, compact dimensions, low power consumption, high reliability and immunity against environmental influences and other specific requirements. This work presents implementation of selftuning digital PID controller on a member of wide family of 8bit Freescale HCS08 microcontrollers. Concretely was chosen general purpose 8bit Freescale MC68HC908GB60 microcontroller The work was performed with financial support of research project MSM7088352102. This support is very gratefully acknowledged. which is a part of development board M68EVB908GB60 by Axiom Manufacturing. First part of the paper describes implemented algorithms for process identification and PSD controller design using pole placement method. Next two chapters deal with hardware overview of selected microcontroller including evaluation board basic properties followed by software implementation. Last part of the paper is focused on experimental verification of designed controller. II. IMPLEMENTED ALGORITHMS    For process identification was used recursive least square algorithm with adaptive directional forgetting. In order to achieve lower sampling time periods and mainly better numerical stability of identification process forward δmodel was chosen: 0 1 = δ . (1) Identified system is described by second order transfer function in δrepresentation (2). () 2 1 2 2 1 α δ α δ β δ β δ + + + = (2) ARX regression model expressed in compact vector form is described by equation [1]: ( ) ( ) ( ) + Θ = 1 ) ( φ (3) where Θ T (k) is vector of parameters of identified system and φ(k1) is regression vector. ( ) [ ]   ,..., , , ,..., , 2 1 2 1 = Θ (4) ( ) ( ) ( ) )] ( ),..., 2 ( ), 1 ( , ,..., 2 ), 1 ( [ 1   = φ (5) Vector of parameter estimations is updated using: Selftuning Digital PID Controller Implemented on 8bit Freescale Microcontroller Petr Dostálek, Jan Dolinay, Vladimír Vašek and Libor Pekař P INTERNATIONAL JOURNAL OF MATHEMATICAL MODELS AND METHODS IN APPLIED SCIENCES Issue 4, Volume 4, 2010 274