An Enhanced MM MHz Generator

Similar documents
Discrete Logic Replacement Melody Player

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester

TV Synchronism Generation with PIC Microcontroller

Introduction to PIC Programming

EXPERIMENT 2: Elementary Input Output Programming

Distance, Velocity and Acceleration Detection

Digital Clock. Perry Andrews. A Project By. Based on the PIC16F84A Micro controller. Revision C

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

ASNT_PRBS20B_1 18Gbps PRBS7/15 Generator Featuring Jitter Insertion, Selectable Sync, and Output Amplitude Control

RST RST WATCHDOG TIMER N.C.

Experiment 3: Basic Embedded System Analysis and Design

16 Stage Bi-Directional LED Sequencer

SDA 3302 Family. GHz PLL with I 2 C Bus and Four Chip Addresses

Digital (5hz to 500 Khz) Frequency-Meter

. The vertical pull-in range is approximately 10 Hz at fv = 60 Hz.

Chrontel CH7015 SDTV / HDTV Encoder

Synchronization circuit with synchronized vertical divider system for 60 Hz TDA2579C

Maintenance/ Discontinued

LM8562. Digital Alarm Clock. Package Dimensions. Overview. Features. Specifications 3029A-DIP28S. Absolute Maximum Ratings at Ta = 25 C, V SS =0V

A MISSILE INSTRUMENTATION ENCODER

CXA1645P/M. RGB Encoder

Simple PICTIC Commands

ELECTRICAL ENGINEERING DEPARTMENT California Polytechnic State University

Radio Clock with DCF77

RGB Encoder For the availability of this product, please contact the sales office. VIDEO OUT Y/C MIX DELAY CLAMP

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

Chapter 4: One-Shots, Counters, and Clocks

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Video Reference Timing with Tektronix Signal Generators

Maintenance/ Discontinued

Chapter 11 Sections 1 3 Dr. Iyad Jafar

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

LCD Triplex Drive with COP820CJ

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

ThermalCapture GrabberUSB - User Guide

INTEGRATED CIRCUITS DATA SHEET. TDA4510 PAL decoder. Product specification File under Integrated Circuits, IC02

LM8562. Digital Alarm Clock. Package Dimensions. Overview. Features. Specifications

DATASHEET EL1883. Features. Applications. Ordering Information. Demo Board. Pinout. Sync Separator with Horizontal Output. FN7010 Rev 2.

PHYS 3322 Modern Laboratory Methods I Digital Devices

Application Note. RTC Binary Counter An Introduction AN-CM-253

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

SPG700 Multiformat Reference Sync Generator Release Notes

SignalTap Plus System Analyzer

Agilent 5345A Universal Counter, 500 MHz

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

Modular DAA with 2/4 Wire Convertor. XE0002D Block Diagram

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

PESIT Bangalore South Campus

Maintenance/ Discontinued

COHU, INC. Electronics Division Installation and Operation Instructions

Video Accessory IC Series Sync Separation ICs with Built-in AFC BA7046F, BA7071F Rev.A 1/9

Lab 3: Timer and Clock

ECE 372 Microcontroller Design

M68HC11 Timer. Definition

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

EECS 140 Laboratory Exercise 7 PLD Programming

Fig. 1 Analog pins of Arduino Mega

Trusted 40 Channel 120 Vac Digital Input FTA

Decade Counters Mod-5 counter: Decade Counter:

Chapter 5 Flip-Flops and Related Devices

MODIFYING A SMALL 12V OPEN FRAME INDUSTRIAL VIDEO MONITOR TO BECOME A 525/625 & 405 LINE MULTI - STANDARD MAINS POWERED UNIT. H. Holden. (Dec.

CVOUT Vcc2 TRAP SWITCH Y/C MIX INTERNAL TRAP DELAY LPF LPF SIN-PULSE NPIN SCIN

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

Hello and welcome to this training module for the STM32L4 Liquid Crystal Display (LCD) controller. This controller can be used in a wide range of

Tutorial Introduction

Power Supply and Watchdog Timer Monitoring Circuit ADM9690

Figure 1: AHK1421 Evaluation Board Pictures.

VARIABLE FREQUENCY CLOCKING HARDWARE

N3ZI Digital Dial Manual For kit with Backlit LCD Rev 4.00 Jan 2013 PCB

Introduction to Microprocessor & Digital Logic

Experiment # 4 Counters and Logic Analyzer

VGA display tester check those computer displays

Integrated Circuit for Musical Instrument Tuners

Component Analog TV Sync Separator

MAX7461 Loss-of-Sync Alarm

NI-DAQmx Device Considerations

Nixie Clock Type Quattro'

Maintenance/ Discontinued

Trusted 40 Channel 120 Vac Digital Input FTA

INTEGRATED CIRCUITS DATA SHEET. SAA1101 Universal sync generator (USG) Product specification File under Integrated Circuits, IC02

IS01BFRGB LCD SmartDisplay from NKK Switches Simple implementation featuring the ATmega88PA from Atmel Complete software solution

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

USER MANUAL. Blackburst, Sync, Audio Tone Generator. For Models BSG-50, RM-50/BSG, SR-50/BSG. Doc Rev. F (C) Copyright 2014

Microcontrollers. Outline. Class 4: Timer/Counters. March 28, Timer/Counter Introduction. Timers as a Timebase.

Digital Delay / Pulse Generator DG535 Digital delay and pulse generator (4-channel)

Netzer AqBiSS Electric Encoders

ML6428. S-Video Filter and 75Ω Line Drivers with Summed Composite Output. Features. General Description. Block Diagram Σ BUFFER.

Field Programmable Gate Array (FPGA) Based Trigger System for the Klystron Department. Darius Gray

EVALUATION BOARD DATASHEET EV-151

Features. PFD Output Voltage 2000 mv, Pk - Pk. PFD Gain Gain = Vpp / 2π Rad khz 100 MHz Square Wave Ref.

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

Published in A R DIGITECH

Digital Circuits I and II Nov. 17, 1999

Model 5405 Dual Analog Sync Generator Data Pack

Logic Analyzer Triggering Techniques to Capture Elusive Problems

MULTIDYNE INNOVATIONS IN TELEVISION TESTING & DISTRIBUTION DIGITAL VIDEO, AUDIO & DATA FIBER OPTIC MULTIPLEXER TRANSPORT SYSTEM

EL1881. Features. Sync Separator, Low Power. Applications. Pinout. Demo Board. Data Sheet September 15, 2011 FN7018.2

ECE 2274 Pre-Lab for Experiment Timer Chip

Transcription:

An Enhanced MM5369-60 MHz Generator Author: OVERVIEW Jim Nagy London Ontario email: nagy@wwdc.com I call my idea an 'MM5369E' as it represents the equivalent of a 5369 IC plus all the 'glue' necessary to sync-lock this 60 Hz generator to the power line. Previously, I had used either the powerline or an MM5369 as a time base for my projects, but never both, as the circuits to detect missing pulses phase-lock the crystal to the line, and transfer between the two sources was just too complicated. Now it's all contained in an inexpensive 8-pin package. As a bonus, I was able to include a divide-by-sixty circuit to provide a 1Hz output to further simplify timekeeping functions. APPLICATION OPERATION My circuit uses a standard 3.579545 MHz NTSC 'color burst' crystal for the main oscillator, just as the MM5369 does. This frequency is divided by 4 by the PIC12C508, then by 256 in the TMR0 prescaler, and counted in TMR0. It works out that 233 counts of TMR0 and 11 more instruction cycles gives exactly four, 60 Hz periods. This fact is used to provide the 60 Hz output. (It's a little 'jittery' though, if viewed on a scope, as the four cycles are not exactly the same period. Phase jitter, however, is not important for this type of time-keeping function.) Every time that the 60 Hz output goes high, a counter is incremented as well, and this counter value is then used to drive the 1Hz output. Sync-lock is achieved by allowing a high-to-low signal at GP2 to reset the main counter, TMR0. As long as these transitions occur, the output will continue to follow the input, and the output will have exactly the same frequency as the line frequency. As this is traceable back to national standards, it is better as a long-term reference than the crystal. As to deciding which source to use for the output, a very narrow window is set up to detect whether a 60 Hz sync pulse occurred before the timer timed out, or not. This allows an AC failure to be detected during the cycle that it failed, and a 3.58 MHz derived one to be inserted with no loss of output cycles. The narrow window does slow sync-lock down considerably, however, on return of AC, typically taking about 30 seconds to regain lock. (If the two frequencies were identical, but only differed in phase, the circuit could theoretically never return to sync-lock). The synchronizing input is provided from either a halfwave or full-wave rectified 60 Hz source and is connected to the GP2 Schmitt trigger input through a current limiting resistor, so that peak inputs greater than the 5V supply can be used without damaging the input. The input must have a peak value of at least VDD (5V). This pin also has a large value resistor connected from it to VSS to provide a reference for floating inputs. No other special components are required for circuit operation. Microchip Technology Incorporated, has been granted a nonexclusive, worldwide license to reproduce, publish and distribute all submitted materials, in either original or edited form. The author has affirmed that this work is an original, unpublished work and that he/she owns all rights to such work. All property rights, such as patents, copyrights and trademarks remain with author. 1997 Microchip Technology Inc. DS40160A/4_008-page 1

