[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-562214-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-562214-en":130,"doc-similar-562214":144},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","nwlc-nixie-clock-program-theory-of-operation","NWLC Nixie Clock program - Theory of Operation","","Software theory and hardware design notes for the NWLC Nixie Clock running on a PIC16LF1519, targeting two B5870 display tubes. The operation explains how tilt sensing (ADXL335 via ADC) selects whether to show hours, minutes, or seconds, how timing is maintained without interrupts to avoid display glitches, and how display formatting minimizes tube off-time for brightness. It also covers battery monitoring, low-voltage behavior, button pin changes, and a 12/24 display handling approach.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/nwlc-nixie-clock-program-theory-of-operation/562214/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/nwlc-nixie-clock-program-theory-of-operation/562214.png","ImageObject",300,407,{"name":42,"@type":43},"Indoniesian Boy","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","text/plain","2026-11-15","2026-10-12",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"How does the clock decide when to show hours versus minutes?","Question",{"text":63,"@type":64},"It uses a tilt sensor (ADXL335) and the tilt sensing algorithm to determine the user-directed tilt state, switching the display sequence from hours to minutes accordingly.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Why does the program avoid interrupts?",{"text":68,"@type":64},"Interrupts are avoided because they cause display glitches; instead, time is incremented by a routine when Timer0 overflows.",{"name":70,"@type":61,"acceptedAnswer":71},"What battery monitoring behavior is implemented for the lithium-ion pack?",{"text":72,"@type":64},"A voltage monitor reads battery level via PA5 and resistors, then reduces or disables the display at lower voltages (minutes stutter below about 3.8V, and the display is disabled below about 3.4V).","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},562214,1792144424,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":22,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":143,"read_time":30,"preview_page_count":4},962090760608,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","; NWLC Nixie Clock program for 2 B5870 tubes and PIC16LF1519\n;\n; Copyright (C) 2005,2010,2012,2015,2016 David Forbes \n;\n; This program is free software; you can redistribute it and/or modify\n; it under the terms of the GNU General Public License as published by\n; the Free Software Foundation; either version 2 of the License, or\n; (at your option) any later version.\n;\n; This program is distributed in the hope that it will be useful,\n; but WITHOUT ANY WARRANTY; without even the implied warranty of\n; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n; GNU General Public License for more details.\n;\n;-------------------------------------------------------------\n; Revision history\n;\n;  06/22/15 DF Making NWLC version with new CPU, pinout, batt mon\n;  12/14/15 DF Boards with proper 1519 chip received. Trying it again\n;              Also added magic number non-init on reset trick from nwrg1.asm\n;              Tilt chip is rotated 90 deg CCW from NWLB! \n;  12/17/15 DF Changed config to disable osc failsafe module\n;   2/25/16 DF nwld1: Changed THrs, UHrs to Hrs 0..23 with LdHrs work for 12hr mode\n;   2/29/16 DF Debugged new 12/24 hour mode, reduced set timeout by half\n;\n;-------------------------------------------------------------\n;                      Theory of Operation\n;\n; This clock has two display tubes and uses them to show\n; first hours, then minutes when the tilt sensor says to.\n;\n; The processor runs at the stately speed of 8192 instructions per second.\n; This has had a big influence on the code structure, as there are no\n; spare cycles to waste. Every NOP is visible in the display.\n;\n; The tilt sensor is a 3-axis accelerometer ADXL335. We use X and Y.\n; A/D converter is two channels with A3 used as power out to tilt sensor.\n; Vref is taken from A3 since the ADXL335 is Vcc-referenced.\n;\n; The tilt sensing algorithm works by looking for both X and Y g factors\n; of approximately 0.65g in the desired direction of upwards and toward \n; the user. \n; To prevent false triggering, an additional constraint is Xtilt + ytilt. \n;\n; The ADC is not very sensitive as used; the tilt values have the following \n; range (approximate).\n; X is h'70' at horizontal, h'80' at vertical. Good tilt \u003C h'75'.\n; NWLB:   Y is h'80' at horizontal, h'90' at vertical. Good tilt > h'8B'.\n; NWLC:   Y is h'80' at horizontal, h'70' at vertical. Good tilt \u003C h'75'.\n;\n; OffLoop waits for valid angles from tilt sensor or Set button push.\n; Pressing the Adv button while off enters diagnostic tilt display mode.\n;\n; When the display turns on it displays hours for a second, then\n; displays minutes for a second, then either shuts off or displays seconds.\n;\n; The display code is constructed to minimize off-time of tubes\n; so that display will be as bright as possible. This means that\n; all display formatting is done outside the tube-scanning loop.\n;\n; There is a diagnostic tilt angle display activated by pressing Adv when off.\n; It is optional code, commented out at this time since external buttons. \n; First X tilt is displayed, then Y tilt, then bat voltage, then back to off. \n; The tilt angle display does a cheesy hex display by lighting two cathodes\n; such as '9' and '1' for hex 'A'. Their sum is the hex value. \n; I could modify this to use BCD, but life is too short. \n; Perhaps someone else wants to do that. \n;\n; Timesetting mode is entered from off loop by detecting Set button held.\n; first we set 12/24 then hours then tens minutes then unit minutes then \n; the tilt angle. The Adv button advances the digit(s) being set.\n;\n; If the watch is tilted for 1 whole second after hrs/mins display,\n; then it enters seconds display mode. It turns off either\n; if it's no longer tilted right or if the seconds timeout expires.\n; Tilt check occurs right after the change of the second. \n;\n; The display period for each second is 2/3 second to save power.\n;\n; Timer is set to div/16384 to give one tick per second.\n; No interrupts are used since they cause display glitches.\n;","cbCaiiTdVEw7uCHt","https://ap.wps.com/l/cbCaiiTdVEw7uCHt","txt",50811,"English","# Theory of Operation\n## Display logic and timing\n## Tilt sensing algorithm\n## Diagnostic tilt display mode\n## Time setting and seconds mode\n## Power and hardware control tricks\n## Battery monitoring and low-voltage behavior\n## 12/24 hour display handling","[{\"question\":\"How does the clock decide when to show hours versus minutes?\",\"answer\":\"It uses a tilt sensor (ADXL335) and the tilt sensing algorithm to determine the user-directed tilt state, switching the display sequence from hours to minutes accordingly.\"},{\"question\":\"Why does the program avoid interrupts?\",\"answer\":\"Interrupts are avoided because they cause display glitches; instead, time is incremented by a routine when Timer0 overflows.\"},{\"question\":\"What battery monitoring behavior is implemented for the lithium-ion pack?\",\"answer\":\"A voltage monitor reads battery level via PA5 and resistors, then reduces or disables the display at lower voltages (minutes stutter below about 3.8V, and the display is disabled below about 3.4V).\"}]","NWLC Nixie Clock program - Theory of Operation | TXT",1791808032,{"list":145,"token":11},[146,153,159,165,171,177,183,190,196,202],{"doc_id":147,"doc_title":148,"file_type":149,"home_preview_img_url":150,"slug":151,"view_count":115,"category_name":29,"create_tm":152},562192,"Nixie Watch - Technical Schematic","pdf","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947799201/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=WwisZd%2FMSC75TWIKXT43PyXqGiQ%3D","nixie-watch-technical-schematic",1791807976,{"doc_id":154,"doc_title":155,"file_type":149,"home_preview_img_url":156,"slug":157,"view_count":97,"category_name":29,"create_tm":158},561215,"QUASAR PROJECT KIT - 12/24 HOUR GIANT CLOCK","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947641912/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=RA7b7cPJplCCNv6PCD3h%2BRndHw0%3D","quasar-project-kit-1224-hour-giant-clock",1791805285,{"doc_id":160,"doc_title":161,"file_type":149,"home_preview_img_url":162,"slug":163,"view_count":33,"category_name":29,"create_tm":164},672606,"Tube Substitution Handbook - Complete Handbook to Replacements for Vacuum Tubes and Picture Tubes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229989488328/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=SDL%2BGZAvgVA8aLS0d6tfDN8DIf4%3D","tube-substitution-handbook-complete-handbook-to-replacements-for-vacuum-tubes-and-picture-tubes",1793600951,{"doc_id":166,"doc_title":167,"file_type":149,"home_preview_img_url":168,"slug":169,"view_count":123,"category_name":29,"create_tm":170},562665,"TUNGSRAM Electron Tubes - Semiconductors '76 - Type Assortment - Radio and TV Receiving Tubes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947823963/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=6w9BDvYtrJwfT9pq6doGnN8DJlI%3D","tungsram-electron-tubes-semiconductors-76-type-assortment-radio-and-tv-receiving-tubes",1791809315,{"doc_id":172,"doc_title":173,"file_type":149,"home_preview_img_url":174,"slug":175,"view_count":97,"category_name":29,"create_tm":176},720637,"7 SEGMENT MODULE - 4DIGIT - TM1637 7 Segment 4 Digit I2C Display Module Specification","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023676667/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=XObVEG0QqJY6JBVtpRmGZVE2lB8%3D","7-segment-module-4digit-tm1637-7-segment-4-digit-i2c-display-module-specification",1795038588,{"doc_id":178,"doc_title":179,"file_type":149,"home_preview_img_url":180,"slug":181,"view_count":33,"category_name":29,"create_tm":182},700244,"MicroPython Documentation - Quick Reference for the pyboard","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012021799/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=ge%2BY6jmxUeGPXw%2F4jZ0OmjQzOJQ%3D","micropython-documentation-quick-reference-for-the-pyboard",1794517692,{"doc_id":184,"doc_title":185,"file_type":149,"home_preview_img_url":186,"slug":187,"view_count":188,"category_name":29,"create_tm":189},562977,"Chunghwa Picture Tubes, Ltd. Technology Specification - CLAA062LA01CW - Revision Status","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947844651/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=mwpGW7JuxfxKIfii%2BeKONCWwipU%3D","chunghwa-picture-tubes-ltd-technology-specification-claa062la01cw-revision-status",13,1791810249,{"doc_id":191,"doc_title":192,"file_type":149,"home_preview_img_url":193,"slug":194,"view_count":110,"category_name":29,"create_tm":195},641666,"SHIMANO Total Electric Power System - SC-EM800 User's Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229970462454/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=VFGveWRK%2BWZZIoO9c%2B3B850w89E%3D","shimano-total-electric-power-system-sc-em800-users-manual",1792715944,{"doc_id":197,"doc_title":198,"file_type":149,"home_preview_img_url":199,"slug":200,"view_count":188,"category_name":29,"create_tm":201},560240,"IN-12 Nixie Tube Clock Kit - Assembly instruction and user manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947611841/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=94aruq3%2FGiPyOl%2FG6HagLHSXDaQ%3D","in-12-nixie-tube-clock-kit-assembly-instruction-and-user-manual",1791802505,{"doc_id":203,"doc_title":204,"file_type":205,"home_preview_img_url":206,"slug":207,"view_count":115,"category_name":29,"create_tm":208},561285,"SONY AE6AB G2 - G2 adjustment - Set G2 control to just before flyback return lines disappear","doc","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947743944/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796211539&Signature=Q1DVypcpJwCOrLT2zQm3wZenVd0%3D","sony-ae6ab-g2-g2-adjustment-set-g2-control-to-just-before-flyback-return-lines-disappear",1791805484]