 2010 6 TH INTERNATIONAL CONFERENCE ON ELECTRICAL AND POWER ENGINEERING 28-30 October 2010 - Ia•i, Romania VIDEO OUTPUT FOR INDUSTRIAL EMBEDDED SYSTEMS Lajos Losonczi 1) , and Iuliu Szekely 2) 1) Lambda Communications Ltd., Tg.Mures, Romania 2) Sapientia University of Tg.Mures, Romania Abstract This paper is presenting the authors' realization of an original, tested and applied PAL-TV video driver dedicated for embedded control systems. The application is based on the P8X32A microcontroller, which gives an optimal solution with a reduced number of components. Practical application is described. Keywords Video, PAL, Embedded Systems, Propeller Chip 1. INTRODUCTION Embedded systems are a necessary part of life. The competition to improve productivity and lifestyle has led to the proliferation of embedded microprocessors into many common everyday devices. The technological evolution encourages the study and the realization of new architecture based on little devices with high computational power to carry out these tasks. Appearance on the market the multicore microcontroller Propeller-P8X32A made by Parallax Inc., allows the development of many complex driver and interface, for which since not a long time, there were used industrial microcomputers modules or specialized FPGA circuits. Implementing a video driver, to generate complex PAL- TV video signal and display a full frame of 256x240 pixels can be made relatively easy using this chip and some passive electronic components. The application does not exhaust the system resources, which can control simultaneously the embedded process. 2. HARDWARE PLATFORM The Propeller chip is designed to provide flexibility and high-speed processing for embedded systems, through its eight processors, called Cogs, that can perform simultaneous tasks independently or cooperatively, sharing resources through a central Hub, all while maintaining a relatively simple architecture that is easy to learn and use [1]. Common resources (I/O pins and the System Counter) can be accessed at any time by any number of Cogs. As shown in Fig. 1, mutually-exclusive resources (RAM, ROM, Configuration, Control), can also be accessed by any number of Cogs, but only by one Cog at a time, and the access to them is controlled by the Hub. Each Cog has its own RAM, called CogRAM (2kB configured as 512x32bits), and can be started and stopped at run time and can be programmed to perform tasks simultaneously, either independent or with coordination from other Cogs through HubRAM (32kB). The Hub controls the access to mutually-exclusive resources by giving each Cog a turn in a "round robin" fashion. The Hub and its bus run at half the System Clock rate, giving a Cog access to resources once every 16 clock cycles. The Propeller application designer has full control over how and when each Cog is employed [2] Fig.1 - Hub and Cog interaction A shared System Clock (CLKFRQ) allows each Cog to maintain the same time reference, allowing true synchronous execution. A typical way to run the chip at the maximum frequency of 80MHz is to use an external crystal oscillator of 5MHz and to enable the clock PLL to multiply clock frequency by 16. This method is also used in the submitted application (CLKFRQ=80MHz). The chip has two major modules, which we can use for video signal generation: Cog Counters and Video Generator. 2.1 Cog Counters Each Cog has two counter modules: CTRA and CTRB. The Counter module can perform conditional 32 bit accumulation of its FRQ register into its PHS register on every clock cycle (Fig.2). FRQ holds the value that will be accumulated into the PHS register. PHS not only can it be written and read via Cog instructions, but it also functions as a free-running accumulator, summing the FRQ register into itself on potentially every clock cycle. Each counter module also has its own phase-locked loop (PLL), which can be used to synthesize frequencies up to 128 MHz. With a little setup or oversight from the Cog, each counter can be used in 32 basic operating modes.