GRAPHICAL HARDWARE REPRESENTATION VCC 30 p VDD GND GP0 60 Hz out 3.58 MHz 30 p GP1 1 Hz out MCLR GP3 GP2 PIC12C508 47 K Sync input 470 K (optional) BILL OF MATERIALS (BOM) PIC12C508 3.58 MHz Crystal 2 x 33 pf caps 1 x 47 KΩ, 1 x 470 KΩ resistors DS40160A/4_008-page 2 1997 Microchip Technology Inc.

APPENDIX A: SOURCE CODE MM5369E ========= by Jim Nagy, August 1997 A replacement circuit for the MM5369 60Hz generator, using the PIC12C508 In addition to providing a 60 Hz output from a 3.58MHz crystal, this circuit also provides a 1Hz output, and a sync input. The sync input provides better long term stability than the crystal, as it uses the power line frequency (which is regularly corrected). It can be either half-wave, or full-wave 60Hz, positive going. Circuit connections are as follows: - 60Hz output is from GP0 (pin 7) - 1Hz output is from GP1 (pin 6) - Sync input is on GP2 (pin 5), through a 47KΩ limiting resistor (a 470 KΩ resistor is connected from this pin to Vss, to ensure a ground reference) - GP3 (pin 4) is configured as an active low MCLR, with internal pullup - A 3.579545 MHz (color burst) crystal is connected to pins 2 and 3,with 33 pf capacitors from each pin to Vss as well. - +5V is connected to pin 1, gnd to pin 8 *************************************************************************** Standard Equates W EQU 0 F EQU 1 GPWUF EQU 7 PA0 EQU 5 TO EQU 4 PD EQU 3 Z EQU 2 Zero EQU 2 DC EQU 1 C EQU 0 Carry EQU 0 MCLRDisabled EQU 0 MCLREnabled EQU H'10' CodeProtect EQU 0 NoCodeProtect EQU H'08' WDTDisabled EQU 0 WDTEnabled EQU H'04' IntRCOsc EQU H'02' ExtRCOsc EQU H'03' XTOsc EQU H'01' LPOsc EQU 0 '508 Registers INDF EQU H'00' TMR0 EQU H'01' PCL EQU H'02' STATUS EQU H'03' FSR EQU H'04' OSCCAL EQU H'05' GPIO EQU H'06' program variables Cycles EQU H'07' Cycle counter for 1 Hz output Setting the ID words... 1997 Microchip Technology Inc. DS40160A/4_008-page 3

