The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

USING DIRECTLY DRIVE DISPLAY SAVES MONEY SPACE SMALL, LOW-COST APPLICA


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



DIRECT DRIVE DISPLAYS
USING DIRECTLY DRIVE DISPLAY SAVES MONEY SPACE SMALL, LOW-COST APPLICATIONS.
INTRODUCTION
often necessary small microprocessor-based devices display status information user. quantity information small, light emitting diodes (LEDs) give simple status display. However, LEDs practical volume information gets large. Segmented displays allow more information displayed but, LEDs consume power, shortening life battery-operated devices. Liquid crystal display (LCD) modules small, light, low-power alternative. displays purchased that display nearly anything using matrix segmented display discrete areas liquid crystal. drawback matrix cost dedicated controller chip that usually required drive glass. While LCDs difficult control, they very unforgiving. They require constant attention because voltage change across liquid crystal destroy crystal structure ruin display. Also, typical dot-matrix display panels require large number signal inputs. This makes impractical dot-matrix displays without dedicated driver chip. This chip built directly into same case glass, this combination then called module. Note: Application Note AP96Z8X1400, Interfacing LCDs (found Application Note Handbook), describes modules used with Zilog family microcontrollers. displays also made segmented fashion, however. This type display uses segments liquid crystal form characters enunciators, same manner used LED-segmented displays. Since total number controlled segments lower than with matrix-type displays, take direct control glass. This application note describes designer interface directly simple using Z86X3X Z86X4X family microcontrollers.
THEORY OPERATION Basics
liquid crystal display manufactured layering polarizing liquid crystal between plates glass polarizer. (See Figure When voltage potential developed across liquid crystal, crystalline matrix twists. effect that voltage controls polarizing filter, alternately blocking transmitting light.
Glass Liquid Crystal Glass Polarizer Reflector Backlight
Figure Cross Section
Applying control voltage long period time causes matrix liquid crystal permanently twist, ruining polarizing effect. prevent this problem,
AP97Z8X1800
Direct Drive Displays must pulsed-first direction, then other. shifting effect neutralized. voltage alternated quickly enough (typically that does perceive segment flickering. Traditional panels were built with backplane glass acting common conductor segments. Another glass plate conductor each segment brought edge panel connection outside. signals drive this type display illustrated Figure
Zilog Figure illustrates segments share segment driver line Figure shows signals that would generated drive segments.
Phase Com_1 Com_2 Seg_AG
"off"
Segment +Von Vcom -Von
Segment
Seg.
Seg. Figure Plane Drive Signals
Typical) Figure Drive Signal
number segments driven increases, number pins required driver chip increases proportionally.
Multiple Backplanes
order reduce number control lines required, large segment counts, modern display panels usually built with more than backplane. This done splitting backplane glass into several conductors connecting more than segment each control pin. Then, placing signal common pins well segment pins, segments toggled independently.
this example, segment (the character) would segment (the across middle) would OFF. common planes drive alternating signal with periods zero between each high drive pulse planes phase with each other. common signal then driven with data both pins, data common data common inverted data common inverted data common Figure shows this sequence.
Figure Phased Data Sequence
Seg_AG
Com_
resulting waveforms each segment shown bottom Figure Root Mean Squared (RMS) value signal segment larger than initial voltage liquid crystal appears dark while voltage across segment below threshold segment clear. important keep each segment toggling quickly enough prevent noticeable flicker. common planes must toggle twice fast two-plane configuration, four times fast four plane, forth. Obviously, number backplanes goes speed driving processor must also increase. This sets trade between speed controller complexity glass side count other.
Com_2 Figure Backplane Example
AP97Z8X1800
Zilog
Direct Drive Displays
HARDWARE IMPLEMENTATION Application
demonstrate method using directly drive glass, this application note implements small, battery-operated travel alarm clock. clock design single alarm setting with snooze feature audible alarm. Z86L43
Glass
glass this type application typically custom manufactured volume. This gives user flexibility selecting initial threshold voltage that matches chosen power supply well explicitly defines appearance segments number backplanes. purposes this note, circuit designed around that left over from another project. threshold voltage about volts, segment lines backplanes. Using supply voltage that range from volts down volts, worst-case voltage across segment calculated
Com_1 Com_2
Figure Three Level Drive Circuit common signals generated, phase phase, simply driving three port pins correct state. example, generate phase zero, would driven HIGH pins driven LOW. common voltage then while common voltage resistive divider from Vol. state accomplished driving three pins driving segments LOW. Since common mode component ignored glass, this safe state. segment drivers simply connected directly port outputs since they only need drive HIGH LOW. This method allows backplanes uncommon feasible number) times segment lines total segments, including enunciators. This maximum case leaves only four inputs (port lower nibble) free outputs. alternative available more segments required. Figure shows port used common driver using fixed resistor dividers.
Voff
(1.5
1.06V
which below threshold segment stays clear. segment's worst-case voltage calculated
158V
which well above threshold. Thus, 3-volt lithium button-cell supply works nicely.
Driving Backplanes
Since microprocessors normally deal negative output voltages, center line plots usually half supply voltage referenced ground chip. positive drive level chip supply negative drive level ground. liquid crystal insensitive component common both backplane segment lines, only difference between them matters. This accomplished using binary drive shown Figure
Z86L43 Com_x
Figure Alternate Common Drive
Using this method allows back planes times segment lines total segments. This configuration speed limited, however, state continues draw current through dividers unless AP97Z8X1800
Direct Drive Displays external circuitry added deactivate power. There also penalty software complexity port used plane drivers, extra pins used outputs. circuit described this application note uses first method generating common backplane signals. number segments available from backplane solution sufficient. fact, Z86L33, 28-pin device enough.) complete schematic shown next page Figure
Zilog case. When case closed, automatically turns switch OFF. backlight actually directly driven button input. control LEDs, allowing disabled when power allowing light stay seconds after button released. backlight optional because draws significant power from batteries. second battery easily added supply backlight. This battery could also higher voltage further improve battery life allow different type backlight. Piezo buzzer driven hardware timer using timer-out mode. This minimizes software requirement. buzzer tied between with small resistor series reduce in-rush current when toggles. protect circuit from reversed battery condition, diode placed from ground battery inserted incorrectly, diode prevents from going more than volts below ground, quickly discharging destroying battery. more common method placing diode line between battery drawback reducing voltage given battery voltage. Often, battery still some energy left when gets work correctly.
User Interface
Aside from glass itself, user interface consists Piezo buzzer generate alarm sound, optional backlight, five buttons used setting time, setting alarm, snooze backlight, power switch. power switch does actually deactivate power since must keep running update real-time clock. Instead, power switch input When switch position, shuts down LCD, ignores buttons. reduced software load lets HALT mode higher percentage time, saving current. switch break-before-make slider built into clam-shell style
AP97Z8X1800
Zilog
Direct Drive Displays
Piezo Buzzer
P2[0.4]
Z86L33 XTAL1 1MHz XTAL2
P3[0.3]
Power
Snooze
Alarm
Lithium Figure Optional Backlight Circuit Figure Direct Drive Demo Circuit
Light
AP97Z8X1800
Direct Drive Displays
Zilog
SOFTWARE IMPLEMENTATION Driver
heart application direct drive software, course. drive based timer interrupt that runs every (100-Hz plane drive frequency.) This timer interrupt must occur time since deviation causes voltage applied liquid crystal. this reason, timer interrupt always priority over other sections code. Also, since math cause variable execution length, math service performed advance. Immediately after timer interrupt acknowledged, data copied port pins. service routine then sets about calculating data next interrupt. This ensures that only variable placement edges pins interrupt latency. real time clock driven timer When timer interrupt issued, contents registers copied ports. then performs math required next phase. current phase values offset holding register, PHASE_PTR. value PHASE_PTR switches from each cycle, points data sent plane plane described first section, value causes inversion common planes alternating cycles. common plane voltages generated using function flip appropriate pins each cycle. current value port outputs stored image register ensure that function reads valid data levels allow next plane state prior cycle. next state simply created taking current value with number that represents pins that should flip this cycle. number then updated change pins that flip next cycle. Because pins question P34, P37, magic numbers 0x30 0x80, alternately. easiest flip number between 0x30 0x80 alternately adding 0x50 decimal) 0xB0 (-80 decimal.) Storing adder value register results sign flipping each cycle just taking two's complement (COM then INC.) means programmer only LOAD holding registers CALL update routine. simplicity, data program stored binary BCD) value. then easy that number offset into lookup table seven segment display characters. difficulty comes from having backplanes LCD. three-and-a-half digits clock split across planes. characters have their segments split exactly same way. some manipulation required format seven-segment data correctly LCD. UPDATE_HOURS UPDATE_MINUTES routines handle this chore. would also possible create lookup tables each digit separately, preformatted LCD, then series operations correct order data bytes required. This would some extra lookup tables would faster. option consider speed-limited application, especially space premium.
Real Time Clock
Real Time Clock (RTC) applications fairly common today with most appliances having clocks front panel. While possible dedicated clock chip time keeping, often cheaper easier software. Note: Zilog Application Note number AP96Z8X1100 (found Application Note Handbook) describes methods generating software family. This application similar crystal method shown there. interesting item code DISP_HOURS DISP_MINS pointers. order simplify switching display from current time alarm setting snooze-timer setting, these registers point actual location time display. pointer used make copy time registers prior doing manipulation needed before displayed.
Button Inputs
buttons except backlight button interrupt driven. button routines such that they interrupted timer. fact, timer used create debounce delay after button pressed. Three four buttons have least modes operation. Alarm button serves make clock display alarm time setting. also toggles alarm shuts alarm buzzer. snooze bar, similarly, causes clock display snooze time-out setting causes alarm into snooze mode pressed while buzzer sounding. Advance button does nothing itself but, when pressed
Data Manipulation
display given combination segments, software load data registers with correct numbers. Because data being inverted four cycles, important that data into registers correct time. ensure this, UPDATE_DISPLAY routine takes data from holding registers waits interrupt service tick many times necessary until back phase Then data copied into data registers. This
AP97Z8X1800
Zilog while other three buttons held, causes displayed time increment. Advance button depressed continuously, rate change accelerates. exception, Clock button, serves only clock time only functions conjunction with Advance button. backlight button interrupt driven. sampled once each 10-ms period, after updated.
Direct Drive Displays pressed, backlight activated two-second timer loaded. button still down next sampling, counter reloaded. When button released, counter starts decrementing. When reaches zero, LEDs extinguished. complete software listing appended below.
LCD_APPS.S software implementation plane, direct drive controller. This program designed implement alarm clock demonstrate ability display data made three 7-segment digits plus several enunciators. designed around Z86L33 running 1MHz crystal. |-+-+ ||||||||||||||| (4)10K |-^v^v-+- LCD[1] |-^v^v-+- LCD[2] P30-3 Switch[3:0] LCD[15:11] -200 LCD[10:3] Piezo |-v^v^-+ Z86L33 -(4)10K -Switch[3:0] -+-+-+-+-^v^-+ Phase Data ||||;
AP97Z8X1800
Direct Drive Displays Pin: PL0: COM1 PL1: COM2 Defines LCD_group .EQU PHASE_PTR .EQU SWITCH_PLANE .EQU NEXT_PLANE .EQU P0_DATA1 .EQU P0_DATA2 .EQU P1_DATA1 .EQU P1_DATA2 .EQU P2_DATA1 .EQU P2_DATA2 .EQU GL_LIGHT_CNT .EQU P3_COPY .EQU GL_P3_COPY .EQU CLK_group P0D1_NEXT P0D2_NEXT P1D1_NEXT P1D2_NEXT P2D1_NEXT P2D2_NEXT DISP_HOURS DISP_MINS HOURS GL_HOURS BLANK_HOURS MINUTES GL_MINUTES BLANK_MINS HALF_SECS HUNDRETHS ALARM_HOURS GL_A_HOURS ALARM_MINS GL_A_MINS SNOOZE_MINS CLK_STATUS GL_CLK_STATUS .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU CLK_group+8 CLK_group+9 CLK_group+12 CLK_group+13 CLK_group+15
Zilog
CAUTION!
CAUTION!
CLK_STATUS masks
AP97Z8X1800
Zilog TIME_SET AM_PM ALARM_AM_PM SETTING POWER SNOOZE ALARMING ALARM_ON WORK_group SCRATCH0 SCRATCH1 SCRATCH2 SCRATCH3 DEBOUNCE_CNT ADVANCE_CNT ALARM_TIME SNOOZE_TIME BLANK_HOURS BLANK_MINS PTR_HI PTR_LO TAB_PTR HOLD1 HOLD2 HOLD3 HOLD4 .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU .EQU 00000001B 00000010B 00000100B 00001000B 00010000B 00100000B 01000000B 10000000B WORK_group WORK_group+1 WORK_group+2 WORK_group+3 WORK_group+4 WORK_group+5 WORK_group+6 WORK_group+7 RR10 WORK_group+12 WORK_group+13 WORK_group+14 WORK_group+15
Direct Drive Displays
Enunciator masks PM_ON .EQU COLON_BLINK .EQU BEL_ON .EQU Z_ON .EQU AL_ON .EQU ONE_ON .EQU
00000001B 00000001B 00001000B 00010000B 00010000B 00000010B
mask backlight control LIGHT_BIT .EQU 00100000B Interrupt masks ALL_BUTTONS .EQU NO_BUTTONS .EQU ADV_ONLY .EQU SET_ONLY .EQU CLR_BUTTONS .EQU
00101111B 00100000B 00100010B 00100100B 11110000B
Extended register file defines PCON .EQU .EQU
AP97Z8X1800
Direct Drive Displays WDTMR .EQU
Zilog
Interrupt vector table .ORG .WORD ALARM_BUTTON .WORD ADV_BUTTON .WORD SET_BUTTON .WORD SNOOZE_BAR .WORD Init .WORD T1_SERVICE Start main program .ORG
IRQ0 IRQ1 IRQ2 IRQ3 IRQ4 IRQ5
(P32) (P33) (P31) (P30) (T0) (T1)
Alarm button Advance button Time button Snooze Just carrier, Master clock/LCD timer
Initialize part Init: .WORD %310F #%0F Config SMR/PCON/WDTMR WDTMR #%13 Current #%22 mode PCON #%16 (%06 L43) #%00 P01M #%04 P0,1=out, Stack #%C0 P2=out, P26,7 #%01 P3=IO, Pull #%04 LCD>Snz>Tim>Alm>Adv>T0 #SET_ONLY Enable TimeSet #%F0 Init Stack Pointer CALL CLK_INIT CALL LCD_INIT Init P31/2 falling edge Ints #CLK_group MAIN: POWER_ON: TURN_OFF: CALL CALL CALL CLK_STATUS #POWER POWER_OFF #%80 NO_CHANGE DEBOUNCE CLK_STATUS #^C(POWER) CLK_STATUS #^C(ALARMING) #%FC LCD_INIT NO_CHANGE #%80 NO_CHANGE DEBOUNCE #ALL_BUTTONS CLK_STATUS #POWER power off? switch moved? Discard pending buttons Clear power Shut alarm Shut buzzer Shut
POWER_OFF: TURN_ON:
switch moved? Discard pending buttons Back normal power
AP97Z8X1800
Zilog NO_CHANGE: HALT CLK_STATUS #TIME_SET NO_CHANGE #SET_ONLY
Direct Drive Displays time set? TimeSet Only
Stay HALT until timer ticks MAIN
CLK_INIT:
CALL CALL
PRE0 #%05 #CLK_group HOURS #%12 MINUTES HALF_SECS #120 HUNDRETHS ALARM_HOURS HOURS ALARM_MINS CLK_STATUS #00100000B DISP_HOURS #GL_HOURS DISP_MINS #GL_MINUTES P0D1_NEXT P0D2_NEXT P1D1_NEXT P1D2_NEXT P2D1_NEXT P2D2_NEXT GL_LIGHT_CNT BLANK_HOURS #%FF BLANK_MINS #%FF SNOOZE_TIME #%05 ALARM_TIME #%05 UPDATE_HOURS UPDATE_MINS
prescale, Mod-N mode (decimal) Generate 3.7kHz tone Start midnight (decimal) ;(decimal) Alarm time midnight alarm off, snooze Display current time (Note: these POINTERS) Clear display enunciators
Make sure light
minutes snooze longest alarm time Load "Next" registers
LCD_INIT:
#LCD_group #%F3 #%00 #%30 #%50 P3_COPY #%10
Stop Clear display
Phase next
Initialize Phase
AP97Z8X1800
Direct Drive Displays CALL UPDATE_DISP; PRE1 #%2B #%4C Stuff working registers prescale, contin mode (decimal) 100Hz Timer Start Tout0 mode
Zilog
#250
debounce. Used four routines. DEBOUNCE: #NO_BUTTONS DEBOUNCE_CNT DBNCE_LOOP: DEBOUNCE_CNT #%05 DBNCE_LOOP #CLR_BUTTONS
Ignore further button IRQs
Wait
Discard buttons pending
SET_BUTTON:
SET_TIME:
SET_LOOP:
CALL CALL IRET
DEBOUNCE CLK_STATUS #ALARMING SET_TIME
alarm ringing?
SET_LOOP Wait button release CLK_STATUS #(TIME_SET SETTING) DISP_HOURS #GL_HOURS Make sure time displayed DISP_MINS #GL_MINUTES P2D1_NEXT #^C(Z_ON) Turn P2D2_NEXT #^C(AL_ON) Turn "AL" #ADV_ONLY Only allow button IRQs #00000010B SET_LOOP DEBOUNCE CLK_STATUS #^C(SETTING) #ALL_BUTTONS Wait button release
Back normal
ALARM_BUTTON:
CALL
DEBOUNCE CLK_STATUS #ALARM_ON alarm SET_ALARM P2D2_NEXT #^C(BEL_ON) Turn bell indicator P2D1_NEXT #^C(Z_ON) Turn snooze indicator CLK_STATUS #01111111B Turn alarm CLK_STATUS #^C(ALARMING) Shut alarm ringing CLK_STATUS #SNOOZE Turn snooze mode #%FC Silence alarm
AP97Z8X1800
Zilog ALM_LOOP CLK_STATUS #SETTING DISP_HOURS #GL_A_HOURS DISP_MINS #GL_A_MINS P2D2_NEXT #AL_ON P2D2_NEXT #BEL_ON CLK_STATUS #ALARM_ON #ADV_ONLY
Direct Drive Displays
SET_ALARM:
Display alarm time Turn Turn Turn Only "AL" bell indicator alarm allow button IRQs
ALM_LOOP:
CALL IRET
#00000100B ALM_LOOP DEBOUNCE DISP_HOURS #GL_HOURS DISP_MINS #GL_MINUTES P2D2_NEXT #^C(AL_ON) CLK_STATUS #^C(SETTING) #ALL_BUTTONS
Wait button release
Display current time Turn "AL" Back normal
SNOOZE_BAR:
START_SNOOZE:
SNOOZE_LOOP:
SNOOZE_DONE:
CALL CALL IRET
DEBOUNCE P2D1_NEXT #Z_ON CLK_STATUS #ALARMING START_SNOOZE DISP_HOURS #BLANK_HOURS DISP_MINS #SNOOZE_TIME CLK_STATUS #SETTING #ADV_ONLY SNOOZE_LOOP CLK_STATUS #^C(SNOOZE) SNOOZE_MINS SNOOZE_TIME #%FC #00000001B SNOOZE_LOOP DEBOUNCE DISP_HOURS #GL_HOURS DISP_MINS #GL_MINUTES CLK_STATUS #SNOOZE SNOOZE_DONE P2D1_NEXT #^C(Z_ON) CLK_STATUS #^C(SETTING) #ALL_BUTTONS
Turn indicator alarm ringing? Display snooze timer Setting mode Allow IRQs
snoozing mode Init snooze counter Silence alarm Wait button release
Display time Snooze mode? Turn Done setting Back normal
AP97Z8X1800
Direct Drive Displays
Zilog
ADV_BUTTON: CALL
ADV_ALARM: ADV_TIME: ADV_CLOCK:
PUSH DEBOUNCE CLK_STATUS #ALARMING ADV_DONE CLK_STATUS #SETTING ADV_DONE SCRATCH0 SCRATCH0 SCRATCH0 #%0F SCRATCH0 #%0C ADV_CLOCK SCRATCH0 #%0A ADV_SNOOZE ADVANCE_CNT SCRATCH2 CALL CALL ADVANCE_CNT SCRATCH2 ADV_LOOP SCRATCH2 ADVANCE_CNT SCRATCH0 ADV_DONE
nothing alarm ringing We're mode, exit
ALARM buttons only? buttons only?
ADV_LOOP:
Wait half second tick Save current counter Either button released?
ADVANCE:
NO_ROLL_ADV:
@DISP_MINS #%01 @DISP_MINS @DISP_MINS #%60 ADV_UPDT @DISP_MINS @DISP_HOURS #%01 @DISP_HOURS @DISP_HOURS #%12 NO_ROLL_ADV @DISP_HOURS #%01 ADV_UPDT CLK_STATUS SCRATCH0 CLK_STATUS #SETTING UPDATE_CLK
minute (BCD) Roll minutes? Reset minutes hour (BCD) Roll hours?
Roll hours Toggle appropriate AM_PM SETTING (Leaves INTs disabled)
ADV_UPDT:
FASTMODE:
ADVANCE_CNT #%10 into fast mode (>15 INCs) ADV_LOOP DEBOUNCE (Just wait 50mS) ADVANCE_CNT #%10 prevent roll over 00h) ADVANCE
AP97Z8X1800
Zilog
Direct Drive Displays
ADV_SNOOZE: ADV_SNOOZE1: ADV_SNZ_LOOP:
NO_ROLL_SNZ:
ADV_DONE:
CALL CALL IRET
SCRATCH0 #%09 ADV_DONE ADVANCE_CNT ADVANCE_CNT #%000 ADV_SNZ_LOOP SNOOZE_TIME #%01 SNOOZE_TIME SNOOZE_TIME #%31 NO_ROLL_SNZ SNOOZE_TIME #%01 UPDATE_CLK #%09 ADV_SNOOZE1 #00001000B ADV_DONE DEBOUNCE
SNOOZE buttons only?
Wait half second tick snooze limit (BCD) mins
Leaves Ints disabled Either button released? Wait button release
T1_SERVICE:
This takes care time prevent offset. #LCD_group GL_CLK_STATUS #POWER LCD_OFF %08(R4) %0A(R4) %0C(R4) P3_COPY CALL #%40 LCD_OFF GL_LIGHT_CNT #%04
refresh, must
update power R8,9 hold P0's resp. R10,11 R12,13
CHK_LIGHT:
Test input Force light
LCD_OFF:
SKIPCOMP:
P3_COPY Update Plane outputs #%01 Switch pointer SKIPCOMP Only invert every other time Invert data next phase #%1F; (Only lower bits used) #%1F Update Plane modifier Switch sign (+50h -50h) CLK_TICK
AP97Z8X1800
Direct Drive Displays IRET
Zilog
CLK_TICK: each 10mS
#CLK_group DEBOUNCE_CNT HUNDRETHS CLK_EXIT HUNDRETHS P2D1_NEXT #^C(LIGHT_BIT) P2D2_NEXT #^C(LIGHT_BIT) GL_LIGHT_CNT LIGHT_OFF P2D1_NEXT #LIGHT_BIT P2D2_NEXT #LIGHT_BIT
DJNZ each half second LIGHT_OFF: TICK1: NOT_ALARMING: DJNZ each minute each hour NOT_NOON:JR each minute CHK_ALARM: CALL each half second UPDATE_CLK: CALL CALL
Count 100ths second ;(decimal)
Turn backlight
Turn backlight
ADVANCE_CNT CLK_STATUS #TIME_SET time TICK1 DISP_HOURS #%30 Blink display. DISP_MINS #%30 UPDATE_CLK don't increment time P0D1_NEXT #COLON_BLINK Toggle colon CLK_STATUS #(ALARMING SNOOZE) Alarming snooze? NOT_ALARMING #00000010B Toggle buzzer on/off HALF_SECS UPDATE_CLK Count half seconds HALF_SECS #120 (decimal) MINUTES #%01 MINUTES MINUTES #%60 CHK_ALARM MINUTES HOURS #%01 HOURS HOURS #%12 NOT_NOON HOURS #%01 CHK_ALARM CLK_STATUS #AM_PM CLK_STATUS #POWER UPDATE_CLK CHECK_ALARM UPDATE_HOURS UPDATE_MINS add,
add,
Skip alarm power
AP97Z8X1800
Zilog CALL UPDATE_DISP
Direct Drive Displays Write time data
CLK_EXIT:
CHECK_ALARM:
DJNZ
CLK_STATUS #ALARM_ON ALARM_DONE CLK_STATUS #ALARMING CHECK_TIME CLK_STATUS #SNOOZE NOT_SNOOZING SNOOZE_MINS ALARM_DONE P2D1_NEXT #^C(Z_ON) ALARM_TIME #%05 SND_ALARM
Alarm Alarm ringing? Snooze counter running? Subtract snooze minute Turn Reset alarm time "Get bum!"
CHECK_TIME:
SND_ALARM: ALARM_DONE:
HOLD4 CLK_STATUS HOLD4 Align alarm AM/PM with time AM/PM HOLD4 CLK_STATUS Compare HOLD4 #AM_PM Ignore other bits ALARM_DONE Same? HOURS ALARM_HOURS ALARM_DONE MINUTES ALARM_MINS ALARM_DONE #%03 Sound alarm CLK_STATUS #(ALARMING SNOOZE) ALARMING SNOOZE bits
NOT_SNOOZING:
ALARM_TIME ALARM_DONE #%FC Shut buzzer CLK_STATUS #^C(ALARMING) alarming
UPDATE_HOURS:
NO_SHIFT:
ITS_AM:
P0D1_NEXT #%E1 P0D2_NEXT #%E0 @DISP_HOURS #%FF END_UPD_HOURS HOLD4 CLK_STATUS DISP_HOURS #GL_A_HOURS NO_SHIFT HOLD4 HOLD4 #AM_PM ITS_AM P0D2_NEXT #PM_ON HOLD4 @DISP_HOURS HOLD4 #%F0 NO_ONE
Blank hours digits hours should blank
it's Turn enunciator there's leading
AP97Z8X1800
Direct Drive Displays CALL P0D2_NEXT #ONE_ON GET_DISP HOLD4 P0D1_NEXT HOLD4 HOLD3 HOLD3 P0D2_NEXT HOLD3 Turn leading Line positions
Zilog
NO_ONE:
END_UPD_HOURS:
UPDATE_MINS:
D_NOT_SET:
END_UPD_MINS:
CALL SWAP SWAP
P0D1_NEXT #%1F P0D2_NEXT #%1F P2D1_NEXT #%F0 P2D2_NEXT #%F8 @DISP_MINS #%FF END_UPD_MINS HOLD4 @DISP_MINS GET_DISP HOLD4 D_NOT_SET HOLD4 #%08 P2D1_NEXT HOLD4 P2D2_NEXT HOLD3 HOLD2 #%0E HOLD2 P0D1_NEXT HOLD2 HOLD1 HOLD1 P0D2_NEXT HOLD
Blank minutes digits
minutes should blank
Move into carry into position
Drop segment Align nibbles Align bits
UPDATE_DISP:
Make sure interrupt GL_P3_COPY #%80 UPDATE_DISP Wait true data state data
GET_DISP:
Takes packed byte returns with corresponding digit nibbles RR12 RR14 PUSH
AP97Z8X1800
Zilog SWAP SWAP SWAP #WORK_group #%0F #%0F #^HB(TABLE) #^LB(TABLE) #%00 @RR10 #%0F #%0F #^HB(TABLE) #^LB(TABLE) #%00 @RR10 #%0F #%0F
Direct Drive Displays
Packed BCD, digits display digit digit
digit table offset (carry into upper byte) digit code into
code into
TABLE:
.BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .BYTE .END
bafcged 01111011B 01001000B 01100111B 01101101B 01011100B 00111101B 00111111B 01101000B 01111111B 01111100B 01111110B 00011111B 00110011B 01001111B 00110111B 00110110B
Digit lookup table
AP97Z8X1800

Other recent searches


SQJ412EP - SQJ412EP   SQJ412EP Datasheet
Si9978DW - Si9978DW   Si9978DW Datasheet
MAXQ2000 - MAXQ2000   MAXQ2000 Datasheet
ILD615 - ILD615   ILD615 Datasheet
ILQ615 - ILQ615   ILQ615 Datasheet
Am29F160D - Am29F160D   Am29F160D Datasheet
ADE71xx - ADE71xx   ADE71xx Datasheet
ADE75xx - ADE75xx   ADE75xx Datasheet
2SC3907 - 2SC3907   2SC3907 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive