| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
Alarm Control Panel Reference Design Designer Reference Manual
Top Searches for this datasheetAlarm Control Panel Reference Design Designer Reference Manual HCS12 Microcontrollers DRM008/D Rev. 11/2002 MOTOROLA.COM/SEMICONDUCTORS More Information This Product, www.freescale.com More Information This Product, www.freescale.com Alarm Control Panel Reference Design Designer Reference Manual Oliver Thamm Elektronikladen Mikrocomputer GmbH W.-Mellies-Str. 32758 Detmold, Germany Email: othamm@hc12web.de Elektronikladen member Motorola's Design Alliance Program. More information found author's project page: http://hc12web.de/acprd Alarm Control Panel purchased http://www.elektronikladen.de http://www.starterGATE.com Motorola registered trademarks Motorola, Inc. DigitalDNA trademark Motorola, Inc. Motorola, Inc., 2002 DRM008 MOTOROLA Designer Reference Manual More Information This Product, www.freescale.com Designer Reference Manual DRM008 MOTOROLA More Information This Product, www.freescale.com Designer Reference Manual DRM008 List Paragraphs List Paragraphs. Table Contents List Tables List Figures Section Introduction Section Getting Started Section Hardware Description Section Software Description Section Literature Section Appendix Glossary. DRM008 MOTOROLA Designer Reference Manual List Paragraphs More Information This Product, www.freescale.com List Paragraphs Designer Reference Manual List Paragraphs More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Table Contents List Paragraphs Table Contents List Tables List Figures Section Introduction Contents Scope Reference Design Overview Alarm Control Panel Contents Reference Design Section Getting Started Contents Turning Alarm Control Panel. Main Menu Control Panel Control Panel Disable Alarm Configuration Alarm Lines Alarm Status Lines Configuration Alarm Control Panel DRM008 MOTOROLA Table Contents More Information This Product, www.freescale.com Designer Reference Manual Table Contents Section Hardware Description Contents Hardware Overview MC9S12DP256 Microcontroller S12compact Controller Module ACPRD Carrier Board Section Software Description Contents Software Overview Software Module Details. build project Section Literature Contents Documentation ACPRD Section Appendix Contents Glossary Designer Reference Manual Table Contents More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 List Tables Table Title Page Alarm Line input values Interface Specification Graphical LCD. Function each power channel. Audio Output Options S12compact Bill Materials ACPRD Carrier Board Bill Materials DRM008 MOTOROLA List Tables More Information This Product, www.freescale.com Designer Reference Manual List Tables Designer Reference Manual List Tables More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 List Figures Figure 3-10 3-11 3-12 3-13 3-14 3-15 3-16 3-17 3-18 3-19 Title Page Overview Alarm Control Panel S12compact Controller Module Interfaces Alarm Control Panel. after start Alarm Control Panel Main Menu Alarm Control Panel. Arming Alarm Control Panel Configuration Alarm Lines Alarm Status lines. Configuration Alarm Control Panel standard terminal Hardware Overview Block diagram MC9S12DP256 microcontroller Power Supply MC9S12DP256 microcontroller Reset generation MC9S12DP256 microcontroller Clock generation MC9S12DP256 microcontroller interface Parallel Output Parallel Input Chip Select decoding Serial Communication Interface MC9S12DP256 Interface MC9S12DP256 Buzzer Interface Connectors Multiplexed External Interface Connectors S12compact Module Voltage Regulator Alarm Control Panel Analog Digital Converter Signal Conditioning. Alarm line scheme Temperature Sensor. RS232 transceiver SCI0 DRM008 MOTOROLA Designer Reference Manual List Figures More Information This Product, www.freescale.com List Figures 3-20 3-21 3-22 3-23 3-24 3-25 3-26 3-27 3-28 3-29 Switch SCO0 mode Socket Modem SCI0 driver SCI1 Interface Graphical Interface Rotary Encoder Interface Switch High Power Driver. Push button switches optional LEDs Selection Audio Outputs External connections Alarm Control Panel Module Structure Alarm Control Panel software. Schematics S12compact module (Part Schematics S12compact module (Part Schematics S12compact module (Part Parts Location Diagram S12compact module Schematics ACPRD Carrier Board (Part Schematics ACPRD Carrier Board (Part Parts Location Diagram ACPRD Carrier Board Designer Reference Manual DRM008 List Figures More Information This Product, www.freescale.com MOTOROLA Designer Reference Manual DRM008 Section Introduction Contents Scope Reference Design Overview Alarm Control Panel Contents Reference Design Scope Reference Design reference design developed demonstrate capabilities HCS12 wide range different applications. This done using example networkable Alarm Control Panel. Alarm Control Panel reference design based MC9S12DP256 MCU. modular design, using several peripherals features HCS12, enabling maximum reuse following: General HCS12 setup (including interrupts) (for connection sensor node, modem) (for connection with input output devices) (for sensing alarm lines) Output Compare Channel generate sound flash LED) Input Capture Channel sense rotary encoder) EEPROM store configuration data) Port Pins drive LCD) Furthermore several important software hardware technologies explained: DRM008 MOTOROLA Introduction More Information This Product, www.freescale.com Connection industrial standard graphical HCS12 Designer Reference Manual Introduction Graphical user interface HCS12 Connection sensor node using interface Connection standard modem HCS12 reference design consists hardware, software documentation. detailed documentation created that functions hardware software easy understand. Overview Alarm Control Panel Alarm Control Panel (Figure 1-1) consists main units: Carrier Board S12compact Controller Module (Figure 1-2). S12compact Controller Module small printed circuit board that holds microcontroller unit (MCU) well standard circuitry clock reset generation, power supply decoupling, plus number additional input/output devices. Carrier Board provides number peripheral devices used perform specific functions Alarm Control Panel application. Carrier Board equipped with connections alarm sensors, flashlight, siren power supply. also sockets graphical LCDisplay, modem S12compact Controller Module. main components Alarm Control Panel shown Figure 1-1. Designer Reference Manual Introduction More Information This Product, www.freescale.com DRM008 MOTOROLA MOTOROLA Carrier Board Dial User (turn click) Temperature S12compact Cont Socket Modem Internet Connecti Switch Configuration Switch Sound Outpu Telephone Line RS232 Interface Interface Networked Sens (e.g. Smoke Detector, PIR) Alarm Line Alarm Output Signal Relay Switched Outputs Standard Siren Flashlight DRM008 Graphical dots Pushbuttons User Inputs Introduction More Information This Product, www.freescale.com Power Supply Voltage Input (Sensed ADC) Battery Voltage Input (Sensed ADC) Figure 1-1. Overview Alarm Control Panel Alarm Lines Standard Industrial Alarm Switches Introduction Overview Alarm Control Panel Designer Reference Manual Introduction Figure 1-2. S12compact Controller Module Alarm Control Panel Reference Design provides variety Interfaces (Figure 1-3). Alarm Signal Output Switched Flashlight Alarm Output Switched Siren Alarm Output Interface Interface Wall Plug Power Supply Input 12-14 Battery Power Supply Input 11-12 Audio Output Telephone Line Interface RS232 Interface Figure 1-3. Interfaces Alarm Control Panel detailed description Section Designer Reference Manual Introduction More Information This Product, www.freescale.com Standard Alarm Sensor Input Lines DRM008 MOTOROLA Introduction Contents Reference Design possible connect industrial standard alarm sensors input lines 1-3. These alarm sensors connected structure, input line serve more than sensor. input line used connect networked sensor (Local Interconnect Network) (Controller Area Network) interface. Those networked sensors will described detail later application note. Contents Reference Design complete Reference Design contains: Reference Design Board including Bill materials (BOM) layout files (Gerber) Fully documented Firmware HCS12 language, including drivers, function libraries sample application. DRM008 MOTOROLA Designer Reference Manual Introduction More Information This Product, www.freescale.com Introduction Designer Reference Manual Introduction More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Section Getting Started Contents Turning Alarm Control Panel. Main Menu Control Panel Control Panel Disable Alarm Configuration Alarm Lines Alarm Status Lines Configuration Alarm Control Panel Turning Alarm Control Panel order switch Reference Design user should connect power supply power supply input. Alarm Control panel comes with alarm sensor dummy connected sensor Input line This sensor dummy used demonstrate features reference design. Figure 2-1. after start Alarm Control Panel DRM008 MOTOROLA Getting Started More Information This Product, www.freescale.com Designer Reference Manual Getting Started After Reference design been switched graphical Display shows User Interface: side Display there Status line which displays current status: Time, Date, Supply Voltage, Battery Voltage, Temperature. right side there Main Menu Configuration Alarm Control Panel using rotary encoder (Jog Dial: turn click). middle there Alarm Status Display which shows: global Status Alarm Control Panel (Armed disabled) Configuration each Alarm Line Alarm Status each Alarm Line bottom functions four push buttons User Inputs displayed. Note, that there different functions depending chosen main menu. Main Menu Control Panel Figure 2-2. Main Menu Alarm Control Panel Main Menu Alarm Control Panel displayed Figure 2-2. selection Main Menu made turning Dial (Rotary Encoder) pressing following Menu functions available: Designer Reference Manual Getting Started More Information This Product, www.freescale.com DRM008 MOTOROLA Getting Started Control Panel Disable Alarm 2.3.1 Arm/Disable This function switch Alarm globally. 2.3.2 Reset Lines This function used Reset Input Lines after Alarm Event. 2.3.3 Setup Lines This function configures four Alarm Lines. 2.3.4 Tim/Dat This function changes Time Date. 2.3.5 Remote Control This function setup system connect modem. current Reference Design modem function implemented. will described later Application Note. 2.3.6 EntertainMe This function used switch Special Mode Trade Show Demonstrations off. Entertainment mode, Reference Design blinks melody played. Control Panel Disable Alarm order Alarm Control Panel, "Arm/Disable" click Jog. status symbol Display changes from Minus Check Mark (Figure 2-3). DRM008 MOTOROLA Getting Started More Information This Product, www.freescale.com Designer Reference Manual Getting Started Figure 2-3. Arming Alarm Control Panel When Alarm occurs, following happens: Check Mark symbol changes Bell blue Alarm Control Panel flashes enabled, siren tone sounded loudspeaker output relays switch siren flashlight outputs external sirens flashlights. disable Panel switch Alarm off, click again. Alternatively, push buttons used. actual functions push buttons displayed Display. real Alarm Control Panel application, function disabling Alarm would secured with code, possible intruder cannot switch Alarm. This function implemented reference design. Designer Reference Manual Getting Started More Information This Product, www.freescale.com DRM008 MOTOROLA Getting Started Configuration Alarm Lines Configuration Alarm Lines order configure Alarm Lines, select "Setup Lines" turning Dial pressing Then select line configured clicking Dial. line that currently configured will indicated arrow pointing line. Choose configuration selected line turning Dial. Each Alarm Line have five configurations. When have configured line, select next Line pressing Dial. Line Enabled, Loud Alarm Line Enabled, Silent Alarm Line Enabled, Delayed Loud Alarm Line Enabled, Delayed Silent Alarm Line Disabled Select "Setup Lines" turning Dial Select Line configured clicking Dial Select Configuration turning Dial Select next Line clicking Dial Figure 2-4. Configuration Alarm Lines Each Alarm Line have five following Configurations: Line Enabled, Loud Alarm: This default configuration Alarm Line after Reset. DRM008 MOTOROLA Getting Started More Information This Product, www.freescale.com Designer Reference Manual Getting Started Line Enabled, Silent Alarm: would choose this configuration possible burglar should notice immediately that alarm been released. Line Enabled, Delayed Loud Alarm: This option delays arming Alarm Control Panel seconds. would choose this configuration wish leave your house. Line Enabled, Delayed Silent Alarm: This configuration combination above. Line Disabled: This configuration option switches line. This default configuration Alarm Lines after Reset. Alarm Status Lines Alarm Status lines shown figure 2.5. Line enabled: Event Line occurs, will trigger Alarm. delayed Line would release Alarm after seconds. Alarm Event: Alarm Event sensed Line Alarm Latched: Even Alarm Event disappears, still latched. switch Alarm, Line reset. Alarm Line Tampered: been sensed that Alarm Line does work properly. possible reason attempt manipulate Alarm Line (for example, shorten wires). Since standard demo version Alarm Control Panel does have sensors Alarm Lines 2-4, display will show that these Alarm Lines have been tampered with. Figure 2-5. Alarm Status lines Designer Reference Manual Getting Started More Information This Product, www.freescale.com DRM008 MOTOROLA Getting Started Configuration Alarm Control Panel Line enabled Event that Line occurs, will trigger Alarm. delayed Line would release Alarm only after seconds. When Alarm Event sensed, Status display will show bells ringing. Alarm Event also latched, that means: Even Alarm Event disappears, still know that there Alarm. switch off, Line reset manually. Alarm Line tampered with, that means been sensed that Alarm Line does work properly. possible reason attempt manipulate Alarm Line (for example, shorten wires). Since standard demo version Alarm Control Panel does have sensors Alarm Lines 2-4, display will show that these Alarm Lines have been tampered with. However, these Lines disabled, they trigger Alarm. Configuration Alarm Control Panel possible configure Alarm Control Panel standard terminal Personal Computer. this purpose, terminal should connected RS232 interface Alarm Control Panel. switch configuration should position RS232 communication. other position switch should used modem communication. communication modem described this reference design will subject later Application Note. DRM008 MOTOROLA Getting Started More Information This Product, www.freescale.com Designer Reference Manual Getting Started Figure 2-6. Configuration Alarm Control Panel standard terminal Designer Reference Manual Getting Started More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Section Hardware Description Contents Hardware Overview MC9S12DP256 Microcontroller S12compact Controller Module ACPRD Carrier Board Hardware Overview Alarm Control Panel Reference Design (ACPRD) hardware consists main units: ACPRD Carrier Board S12compact Controller Module. ACPRD Carrier Board provides number peripheral devices, which used perform specific functions Alarm Control Panel application. Carrier Board equipped with connections alarm sensors, flashlight, siren power supply. also sockets graphical LCDisplay, modem S12compact Controller Module. S12compact Controller Module small printed circuit board that holds MC9S12DP256 microcontroller unit (MCU) well standard circuitry clock reset generation, power supply decoupling, plus number additional input/output devices. S12compact Controller Module optionally equipped with memory expansion, which mainly targeted debugging aid. DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description Figure 3-1. Hardware Overview MC9S12DP256 Microcontroller MC9S12DP256 microcontroller unit (MCU) contains 16-bit central processing unit (HCS12 CPU), 256K bytes Flash EEPROM, bytes RAM, bytes EEPROM large number standard on-chip peripherals, such SCI, SPI, CAN, IIC, Timer, PWM, Input-/Output-Channels. MC9S12DP256 full 16-bit data paths throughout. inclusion circuit allows power consumption performance adjusted suit operational requirements. main features MC9S12DP256 listed below[1]: 16-bit HCS12 Operation 50MHz Clock 25MHz Speed Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description MC9S12DP256 Microcontroller CRG: current oscillator, PLL, reset, clocks, watchdog, real time interrupt, clock monitor MEBI: Multiplexed External Interface I/O: 8-bit 4-bit ports with interrupt functionality FLASH: 256K bytes EEPROM: bytes RAM: bytes ATD: 8-channel Analog-to-Digital Converters with 10-bit resolution CAN: five second, software compatible modules ECT: Enhanced Capture Timer with 16-bit main counter, programmable input capture output compare channels 8-bit 16-bit pulse accumulators PWM: eight channels, programmable period duty cycle, 8-bit 8-channel 16-bit 4-channel, fast emergency shutdown input SCI: asynchronous Serial Communications Interfaces SPI: three Synchronous Serial Peripheral Interface BDLC: Byte Data Link Controller IIC: Inter-IC Bus, compatible with standard, multi-master operation 112-Pin LQFP package Supply: operating voltage, internal voltage regulator 2.5V core voltage, lines with input drive capability Development support: single-wire background debugmode (BDM), on-chip hardware breakpoints Figure shows block diagram MC9S12DP256. DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description 256K Byte Flash EEPROM Byte Byte EEPROM VDDR VSSR VREGEN VDD1,2 VSS1,2 BKGD VDDPLL VSSPLL EXTAL XTAL RESET TEST ATD0 VDDA VSSA PAD00 PAD01 PAD02 PAD03 PAD04 PAD05 PAD06 PAD07 ATD1 VDDA VSSA VDDA VSSA PAD08 PAD09 PAD10 PAD11 PAD12 PAD13 PAD14 PAD15 XADDR14 XADDR15 XADDR16 XADDR17 XADDR18 XADDR19 Voltage Regulator PIX0 PIX1 PIX2 PIX3 PIX4 PIX5 IOC0 IOC1 IOC2 IOC3 IOC4 IOC5 IOC6 IOC7 Single-wire Background Debug Module Clock Reset Generation Module CPU12 DDRK PPAGE Periodic Interrupt Watchdog Clock Monitor Breakpoints XIRQ System Integration LSTRB Module ECLK (SIM) MODA MODB NOACC/XCLKS DDRT DDRS DDRE Enhanced Capture Timer SCI0 SCI1 Multiplexed Address/Data SPI0 DDRA MISO MOSI DDRB CAN0 ADDR15 ADDR14 ADDR13 ADDR12 ADDR11 ADDR10 ADDR9 ADDR8 CAN1 CAN2 CAN3 DATA15 DATA14 DATA13 DATA12 DATA11 DATA10 DATA9 DATA8 Multiplexed Wide DATA7 DATA6 DATA5 DATA4 DATA3 DATA2 DATA1 DATA0 CAN4 RXCAN TXCAN RXCAN TXCAN RXCAN TXCAN RXCAN TXCAN RXCAN TXCAN Module Port Routing BDLC (J1850) PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 MISO MOSI MISO MOSI Internal Logic 2.5V VDD1,2 VSS1,2 Driver VDDX VSSX Multiplexed Narrow KWJ0 KWJ1 KWJ6 KWJ7 KWP0 KWP1 KWP2 KWP3 KWP4 KWP5 KWP6 KWP7 KWH0 KWH1 KWH2 KWH3 KWH4 KWH5 KWH6 KWH7 DATA7 DATA6 DATA5 DATA4 DATA3 DATA2 DATA1 DATA0 DDRP DDRJ 2.5V VDDPLL VSSPLL Converter Voltage Regulator Reference VDDA VSSA Voltage Regulator VDDR VSSR SPI1 DDRH SPI2 Figure 3-2. Block diagram MC9S12DP256 microcontroller Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Signals shown Bold available Package DDRM ADDR7 ADDR6 ADDR5 ADDR4 ADDR3 ADDR2 ADDR1 ADDR0 P Hardware Description S12compact Controller Module S12compact Controller Module 3.4.1 Controller Core, Power Supply Figure 3-3. Power Supply MC9S12DP256 microcontroller nominal operating voltage MC9S12DP256 (IC1) three supply pairs: VDDR/VSSR, VDDX/VSSX VDDA/VSSA. Internally, uses core voltage only 2.5V. necessary voltage regulator already included chip, well I/O-buffers input/output pins. Therefore, behaves like device from external point view. There just exception, DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description signals oscillator based core voltage must driven levels. high level VREGEN needed enable internal voltage regulator. three terminal pairs mentioned above must decoupled carefully. ceramic capacitor least 100nF should connected directly each pair (C15, C16, C17). recommended 10µF (electrolytic tantalum) capacitor node, especially some port pins loaded heavily (C5, C7). Special care must taken with VDDA, since this reference point (VDDA/2) internal voltage regulator. internal core voltage appears pairs VDD1/VSS1, VDD2/VSS2 VDDPLL/VSSPLL, which also have decoupled (C19, C20, C21). static current draw from these terminals allowed. This especially true VDDPLL, which serves reference point external loop filter combination (R3, C4). There pins (VRH/VRL) define upper lower voltage limits internal analog digital (ATD) converter. While grounded, usually tied VDDA. used decoupling. supplied externally after opening solder bridge BR1. This useful main supply desired tolerance band should work with reference value lower than must exceed VDDA, regardless selected supply mode. TEST used factory testing only, application circuit this always grounded. Designer Reference Manual DRM008 Hardware Description More Information This Product, www.freescale.com MOTOROLA Hardware Description S12compact Controller Module 3.4.2 Reset Generation Figure 3-4. Reset generation MC9S12DP256 microcontroller RESET MCU's active bidirectional reset pin. input initializes asynchronously known start-up state. open-drain output indicates that system reset (internal MCU) been triggered. HCS12 already contains on-chip reset generation circuitry including power-on reset, watchdog timer clock monitor. however, necessary external Voltage Inhibit (LVI) circuit, also referred "reset controller". task this reset controller issue stable reset condition power supply falls below level required proper operation. prevent collisions with bidirectional RESET MCU, circuit open-drain output. inactive state pulled-up high resistor detector threshold typically 4.6V, which slightly higher than required minimum operating voltage 4.5V. Furthermore, capable stretching reset output filter short pulses power supply effectively. duration that delay selected using capacitor C14. value 100nF results delay approx. 50-80ms. important note, that this delay will only applied during power cycle event. will stretch pulses coming from MCU's internal reset sources. This important, since otherwise would able detect source reset. This would finally lead wrong reset vector fetch could crash whole system. Please aware, DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description that also capacitor reset line would cause same fatal effect, therefore external circuitry connected RESET HC12/HCS12 should never include large capacitance! 3.4.3 Clock Generation Figure 3-5. Clock generation MC9S12DP256 microcontroller on-chip oscillator MC9S12DP256 generate primary clock (OSCCLK) using quartz crystal (Q1) connected between pins EXTAL XTAL. allowed frequency range 0.5-16MHz. usual, load capacitors part oscillator circuit (C1, C2). However, this circuit modified compared standard Pierce oscillator that used HC11 most HC12 derivatives. MC9S12DP256 uses Colpitts oscillator with translated ground scheme. main advantage very current consumption, although component selection more critical. Reference Design circuit uses automotive quartz from together with load capacitors only 3.9pF. Furthermore, special care taken design introduce little stray capacitance possible respect XTAL XTAL. With OSCCLK 16MHz, internal speed (ECLK) becomes 8MHz default. realize higher clock rates, engaged. MC9S12DP256 operated with speed 25MHz, though most designs 24MHz because this value better basis generate wide range baud rates. passive external loop filter must placed pin. filter (R3, second-order, low-pass filter eliminate input Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description S12compact Controller Module ripple. value external filter network reference frequency determines speed corrections stability PLL. usage required, tied VDDPLL. choice filter component values always compromise over lock time stability loop. 10kHz loop bandwidth damping factor good starting point calculations. With quartz frequency 16MHz desired clock 24MHz, possible choice 4.7k 22nF. should approximately (1/20-1/10) e.g. 2.2nF case. Please refer chapter "XFC Component Selection" MC9S12DP256B Device User Guide details calculate loop filter values other system configurations. alternative, external clock source used MC9S12DP256 internal oscillator disabled applying level XCLKS during reset. Since this option used S12compact Controller Module, used pull XCLKS high. Please note, that other HCS12 derivatives will have different features associated with XCLKS pin. 3.4.4 Operating Modes, Support Three pins HCS12 used select operating mode: MODA, MODB BKGD (=MODC). While MODA MODB pulled (R1, select Single Chip Mode, BKGD pulled high (R7) default. consequence, will start Normal Single Chip Mode, which most common operating mode application code running HCS12. HCS12 operating mode used download debugging called Background Debug Mode (BDM). active immediately reset mode pins MODA/MODB/BKGD configured Special Single Chip Mode. This done pulling BKGD during reset, while MODA MODB also pulled-down. Because only BKGD level different modes, quite easy change over. However, there need switch BKGD line manually jumper solder bridge because this done DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description BDM-Pod attached connector X1A. Such BDM-Pod required BDM-based download and/or debugging anyway, handle this task automatically, usually controlled PC-based debugging program. Figure 3-6. interface 6-pin header uses suggested standard BDM12 connector layout. Connector carries additional signals, which normally needed BDM12 debugging. Some debuggers, however, provide additional features, which rely presence these supplemental signals. 3.4.5 Subsystem While MC9S12DP256 provides large number versatile general-purpose I/O-ports, desirable some applications keep number ports unused. This especially case external interface intended used. Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description S12compact Controller Module Figure 3-7. Parallel Output preferred provide additional input output ports Serial Peripheral Interface (SPI) modules MC9S12DP256. quite easy create eight additional binary outputs adding shift register like IC9. addition signals, MOSI SCK, only chip select signal (SPICS5) needed operate IC9. This shift register asynchronous reset input both shift register output latch, output lines PO0-PO7 will drive L-level reset automatically. Figure 3-8. Parallel Input Using same port, provides eight additional input pins. chip selects (SPICS3 SPICS4) needed latch input DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description information coming from PI0-PI7 shift data MISO respectively. IC6A needed decouple push/pull-output from MISO, order allow multiple slaves same port. Figure 3-9. Chip Select decoding chip select signals derived from port pins PH[4-6]. decoder chip activates it's eight low-active outputs depending Port pattern. This provides economical provide eight chip selects with small number resources. 3.4.6 Physical Interface Drivers Figure 3-10. Serial Communication Interface MC9S12DP256 industry standard RS232 line transceiver circuit. connected SCI0, which first asynchronous serial communications channel MC9S12DP256. addition receive transmit lines Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description S12compact Controller Module (RXD0, TXD0), general purpose I/Os (PM2, PM3) used hardware handshake lines. RS232 transceiver needed, easily uncoupled opening four solder bridges BR4-BR7. Figure 3-11. Interface MC9S12DP256 serves physical interface, connected first module (CAN0) MC9S12DP256. high-speed interface chip commonly used industry applications. determines slope control setting. termination resistor, required S12compact last node chain. should closed this case, otherwise opened. Figure 3-12. Buzzer Interface DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description There S12compact Controller Module which driven buffer IC6C. signal XCLKS used select clock options during reset. freely used I/O-signal after reset. IC6D another buffer gate, connected port drives small sound transducer (buzzer). must closed order enable buzzer function. 3.4.7 External Interface ports (partly) related Multiplexed External Interface (MEBI). signals accessible header connectors (X7, X8). Figure 3-13. Connectors Multiplexed External Interface small memory expansion plugged onto these connectors, which especially useful debugging purposes (Flash emulation). Multiplexed External Interface used (default) ports used general-purpose I/O-ports. 3.4.8 Circuit Options desired, S12compact Controller Module equipped with additional peripheral function blocks: with clock/calendar with channels Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board with channels MByte Serial Data Flash Full-Speed USB2.0 interface None these circuit options currently necessary Alarm Control Panel Reference Design. However, they provided demonstrate simplicity adding various peripheral hardware blocks HCS12 using simple serial connections SCI. ACPRD Carrier Board 3.5.1 S12compact Module Socket Figure 3-14. Connectors S12compact Module DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description S12compact Controller Module equipped with double header connectors along both edges. ACPRD Carrier Board, corresponding socket strips (X4, available easily connect both boards. 3.5.2 Voltage Regulator, Power Figure 3-15. Voltage Regulator Alarm Control Panel step-down switching voltage regulator, capable driving load with very good line load regulation. fixed output voltage requires only four external components. Compared traditional, linear (3-terminal) regulators, switched device offers high efficiency, therefore heat sink very small. presence power output indicated input voltage high 20VDC, nominal value 12-16VDC main power input 10-12VDC backup battery input ST1. Under normal conditions, main voltage should always higher than battery voltage. Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board 3.5.3 Signal Conditioning, Power Line Battery Sensing, Alarm Line Sensing Figure 3-16. Analog Digital Converter Signal Conditioning voltage level main power input battery backup input measured PAD06 PAD07, respectively. These signals inputs HCS12 on-chip analog digital (ATD) converter. input voltage levels decreased fourth using resistor divider R3/R5 R4/R6 order input voltage range which 0-5V. filter capacitors remove ripple from unregulated input. ACPRD three independent Alarm Line channels. Each Alarm line consists resistor divider, which partly formed from exterior DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description alarm loop partly from components ACPRD Carrier Board. first Alarm Line channel, R24, C22, provide some (basic) noise overvoltage protection. upper resistor divider chain. Figure 3-17 shows principle operation such alarm line. Figure 3-17. Alarm line scheme alarm contact normally closed. this case, only resistor contributes external resistor value Rext. will open alarm situation detected. result, together form lower part (Rext) resistor divider chain. alarm line tampered with, either alarm loop shortened (Rext=0) (Rext=00). all, there four possible input values, following table summarizes: Status okay alarm short Rext PAD0x Table 3-1. Alarm Line input values Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board This kind alarm contact configuration known (normally closed) alarm loop with (end-of-line) termination. 3.5.4 Temperature Sensor Figure 3-18. Temperature Sensor precision Celsius temperature sensor which delivers output voltage linearly proportional ambient temperature. scale factor 10mV/°C, therefore delivers output 100°C delivers 1.00V nominally. output connected channel PAD00. DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description 3.5.5 RS232 Transceiver Figure 3-19. RS232 transceiver SCI0 industry standard RS232 line transceiver circuit. connected SCI0, which first asynchronous serial communications channel MC9S12DP256. addition receive transmit lines (RXD0, TXD0), general purpose I/Os (PM2, PM3) used hardware handshake lines. ACPRD Carrier Port duplicates RS232 transceiver circuit S12compact Controller Module. This implemented order able switch between modes: either TTL-level RS232-signals used feed level shifter IC3, they used drive socket modem IC2, which directly connected telephone line. both cases, solder bridges BR4-BR7 S12compact Module must opened. Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board Figure 3-20. Switch SCO0 mode slide switch used switch between modes SCI0. 3.5.6 Socket Modem Figure 3-21. Socket Modem SCI0 provide additional communication capabilities, ACPRD equipped with Socket Modem. Socket Modem small module with pins along edges module, comparable with 64-pin DIP-IC. ACPRD Carrier Board actually socketed, different types Socket Modems plugged Reference Design versatile V.34 Socket Modem from Conexant/Multitech chosen. supports line speeds 33.6kbps, DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description industry standard AT-commands, data compression error detection. provides country profiles virtually types telephone standards worldwide. RING pins Socket Modem connected directly telephone line (X3). Other communication standards, like ISDN GSM, supported simply changing type Socket Modem. While Socket Modem implemented hardware feature current Alarm Control Panel, implementation associated software part original Reference Design task. planned used described future Application Note. 3.5.7 Driver Figure 3-22. driver SCI1 MC33399 (IC4) physical layer component dedicated Local Interconnect Network (LIN) applications. Although mainly used automotive industry, other fields application also possible. Since combines high robustness, standby current very cost, good candidate allow addition networked sensors Alarm Control Panel Reference Design. From view microcontroller, asynchronous serial protocol, much same RS232, even using only wire Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board (apart from GND). Therefore, simply operated SCI1 MC9S12DP256. additional general-purpose I/O-signals (PM4, PM5) used enable driver report wake-up events. configuration always have several slaves, only master. make node ACPRD Carrier Board master node, must closed. terminal block carries data signal, GND, and, third wire, (ca. 12V), which possible power supply source connected alarm sensors. also carries signals CANH CANL, which related functions. While driver implemented hardware feature current Alarm Control Panel, implementation associated software part original Reference Design task. planned used described future Application Note. more information about standard, please refer [3]. 3.5.8 Graphical Figure 3-23. Interface Graphical DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description dot-matrix liquid crystal display (LCD) connected part Alarm Control Panel's user interface. black white display full graphics capabilities, resolution pixels. display module contains controller, character generator, LC-drivers display RAM. display controller Toshiba T6963, which been used large number display manufacturers their graphical modules many years. existence large number compatible modules main reasons choose this kind display. Another reason generic electrical interface T6963-based LCDs, which quite easy design-in. There eight data lines four control signals. following table shows complete configuration: 11-18 Symbol D0-7 n.c. Function Frame ground Power supply (GND) Power supply (+5V) Contrast adjust Data write Data read Chip enable Command/data select Negative voltage output Reset Data Font selection connection RESET PP0-7 Connected Table 3-2. Interface Specification Graphical display contains white backlight, which supplied separately connector white forward voltage approx. 4-4.2V. resistor should have value ohms achieve desired current 80-100mA. Other backlight technologies require other setups. electrical specifications programming details, please consult data sheet [4]. Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board 3.5.9 Rotary Encoder Switch Figure 3-24. Interface Rotary Encoder Another component ACPRD user interface rotary encoder ENC1. Today, rotary encoders used input devices large number electronic equipment, e.g. mobile phones, monitors home entertainment equipment. Rotary encoders have least outputs that deliver square wave signal with identical period time, shifted phase relation. While frequency output(s) represents rotation speed, phase relation signals used determine direction rotation. inputs used sense encoder pulses. more details direction recognition, please refer corresponding software section. ENC1 also equipped with momentary switch (ENC1S), which triggered pressing encoder's knob. This switch connected input MCU. symbol ENC1M schematic represents GND-connection encoder body. DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description 3.5.10 Switch Figure 3-25. Interface Switch eight switch. allows user select between different operating modes Alarm Control Panel (for details software description). switches have pull-up resistors (resistor network RN2), open position reads high, while closed switch reads low. switch positions detected Parallel Input port S12compact Controller Module. This input port implemented parallel/serial converter operated SPI. Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board 3.5.11 High Power Driver Figure 3-26. High Power Driver power driver circuit consists eight Darlington stages. capable driving 500mA channel max. stages equipped with integral clamp diodes, making possible drive resistive loads well inductive loads, such relays. input signals come from serial/parallel converter S12compact Controller Module. This shift register operated SPI. During reset, outputs PO0-7 shift register reset, therefore stages turned reset. DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description following table shows function each channel: Channel Function Backlight Auxiliary Output Flashlight Relay Siren Relay Push Button LED0 Push Button LED1 Push Button LED2 Push Button LED3 Reference ST7/REL1 ST6/REL2 Table 3-3. Function each power channel 3.5.12 Push Buttons LEDs Figure 3-27. Push button switches optional LEDs There four push button switches (K0-3) connected inputs PAD08-11. These inputs belong module MC9S12DP256, which operated digital logic-level inputs within Alarm Control Panel Reference Design. switches normally open have pull-up resistor (RN1), thus delivering H-signal PAD08-11. C15-C18 added debouncing, normally they necessary. Push Button Switches read software cyclically (polling mode), interrupt generation necessary this case. Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Hardware Description ACPRD Carrier Board option, Push Buttons with integrated used, which driven stages High Power Driver circuit. default, Push Buttons ACPRD have such LED. 3.5.13 Audio Option Select Figure 3-28. Selection Audio Outputs jumpers JP3, select source(s) external audio amplifier. following table summarizes options available: Jumper Signal BUZZ SPKR VOUTA close enable. Buzzer output (Timer Channel PT2) S12compact must closed well! Speaker output Socket Modem 16-bit D/A-Converter output S12compact (Hi-quality audio), optional Table 3-4. Audio Output Options DRM008 MOTOROLA Hardware Description More Information This Product, www.freescale.com Designer Reference Manual Hardware Description 3.5.14 External Connections Figure 3-29 shows external connections Alarm Control Panel: Figure 3-29. External connections Alarm Control Panel Designer Reference Manual Hardware Description More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Section Software Description Contents Software Overview Software Module Details. build project Software Overview 4.2.1 Module Structure software Alarm Control Panel consists three layers. lowest layer deals with on-chip peripherals MC9S12DP256 MCU. These functions could re-used other HCS12 projects very easily. names such modules start with "S12_". T6963 module related hardware. contains low-level driver T6963 controller. DRM008 MOTOROLA Software Description More Information This Product, www.freescale.com Designer Reference Manual Software Description APPLICATION ACPRD_MAIN ACPRD_DOBJ ACPRD_VECTORS SONG1 FONT1 ACPRD_ENCODER TIMEDATE DISPLAY S12CO_LED S12CO_SPIIO LIBRARIES DRIVERS ACPRD_TIMER ACPRD_KEYB ACPRD_FREQOUT ACPRD_SONG HARDWARE S12_CRG S12_SCI S12_SPI S12_EETS S12_ATD T6963 Figure 4-1. Module Structure Alarm Control Panel software next layer contains library functions specific S12compact Controller Module hardware. Names modules belonging this layer start with "S12CO_". modules TIMEDATE DISPLAY also considered library modules, although they based specific hardware. layer application layer. contains main() function well other parts application framework. display objects graphical user interface concentrated separate file, interrupt reset vectors. names application layer modules normally start with "ACPRD_", except some files containing general purpose constant data definitions. implementation part each module contained ".C" file, while header file contains declarations such defines function prototypes. header file extension ".H" same base name C-file. Designer Reference Manual Software Description More Information This Product, www.freescale.com DRM008 MOTOROLA Software Description Software Module Details 4.2.2 Additional Header Files address assignments control registers contained header file HCS12DP256.H masks used access individual features these control registers defined module header files. DATATYPES.H contains miscellaneous definitions concerning data types also some compiler dependent macros. 4.2.3 Module Initialization Every module provides initialization function, which should called once initialization phase application. name such function always starts with init.(), e.g. initSPI() initEETS(). Software Module Details 4.3.1 Analog-to-Digital Converter Module (S12_ATD) This module contains functions driving Analog-to-Digital converter HCS12. MC9S12DP256 contains such blocks, this software module only deals with first block (ATD0), which covers input signals PAD00-PAD07. initATD0() should called once initialization phase application. enables hardware module selects 10-bit resolution mode. getATD0() performs single conversion single channel. channel number argument must range 0-7. function will wait until conversion finished which will cause additional delay about microseconds. following functions provide another method handle converter. Calling startATD0() will just start sequence eight input channels. function will return immediately will deliver result. read conversion results, readATD0() must called second step. argument "results" pointer memory area intended store eight conversion values. readATD0() must DRM008 MOTOROLA Software Description More Information This Product, www.freescale.com Designer Reference Manual Software Description called before conversion sequence complete. Finally, handleATD0() demonstrates startATD0() readATD0() cyclically perform conversions calculation arithmetic mean values each input channel. 4.3.2 Clocks Reset Generator Module (S12_CRG) This module deals with Phase Locked Loop (PLL), which part hardware module HCS12. There only function, initPLL(), which responsible setting PLL, waiting until stable clock output available finally switching over from oscillator clock clock. result, internal system clock (ECLK) will change from MHz. 4.3.3 Enhanced Capture Timer Module (S12_ECT) this module, there just header file containing mask definitions hardware module HCS12. This peripheral block rather complex, there general setup which would cover available functions. Rather than providing generic module, timer related functions split into "themes" according features needed Alarm Control Panel application. details, please ACPRD_TIMER, ACPRD_ENCODER ACPRD_FREQOUT. 4.3.4 EEPROM Module (S12_EETS) EEPROM HCS12 partitioned into 4-byte sectors. functions this module access every EEPROM sector individual basis. order simplify handling data that smaller than sector, module functions consider information 32-bit "item". mostly smaller data portions were used application (e.g. bytes), EEPROM space would wasted. However, since total size EEPROM block MC9S12DP256 bytes, there sufficient space store limited amount configuration data ACPRD). Designer Reference Manual Software Description More Information This Product, www.freescale.com DRM008 MOTOROLA Software Description Software Module Details Before using EETS module important write EEPROM Clock Divider Register, which done initEETS() function. proper value depends oscillator clock, which defined header file S12_CRG.H. 4.3.5 Serial Communications Interface Module (S12_SCI) module provides transmit receive functions both asynchronous serial interfaces, SCI0 SCI1. SCI0 connected either host (PC) modem. SCI1 connected on-board driver. functions polling mode both, receive transmit. Please note, that routines this module generic data transfer functions, i.e. protocol handshaking features implemented. This means particular, there LIN-specific software drivers contained this initial release ACPRD. 4.3.6 Serial Peripheral Interface Module (S12_SPI) This module provides routines first three hardware modules MC9S12DP256, which designated SPI0. module setup master. transfers always bidirectional, therefore only single transfer function needed instead separate transmit receive functions. This function xferSPI0() will wait completion transfer, thus delay will occur, length which will depend clock speed, peripherals. Since clock high (ECLK/2), delay problem most cases. 4.3.7 S12compact Input Output Module (S12CO_SPIIO) S12compact Controller Module, SPI0 used access several peripheral chips. chip select signals needed this purpose generated 1-out-of-8 decoder (IC4), which driven signals PH4, PH6. these signals high then output will become low. This default, inactive state DRM008 MOTOROLA Software Description More Information This Product, www.freescale.com Designer Reference Manual Software Description decoder used). other combination PH4-6 will select chip select signals SPICS0-6. putSPIPO() activates SPICS5 transfers byte SPI0 shift register S12compact Controller Module. shift register will latch value with rising edge chip select signal. There feedback path recognize values present shift register outputs, therefore software shadow register should used track current status application code. parallel-in/serial-out shift register. input latch triggered pulling SPICS4 short time. getSPIPI() will that, followed activating SPICS3 order shift latched input value. function then will return byte read. Both shift registers daisy-chained outside S12compact board connecting additional shift registers NEXTPO PREVPI, respectively. 4.3.8 S12compact Module (S12CO_LED) This module simply switches on-board S12compact. driven /XCLKS, which identical PortE[7] MCU. There code file this module, since functions implemented macro definitions header file. 4.3.9 T6963 Module (T6963) Toshiba T6963 controller which used great variety LC-Display modules from different manufacturers. Although latest device, very popular market. T6963 software module implements low-level functions access this display controller. This module implements level functions write single bytes, read status transfer block (display) data LCD. Please refer details setup programming T6963. Designer Reference Manual Software Description More Information This Product, www.freescale.com DRM008 MOTOROLA Software Description Software Module Details There functions (refreshT6963c() refreshT6963a()) which used update display information. functions called cyclically from periodic system interrupt. result, display information transferred from display buffer display LCD. 4.3.10 Display Module (DISPLAY) Display Module implements virtual display screen character based access functions (text editor). provides screen buffer maintains position cursor. This module used different kinds physical display devices, instance (but limited LC-Displays. display size defined header file. Every display position defined word display buffer disp_buf[]. word character code, while reserved hold attribute information (reverse, blink). function putcDisp() performs editor function, i.e. control code handling cursor movement. _putDisp() then called necessary), which only function which actually writes display buffer. functions starting with prDisp.() helper functions intended format output. ANSI-C standard library function printf() could perform most desired formatting, code size this function substantial and, same time, some desirable features covered. implementing some small specific functions often better than using printf(). 4.3.11 Time/Date Module (TIMEDATE) traditional approach express time date information UNIX-based machines number seconds since January 1970. TIMEDATE module implements calculations based this model. This module contains hardware dependencies, except functions time() stime() which access second counter variable systime ACPRD. DRM008 MOTOROLA Software Description More Information This Product, www.freescale.com Designer Reference Manual Software Description asctime() implemented using sprintf() which consumes considerable amount code space. Therefore, asctime() must activated individually defining preprocessor macro _USE_ASCTIME. This module compliant will fail after 2099. 4.3.12 ACPRD Keyboard Module (ACPRD_KEYB) four push buttons Alarm Control Panel handled this module. Also, momentary switch rotary encoder treated (fifth) key. press events buffered. hasKeyb() checks there codes buffer. This function returns immediately. Conversely, getKeyb() will wait press, buffer empty. After that, function will remove oldest code from buffer return putKeyb() only used internally place code into buffer. array keyb_hist used maintain history over time recent states each key. This history updated every time scanKeyb() called, which done part cyclic interrupt routine. keys connected binary port pins (PORTAD1 used digital input port here well). states (High Low) these pins shifted into keyb_hist variable. detection "HLLL" pattern means high transition followed stable reading therefore considered valid press event. This been proven easy method debouncing mechanical push buttons. 4.3.13 ACPRD Encoder Module (ACPRD_ENCODER) encoder module utilizes Enhanced Capture Timer handle rotary encoder connected port pins PT1. These inputs capable generating Input Capture interrupt, which used detect rotary encoder moved. Most work done during initialization. interrupt routine encoder channel isrIC1() just needs check whether encoder channels have same level not. Depending result this Designer Reference Manual Software Description More Information This Product, www.freescale.com DRM008 MOTOROLA Software Description Software Module Details investigation, encoder variable encoder_count will incremented decremented. pulses (coming from encoder channel will also generate interrupt, related interrupt service routine will nothing, except clear interrupt flag. Calling hasEncoder() will return current encoder counter value. getEncoder() will only return current encoder_count value, also reset this variable. 4.3.14 ACPRD Timer Module (ACPRD_TIMER) This module uses Modulus Down Counter within generate periodic interrupt every milliseconds. interrupt routine isrMDCU() just clears local interrupt flag then calls user supplied interrupt function, which implemented ACPRD_MAIN. 4.3.15 ACPRD Frequency Output Module (ACPRD_FREQOUT) generate frequency output, Output Compare channels MC9S12DP256 used. initFreqOut() establishes prescaler value main timer clock. This value favourable generate frequencies audible range. lowest possible frequency becomes 22.9Hz (24MHz 65536)). setFreqOut() establishes frequency according function argument, which period time microseconds. this purpose, calculates number timer ticks period time given stores result variable freqout_tticks. function argument zero, frequency output will disabled disconnecting output from logic. isrOC2() interrupt handler Output Compare channel. invoked cyclically with interval value stored freqout_tticks. DRM008 MOTOROLA Software Description More Information This Product, www.freescale.com Designer Reference Manual Software Description 4.3.16 ACPRD Song Module (ACPRD_SONG) ACPRD_SONG play melody based frequency generation capabilities ACPRD_FREQOUT. simple pseudo code used define frequency duration music notes example given SONG1.C). argument startSong() pointer zero-terminated string, consisting such music pseudo codes. handleSong() called cyclically proceed playing song. This done background task) every 30ms part periodic ACPRD system interrupt. 4.3.17 ACPRD Main Module (ACPRD_MAIN) ACPRD Main Module contains main program loop that handles user interface (display menu other visual objects, check push buttons rotary encoder) background task, based periodic interrupt every10ms(). Displayable objects contained extra source file (ACPRD_DOBJ.C) which included ACPRD_MAIN.C. Also, display font definition file FONT1.C music definition file SONG1.C included therefore become part main module. Keyboard scanning, time/date calculation, sound generation, refreshing display course) checking alarm lines done "background" task, which 10ms periodic interrupt. 4.3.18 ACPRD Vectors Module (ACPRD_VECTORS) This table interrupt reset vectors MC9S12DP256. unused vectors point dummy interrupt service routine isrErrorHandler(), which used identify spurious interrupts during debugging. Designer Reference Manual Software Description More Information This Product, www.freescale.com DRM008 MOTOROLA Software Description build project build project build ACPRD, following source files compiler project: acprd_main.c acprd_timer.c acprd_encoder.c acprd_keyb.c acprd_freqout.c acprd_song.c acprd_vectors.c s12co_spiio.c s12_atd.c s12_crg.c s12_eets.c s12_sci.c s12_spi.c t6963.c display.c timedate.c linker options should follows: text segment start 0xC000 data segment start 0x3800 stack pointer 0x4000 source code ANSI-C compliant with exception using comments. Some compiler specific issues covered header file DATATYPES.H. project implemented using ImageCraft's ICC12 compiler tested under Metrowerks CodeWarrior Cosmic Cx12, though should possible build project with other HC(S)12 compiler. DRM008 MOTOROLA Software Description More Information This Product, www.freescale.com Designer Reference Manual Software Description Designer Reference Manual Software Description More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Section Literature Contents Documentation ACPRD Documentation Motorola, Inc.: MC9S12DP256B Device User Guide; Document Number: 9S12DP256BDGV2/D (also consult various HCS12 Block User Guides) Homepage organization: http://www.lin-subbus.org Motorola, Inc.: MC33399 Advance Information; Document Number: MC33399/D Powertip Technology Corp.: PG24064 Data Sheet (also containing programming instructions Toshiba T6963 controller) ACPRD There project page, dedicated (possible) future updates enhancements Alarm Control Panel Reference Design project: http://hc12web.de/acprd DRM008 MOTOROLA Literature More Information This Product, www.freescale.com Designer Reference Manual Literature Designer Reference Manual Literature More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Section Appendix Contents Figure Schematics S12compact module (Part Figure Schematics S12compact module (Part Figure Schematics S12compact module (Part Figure Parts Location Diagram S12compact module Table S12compact Bill Materials Figure Schematics ACPRD Carrier Board (Part Figure Schematics ACPRD Carrier Board (Part Figure Parts Location Diagram ACPRD Carrier Board Table ACPRD Carrier Board Bill Materials DRM008 MOTOROLA Designer Reference Manual Appendix More Information This Product, www.freescale.com Appendix Figure 6-1. Schematics S12compact module (Part Designer Reference Manual Appendix More Information This Product, www.freescale.com DRM008 MOTOROLA Appendix Contents Figure 6-2. Schematics S12compact module (Part DRM008 MOTOROLA Appendix More Information This Product, www.freescale.com Designer Reference Manual Appendix Figure 6-3. Schematics S12compact module (Part Designer Reference Manual Appendix More Information This Product, www.freescale.com DRM008 MOTOROLA Appendix Contents Figure 6-4. Parts Location Diagram S12compact module DRM008 MOTOROLA Appendix More Information This Product, www.freescale.com Designer Reference Manual Appendix Table 6-1. S12compact Bill Materials Reference Value MC9S12DP256BCPV RN5VD47A SP232ACN 74AHC138 74AHCT125 74HC165 74AHC594 PCA82C250T/N4 AT51CD2 LTST-C150UBKT P6SMB6.8A 100n 10µ/35V 120R 220R 100k ACB3216M-600-T DTSM61N ALP-60P Note: Optional components listed Package LQFP112 SOT23-5 SO16 SO16 SO14 SO16 SO16 1206 0805 0805 0805 0805 0603 5.5mm 1206 1206 1206 1206 1206 1206 1206 1206 0tan20ar20 Description HCS12 Reset Controller RS232 Transceiver Decoder Buffer Shift Register Shift Register Physical Interface Quartz Crystal blue Supressor Diode 6.8V Ceramic Capacitor Ceramic Capacitor Ceramic Capacitor Ceramic Capacitor Ceramic Capacitor Electrolytic Capacitor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Ferrite Bead Push Button Switch Buzzer Supplier (Distr.) Motorola Ricoh Sipex Semi. Fairchild Philips (Frischer) LiteOn Diptronics Designer Reference Manual Appendix More Information This Product, www.freescale.com DRM008 MOTOROLA Appendix Contents Figure 6-5. Schematics ACPRD Carrier Board (Part DRM008 MOTOROLA Appendix More Information This Product, www.freescale.com Designer Reference Manual Appendix Figure 6-6. Schematics ACPRD Carrier Board (Part Designer Reference Manual Appendix More Information This Product, www.freescale.com DRM008 MOTOROLA Appendix Contents Figure 6-7. Parts Location Diagram ACPRD Carrier Board DRM008 MOTOROLA Appendix More Information This Product, www.freescale.com Designer Reference Manual Appendix Table 6-2. ACPRD Carrier Board Bill Materials Reference ENC1 ST1.ST8 ST1.ST8 REL1 REL2 Value PG24064 STEC11B03 LM2575T-5 SC336H-1 SP232A MC33399 ULN2803A LM35DZ 330µH/1A 1N4007 1N5819 BAT42 BC337-25 100n 10µ/16 100µ/16 220µ/35 120R 330R MTP1241 STLZ951 ARK950 D2N12 ASE42FN DIP-SW8 P131 KLBR2 NEB21R Sub-D9 female 2,5A Package Description LC-Display with Backlight Rotary Encoder, switched Switching Voltage Regulator Socket Modem RS232 Transceiver Physical Interface Power Driver Celsius Sensor Storage Choke Diode Schottky Diode Schottky Diode Transisitor Ceramic Capacitor Ceramic Capacitor Ceramic Capacitor Electrolytic Capacitor Electrolytic Capacitor Electrolytic Capacitor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Resistor Network Potentiometer "Keyboard Switch "Terminal Block "Terminal Block Print Relais Slide Switch DIP16 Switch 6P4C Modular Connector Audio Jack Connector 2.1mm center Power Connector print, deg. RS232 Connector 20mm Fuse, socketed 20mm Fuse, socketed Supplier (Distr.) Powertip (Actron) ALPS (RS) Semi. Conexant (Unitronic) Sipex Motorola Allegro National Semi. Talema TO220-5 DIP16 DIP18 TO92 DO41 DO41 DO35 1206 SIL9 5mm/10mm 0.75 Schurter Tyco Tyco Lumberg Lumberg Lumberg Designer Reference Manual Appendix More Information This Product, www.freescale.com DRM008 MOTOROLA Designer Reference Manual DRM008 Glossary "accumulators D)." accumulators 8-bit 16-bit general-purpose registers CPU. uses accumulators hold operands results arithmetic logic operations. acquisition mode mode operation with large loop bandwidth. Also 'tracking mode'. address wires that uses read write memory locations. addressing mode that determines operand address instruction. M68HC12 addressing modes. "arithmetic logic unit (ALU)." analogue-to-digital converter (ATD) module 8-channel, multiplexed-input successive-approximation analog-to-digital converter. arithmetic logic unit (ALU) portion that contains logic circuitry perform arithmetic, logic, manipulation operations operands. asynchronous Refers logic circuits operations that synchronized common reference signal. "analogue-to-digital converter". "accumulators D)." baud rate total number bits transmitted unit time. "binary-coded decimal (BCD)." binary Relating base number system. DRM008 MOTOROLA Glossary More Information This Product, www.freescale.com Designer Reference Manual Glossary binary number system base number system, having digits, Binary arithmetic convenient digital circuit design because digital circuits have permissible voltage levels, high. binary digits interpreted correspond digital voltage levels. binary-coded decimal (BCD) notation that uses 4-bit binary numbers represent decimal digits that retains same positional structure decimal number. example, (decimal) 0010 0011 0100 (BCD) binary digit. value either logic logic branch instruction instruction that causes continue processing memory location other than next sequential address. break module break module allows software halt program execution programmable point order enter background routine. breakpoint number written into break address registers break module. When number appears internal address that same number break address registers, executes software interrupt instruction (SWI). break interrupt software interrupt caused appearance internal address same value that written break address registers. wires that transfers logic signals. clock "CPU clock". byte eight bits. "Motorola scalable CAN." "condition code register." central processor unit (CPU) primary functioning unit computer system. controls execution instructions. "clock generator module (CGM)." clear change from logic logic opposite set. clock square wave signal used synchronize events computer. clock generator module (CGM) module generates base clock signal from which system clocks derived. include crystal oscillator circuit and/or phase-locked loop (PLL) circuit. Designer Reference Manual Glossary More Information This Product, www.freescale.com DRM008 MOTOROLA Glossary comparator device that compares magnitude inputs. digital comparator defines equality relative differences between binary numbers. computer operating properly module (COP) counter module that resets allowed overflow. condition code register (CCR) 8-bit register that contains interrupt mask five bits that indicate results instruction just executed. control register manipulated software control operation module. control unit major units CPU. control unit contains logic functions that synchronize machine direct various operations. control unit decodes instructions generates internal control signals that perform requested operations. outputs control unit drive execution unit, which contains arithmetic logic unit (ALU), registers, interface. "computer operating properly module (COP)." "central processor unit (CPU)." CPU12 MC68HC12 Family. clock clock select bits BCSP BCSS clock select register (CLKSEL) determine which clock drives SYSCLK main system, including buses. When EXTALi drives SYSCLK, clock frequency (fo) equal EXTALi frequency divided cycles cycle period internal clock, normally derived dividing crystal oscillator source more high times will equal. length time required execute instruction measured clock cycles. registers Memory locations that wired directly into logic instead being part addressable memory map. always direct access information these registers. registers M68HC12 are: (8-bit accumulator) (8-bit accumulator) (16-bit accumulator formed concatenation accumulators (16-bit index register) (16-bit index register) (16-bit stack pointer) DRM008 MOTOROLA Glossary More Information This Product, www.freescale.com Designer Reference Manual Glossary (16-bit program counter) (8-bit condition code register) cycle time period operating frequency: tCYC 1/fOP. "accumulators D)." decimal number system Base numbering system that uses digits zero through nine. duty cycle ratio amount time signal versus time off. Duty cycle usually represented percentage. "enhanced capture timer." EEPROM Electrically erasable, programmable, read-only memory. nonvolatile type memory that electrically erased reprogrammed. EPROM Erasable, programmable, read-only memory. nonvolatile type memory that erased exposure ultraviolet light source then reprogrammed. enhanced capture timer (ECT) HC12 Enhanced Capture Timer module features HC12 Standard Timer module enhanced additional features order enlarge field applications. exception event such interrupt reset that stops sequential execution instructions main program. fetch copy data from memory location into accumulator. firmware Instructions data programmed into nonvolatile memory. free-running counter device that counts from zero predetermined number, then rolls over zero begins counting again. full-duplex transmission Communication channel which data sent received simultaneously. hexadecimal Base numbering system that uses digits through letters through high byte most significant eight bits word. illegal address address within memory illegal opcode nonexistent opcode. Designer Reference Manual Glossary More Information This Product, www.freescale.com DRM008 MOTOROLA Glossary index registers 16-bit registers CPU. indexed addressing modes, uses contents determine effective address operand. also serve temporary data storage locations. input/output (I/O) Input/output interfaces between computer system external world. reads input sense level external signal writes output change level external signal. instructions Operations that perform. Instructions expressed programmers assembly language mnemonics. interprets opcode associated operand(s) instruction. inter-IC (I2C) two-wire, bidirectional serial that provides simple, efficient method data exchange between devices. interrupt temporary break sequential execution program respond signals from peripheral devices executing subroutine. interrupt request signal from peripheral intended cause execute subroutine. "input/output (I/0)." jitter Short-term signal instability. latch circuit that retains voltage level (logic logic written long power applied circuit. latency time between instruction completion data movement. least significant (LSB) rightmost digit binary number. logic voltage level approximately equal input power voltage (VDD). logic voltage level approximately equal ground voltage (VSS). byte least significant eight bits word. M68HC12 Motorola family 16-bit MCUs. mark/space logic 1/logic convention used formatting data serial communication. mask logic circuit that forces group bits desired state. photomask used integrated circuit fabrication transfer image onto silicon. Microcontroller unit. "microcontroller." DRM008 MOTOROLA Glossary More Information This Product, www.freescale.com Designer Reference Manual Glossary memory location Each M68HC12 memory location holds byte data unique address. store information memory location, places address location address bus, data information data bus, asserts write signal. read information from memory location, places address location address asserts read signal. response read signal, selected memory location places data onto data bus. memory pictorial representation memory locations computer system. MI-Bus "Motorola interconnect bus". microcontroller Microcontroller unit (MCU). complete computer system, including CPU, memory, clock oscillator, input/output (I/O) single integrated circuit. modulo counter counter that programmed count number from zero maximum possible modulus. most significant (MSB) leftmost digit binary number. Motorola interconnect (MI-Bus) Motorola Interconnect Bus) serial communications protocol which supports distributed real-time control efficiently with high degree noise immunity. Motorola scalable (msCAN) Motorola scalable controller area network serial communications protocol that efficiently supports distributed real-time control with very high level data integrity. msCAN "Motorola scalable CAN". "multiple serial interface". multiple serial interface module consisting multiple independent serial sub-systems, e.g. SPI. multiplexer device that select number inputs pass logic level that input output. nibble four bits (half byte). object code output from assembler compiler that itself executable machine code, suitable processing produce executable machine code. opcode binary code that instructs perform operation. open-drain output that pullup transistor. external pullup device connected power supply provide logic output voltage. Designer Reference Manual Glossary More Information This Product, www.freescale.com DRM008 MOTOROLA Glossary operand Data which operation performed. Usually statement consists operator operand. example, operator instruction, operand quantity added. oscillator circuit that produces constant frequency square wave that used computer timing sequencing reference. OTPROM One-time programmable read-only memory. nonvolatile type memory that cannot reprogrammed. overflow quantity that large contained byte word. page zero first bytes memory (addresses $0000-$00FF). parity error-checking scheme that counts number logic each byte transmitted. system that uses parity, every byte expected have number logic even parity system, every byte should have even number logic transmitter, parity generator appends extra each byte make number logic parity even even parity. parity checker receiver counts number logic each byte. parity checker generates error signal finds byte with incorrect number logic "program counter (PC)." peripheral circuit under direct control. phase-locked loop (PLL) clock generator circuit which voltage controlled oscillator produces oscillation which synchronized reference signal. "phase-locked loop (PLL)." pointer Pointer register. index register sometimes called pointer register because contents used calculation address operand, therefore points operand. polarity opposite logic levels, logic logic which correspond different voltage levels, VSS. polling Periodically reading status monitor condition peripheral device. port wires communicating with off-chip devices. prescaler circuit that generates output signal related input signal fractional scale factor such 1/2, 1/8, 1/10 etc. program computer instructions that cause computer perform desired operation operations. DRM008 MOTOROLA Glossary More Information This Product, www.freescale.com Designer Reference Manual Glossary program counter (PC) 16-bit register CPU. register holds address next instruction operand that will use. pull instruction that copies into accumulator contents stack location. stack address stack pointer. pullup transistor output logic gate that connects output logic voltage power supply. pulse-width amount time signal opposed being state. pulse-width modulation (PWM) Controlled variation (modulation) pulse width signal with constant frequency. push instruction that copies contents accumulator stack RAM. stack address stack pointer. period time required complete cycle waveform. Random access memory. locations read written CPU. contents memory location remain valid until writes different value until power turned off. circuit circuit consisting capacitors resistors having defined time constant. read copy contents memory location accumulator. register circuit that stores group bits. reserved memory location memory location that used only special factory test modes. Writing reserved location effect. Reading reserved location returns unpredictable value. reset force device known condition. "serial communication interface module (SCI)." serial Pertaining sequential transmission over single line. serial communications interface module (SCI) module that supports asynchronous communication. serial peripheral interface module (SPI) module that supports synchronous communication. change from logic logic opposite clear. Designer Reference Manual Glossary More Information This Product, www.freescale.com DRM008 MOTOROLA Glossary shift register chain circuits that retain logic levels (logic logic written them that shift logic levels right left through adjacent circuits chain. signed binary number notation that accommodates both positive negative numbers. most significant used indicate whether number positive negative, normally logic positive logic negative. other seven bits indicate magnitude number. software Instructions data that control operation microcontroller. software interrupt (SWI) instruction that causes interrupt associated vector fetch. "serial peripheral interface module (SPI)." stack portion reserved storage register contents subroutine return addresses. stack pointer (SP) 16-bit register containing address next available storage location stack. start that signals beginning asynchronous serial transmission. status register that indicates condition device. stop that signals asynchronous serial transmission. subroutine sequence instructions used more than once course program. last instruction subroutine return from subroutine (RTS) instruction. each place main program where subroutine instructions needed, jump branch subroutine (JSR BSR) instruction used call subroutine. leaves flow main program execute instructions subroutine. When instruction executed, returns main program where left off. synchronous Refers logic circuits operations that synchronized common reference signal. timer module used relate events system point time. toggle change state output from logic logic from logic logic tracking mode mode operation with narrow loop bandwidth. Also `acquisition mode.' DRM008 MOTOROLA Glossary More Information This Product, www.freescale.com Designer Reference Manual Glossary two's complement means performing binary subtraction using addition techniques. most significant two's complement number indicates sign number indicates negative). two's complement negative number obtained inverting each number then adding result. unbuffered Utilizes only register data; data overwrites current data. unimplemented memory location memory location that used. Writing unimplemented location effect. Reading unimplemented location returns unpredictable value. variable value that changes during course program execution. "voltage-controlled oscillator." vector memory location that contains address beginning subroutine written service interrupt reset. voltage-controlled oscillator (VCO) circuit that produces oscillating output signal frequency that controlled voltage applied control input. waveform graphical representation which amplitude wave plotted against time. wired-OR Connection circuit outputs that output high, connection point high. word bytes bits). write transfer byte data from memory location. Designer Reference Manual Glossary More Information This Product, www.freescale.com DRM008 MOTOROLA More Information This Product, www.freescale.com REACH USA/EUROPE/LOCATIONS LISTED: Motorola Literature Distribution; P.O. 5405, Denver, Colorado 80217 1-303-675-2140 1-800-441-2447 JAPAN: Motorola Japan Ltd.; SPS, Technical Information Center, 3-20-1, Minami-Azabu Minato-ku, Tokyo 106-8573 Japan 81-3-3440-3569 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd.; Silicon Harbour Centre, King Street, Industrial Estate, N.T., Hong Kong 852-26668334 TECHNICAL INFORMATION CENTER: 1-800-521-6274 HOME PAGE: Information this document provided solely enable system software implementers Motorola products. There express implied copyright licenses granted hereunder design fabricate integrated circuits integrated circuits based information this document. Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters which provided Motorola data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals" must validated each customer application customer's technical experts. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola Stylized Logo registered U.S. Patent Trademark Office. digital trademark Motorola, Inc. other product service names property their respective owners. Motorola, Inc. Equal Opportunity/Affirmative Action Employer. Motorola, Inc. 2002 DRM008/D More Information This Product, www.freescale.com Other recent searchesZFBBA05A - ZFBBA05A ZFBBA05A Datasheet XC9500 - XC9500 XC9500 Datasheet VFT561 - VFT561 VFT561 Datasheet TLE2161 - TLE2161 TLE2161 Datasheet TLE2161A - TLE2161A TLE2161A Datasheet TLE2161B - TLE2161B TLE2161B Datasheet Si7170DP - Si7170DP Si7170DP Datasheet AL-513IR-850-30C - AL-513IR-850-30C AL-513IR-850-30C Datasheet 1755862 - 1755862 1755862 Datasheet
Privacy Policy | Disclaimer |