ORG H'0200' ID0 Data.W H'0000' ID1 Data.W H'0000' ID2 Data.W H'0000' ID3 Data.W H'0007' and the Fuses... ORG H'0FFF' CONFIG Data.W MCLREnabled + NoCodeProtect + WDTEnabled + XTOsc ********************************************* PIC starts here on power up... ********************************************* ORG H'00' Init setting up options... MOVLW B'11000111' TMR0 uses int clock input, /256prescaler OPTION no pullups, and no wakeup on pin change CLRF GPIO MOVLW B'00111100' Want GP0 and GP1 as outputs, TRIS GPIO others are inputs CLRF Cycles prime the 1 Hz counter DECF Cycles,F Main CLRF TMR0 start timing produce 1 cycle of 59 counts (16.88 msec) Cycle1 BSF GPIO,0 set 60Hz output high CALL OneHz and service the 1 Hz output c11 reset the watchdog MOVLW D'30' wait for 30 cycles (8.6 msec) to pass c11 BCF GPIO,0 then set 60Hz output low c12 MOVLW D'36' wait to open the sync window, as sync may still be low due to jitter c12 c13 BTFSC GPIO,2 check for a high sync input c14 and 'arm' the circuits if it is MOVLW D'59' c13 and repeat until one of these occur Cycle2 c14 GPIO,2 sync input was high, wait for lowinput Main and terminate this counter loop if itis MOVLW D'59' c14 produce 1 cycle of 58 counts (16.59 msec) Cycle2 BSF GPIO,0 set 60Hz output high DS40160A/4_008-page 4 1997 Microchip Technology Inc.

CALL OneHz and service the 1 Hz output c21 reset the watchdog MOVLW D'88' wait for 29 cycles (8.3 msec) to pass c21 BCF GPIO,0 then set 60Hz output low c22 MOVLW D'94' wait to open the sync window c22 c23 BTFSC GPIO,2 check for a high sync input c24 and 'arm' the circuits if it is MOVLW D'117' c23 and repeat until one of these occur Cycle3 c24 GPIO,2 sync input was high, wait for lowinput Main and terminate this counter loop if itis MOVLW D'117' c24 produce 1 cycle of 58 counts (16.59 msec) Cycle3 BSF GPIO,0 set 60Hz output high CALL OneHz and service the 1 Hz output c31 reset the watchdog MOVLW D'146' wait for 29 cycles (8.3 msec) to pass c31 BCF GPIO,0 then set 60Hz output low c32 MOVLW D'152' wait to open the sync window c32 c33 BTFSC GPIO,2 check for a high sync input c34 and 'arm' the circuits if it is MOVLW D'175' c33 and repeat until one of these occur Cycle4 c34 GPIO,2 sync input was high, wait for lowinput Main and terminate this counter loop if itis MOVLW D'175' c34 produce 1 cycle of 58 counts (16.59 msec) and ~11 cycles At this point, we've counted 59+58+58+58=233 cycles, or 66.654 msec. We only have to delay a few machine cycles before repeating all... Cycle4 BSF GPIO,0 set 60Hz output high 1997 Microchip Technology Inc. DS40160A/4_008-page 5

CALL OneHz and service the 1 Hz output c41 reset the watchdog MOVLW D'204' wait for 29 cycles (8.3 msec) to pass c41 BCF GPIO,0 then set 60Hz output low c42 MOVLW D'210' wait to open the sync window c42 c43 BTFSC GPIO,2 check for a high sync input c44 and 'arm' the circuits if it is MOVLW D'233' c43 and repeat until one of these occur Main c44 GPIO,2 sync input was high, wait for lowinput Main and terminate this counter loop if itis MOVLW D'233' c44 Main ********************************************* OneHz - routine to service the 1Hz system OneHz INCF Cycles,F the output has just gone high -count it MOVLW D'30' SUBWF Cycles,W compare count to 30 BTFSC GT29 BSF GPIO,1 0<count<30, set output high RETLW 0 GT29 MOVLW D'60' we're >29, but may be 60... SUBWF Cycles,W compare count to 60 BTFSC GT59 BCF GPIO,1 29<count<60, set output low RETLW 0 GT59 CLRF Cycles reset cycle counter, then BSF GPIO,1 set output high RETLW 0 END DS40160A/4_008-page 6 1997 Microchip Technology Inc.