{"id":13894372,"url":"https://github.com/graetz23/coolSAA1064","last_synced_at":"2025-07-17T09:32:08.394Z","repository":{"id":13539031,"uuid":"16230703","full_name":"graetz23/coolSAA1064","owner":"graetz23","description":"The coolSAA1064 arduino library handles the 7 segment Philips / NXP SAA1064 driver for easily displaying and scrolling numbers and words on up to four displays.","archived":false,"fork":false,"pushed_at":"2024-05-03T03:50:50.000Z","size":943,"stargazers_count":6,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-24T23:33:18.932Z","etag":null,"topics":["7-segment","7-segment-display","arduino","arduino-library","clock","cplusplus","display","i2c","i2c-bus","integrated-circuits","library","nxp","oldschool","pcb","pcb-design","pcb-layout","pcbs","philips","saa1064","thermometer"],"latest_commit_sha":null,"homepage":"https://github.com/graetz23/coolSAA1064","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graetz23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-25T12:38:42.000Z","updated_at":"2024-05-03T03:50:53.000Z","dependencies_parsed_at":"2024-01-19T08:17:10.544Z","dependency_job_id":"5b919223-13a6-4a7e-a3fa-c8ed9b6dd601","html_url":"https://github.com/graetz23/coolSAA1064","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/graetz23/coolSAA1064","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2FcoolSAA1064","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2FcoolSAA1064/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2FcoolSAA1064/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2FcoolSAA1064/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graetz23","download_url":"https://codeload.github.com/graetz23/coolSAA1064/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2FcoolSAA1064/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265589186,"owners_count":23793483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7-segment","7-segment-display","arduino","arduino-library","clock","cplusplus","display","i2c","i2c-bus","integrated-circuits","library","nxp","oldschool","pcb","pcb-design","pcb-layout","pcbs","philips","saa1064","thermometer"],"created_at":"2024-08-06T18:01:30.861Z","updated_at":"2025-07-17T09:32:08.094Z","avatar_url":"https://github.com/graetz23.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"## The coolSAA1064 arduino library\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/graetz23/coolSAA1064)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/graetz23/coolSAA1064)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/y/graetz23/coolSAA1064)\n![GitHub Repo stars](https://img.shields.io/github/stars/graetz23/coolSAA1064?style=social)\n![GitHub forks](https://img.shields.io/github/forks/graetz23/coolSAA1064?style=social)\n\n### Introduction ###\n\nThe coolSAA1064 arduino library handles the 7 segment Philips / NXP SAA1064 driver.\n\n![coolSAA1064 sent in by some user](coolSAA1064.jpg)\n\nThe Philips / NXP SAA1064 drives up to four 7 segment displays via an _i2c_ communication. The 7 segments have to have a common _anode_, otherswise you have to use _a lot_ transistors. Anyway the huge advantage of the SAA1064 is, that it deals with up to 18 V of VCC, still driving a 5 V (max. 5.9 V) level on i2c wires. That allows for driving _large_ 7 segments, that are internally built by four to six LED diodes, and need an break through voltage of about 8 V to 12 V. Top of the line, the SAA1064 can control the current of the segments, and makes diming possible.\n\n### Why\n\nIn 2013 / 2014, I experimented with arduino, the real time clock module _DS1307_, and some need for _output_. It looked somehow like this:\n\n![coolSAA1064 sent in by some user](coolSAA1064_breadboard.jpg)\n\nThe SAA1064 _was still available_ and satisfied my need for output, but unfortunately there was no library for _an easy way of_ using the SAA1064 available. So I (re-)structured, utilized, and object-oriented my SAA1064 code towards this arduino library implementation.\n\n### Revival\n\nAnd in 2020 there's again the need for _output_. A friend of mine renovate some _foosball_ (colored Germany vs. Brazil) and built in some _photoelectric barrier_ to detect goals; he asked how to display a seven to one best. :-)\n\n![coolSAA1064 sent in by some user](coolSAA1064_PCB_top.png)\n\nHowever the internet _supported_ me several orange 7 segment displays with an _alpha size_ of 2.3 inch (5.842 cm); that's a 7 seg of 6.97 cm x 4.78 cm. The problem arised how to wire 4 x 9 and 16 resistors, a DIL-24 socket for the SAA1064, and infrastructure, .. :-|\n\n![coolSAA1064 sent in by some user](coolSAA1064_PCB_bottom.png)\n\nTherefore, I designed a PCB, where the 7 segments are on top, and all other parts are on the backside to encase it ..\n\n![coolSAA1064 sent in by some user](coolSAA1064_PCB_layout.png)\n\n### Live\n\nHere is a link of dry running the PCB by the coolSAA1064 library with an arduino UNO. The 2.3\" 7-segments are colored orange, the room is dark so it has some spectacular glowing effect. At the end the coolSAA1064 uses its _text scrolling ability_ ..\n\n[![dry running the coolSAA1064 arduino library](https://img.youtube.com/vi/L6sKXfyUpWc/0.jpg)](https://www.youtube.com/watch?v=L6sKXfyUpWc)\n\n### Examples\n\n**Bake object and dry run segments**\n```C++\nSAA1064 saa1064; // generate an object\nsaa1064.scollCooLSAA1064( ); // shows functionality\n```\n\n**Set the brightness easily**\n```C++\nsaa1064.clear( ); // clean up all segments\nsaa1064.say( 8888 ); // switch all segments on\nsaa1064.setDark( ); // set output currents to 3 mA\nsaa1064.setNormal( ); // set output currents to 12 mA\nsaa1064.setBright( ); // set output currents to 21 mA\n```\nor try the intensity in seven steps ..\n```C++\nsaa1064.clear( ); // clean up all segments\nsaa1064.say( 8888 ); // switch all segments on\nfor( int i = 1; i \u003c 8; i++ ) {\n  saa1064.setIntensity( i );\n  delay( 250 ); // wait\n}  // loop\n```\n**Display some number over all segment**\n```C++\nsaa1064.clear( ); // clean up all segments\nsaa1064.say( 5 ); //       5\ndelay( 250 );\nsaa1064.say( 15 ); //     15\ndelay( 250 );\nsaa1064.say( 815 ); //   815\ndelay( 250 );\nsaa1064.say( 2815 ); // 2815\ndelay( 250 );\n```\n\n**Display some number over all segment; fill front with zeros**\n```C++\nsaa1064.clear( ); // clean up all segments\nsaa1064.sayByZero( 5 ); //    0005\ndelay( 250 );\nsaa1064.sayByZero( 15 ); //   0015\ndelay( 250 );\nsaa1064.sayByZero( 815 ); //  0815\ndelay( 250 );\nsaa1064.sayByZero( 2815 ); // 2815\ndelay( 250 );\n```\n\n**Display some number by each segment**\n```C++\nsaa1064.clear( ); // clean up all segments\nsaa1064.say( 1, 0 ); // show 1 on 1st (id 0) digit\ndelay( 250 );\nsaa1064.clear( );\nsaa1064.say( 2, 1 ); // show 2 on 2nd (id 1) digit\ndelay( 250 );\nsaa1064.clear( );\nsaa1064.say( 3, 2 ); // show 3 on 3rd (id 2) digit\ndelay( 250 );\nsaa1064.clear( );\nsaa1064.say( 4, 3 ); // show 4 on 4th (id 3) digit\ndelay( 250 );    \n```\n\n**Say some time and date**\n\n```C++\nsaa1064.clear( ); // clean up all segments\ndelay( 250 );\nsaa1064.sayTime( 8, 5 );\ndelay( 250 );\nsaa1064.sayTime( 8, 15 );\ndelay( 250 );\nsaa1064.sayTime( 18, 15 );\ndelay( 250 );\nsaa1064.sayDate( 24, 01 );\ndelay( 250 );\nsaa1064.sayDateUS( 01, 24 );\ndelay( 250 );\nsaa1064.sayYear( 14 );\ndelay( 250 );\nsaa1064.sayYear( 2014 );\ndelay( 250 );\n```\n\n**Scroll time and date**\n\n```C++\nsaa1064.scrollTime( 18, 15, 00, 250 ); // right to left by 250 ms per step\nsaa1064.scrollDate( 15, 2, 2014, 250 ); // right to left by 250 ms per step\n```\n\n**Use it as an amplitude**\n```C++\n// amplitude in levels from 0 to 7\nsaa1064.clear( ); // clean up all segments\nfor( int i = 0; i \u003c 8; i++ ) {\n  saa1064.amplitude( i );\n  delay( 125 );\n} // loop\nfor( int i = 7; i \u003e= 3; i-- ) {\n  saa1064.amplitude( i );\n  delay( 125 );\n} // loop\nfor( int i = 3; i \u003c 6; i++ ) {\n  saa1064.amplitude( i );\n  delay( 125 );\n} // loop\nfor( int i = 5; i \u003e= 0; i-- ) {\n  saa1064.amplitude( i );\n  delay( 125 );\n} // loop\n```\n\n\n**Predefined words and letters**\n```C++\nsaa1064.clear( ); // clean up all segments\nsaa1064.sayFoo( ); //  writes ' foo'\ndelay( 250 );  \nsaa1064.saybAr( ); //  writes ' bar'\ndelay( 250 );\nsaa1064.sayOn( ); //   writes '  On'\ndelay( 250 );\nsaa1064.sayOFF( ); //  writes ' OFF'\ndelay( 250 );\nsaa1064.sayGO( ); //   writes '  gO'\ndelay( 250 );\nsaa1064.sayOPEn( ); // writes 'OPEn'\ndelay( 250 );\nsaa1064.sayLOAd( ); // writes 'LOAd'\ndelay( 250 );\nsaa1064.sayPLAY( ); // writes 'PLAY'\ndelay( 250 );\nsaa1064.sayDISC( ); // writes 'dISC'\ndelay( 250 );\n```\n\nFor more have a look at the [coolSAA1064.ino](https://github.com/graetz23/coolSAA1064/blob/master/coolSAA1064.ino) and try running it.\n\nAnd for more letters and their _id_ have a look at the [\\_init( ) method](https://github.com/graetz23/coolSAA1064/blob/master/coolSAA1064.cpp#L107).\n\n### Library Features\n\nThe most usable features of the library:\n\n  - select IC's internal test mode switching on all segments,\n  - select mode for two or four digits,\n  - select the intensity of the segments by dark, normal, bright,\n  - select the intensity of the segments by an integer 1 .. 7,\n  - display a number by 0 to 9999 as integer; blank not used,\n  - display a number by 0000 to 9999 as integer; not blanking,\n  - display hex values 0000 to FFFF as integer 0 .. 15,\n  - display letters by an interal code 16 .. following,\n  - display a digit as integer on a selected segment as update,\n  - display a digit as byte on a selected segment as update,\n  - display a digit on a selected segment as register update,\n  - display four digits seperately as integer or blank by -1,\n  - display four digits seperately as bytes,\n  - display one of a predefined word; CooL, Foo, bAr, ...,\n  - display a predefined smiley; 8-],\n  - display the time directly,\n  - display the date and the date in US and year,\n  - scroll any integer or internal codes by milliseconds per step,\n  - scroll time by 'hour-minute-second' from right to left,\n  - scroll date by 'day-month-year' from right to left,\n  - display an amplitude from right to left by an integer of 0 .. 7,\n  - display all possible letters that are stored internal,\n  - display all byte coding over all segments; takes time!\n\n### Implementation\n\nAll necessary I2C communications are realized by only three methods:\n\n  - \\_set( .. ); // set the configuration of SAA1064; once implemented,\n  - \\_say( .. ); // tell bytes for displaying to SAA1064; two times implemented.\n\nAll other methods for communicating are using these two methods.\n\n### Releases\n\nThere are [stable releases available](https://github.com/graetz23/coolSAA1064/releases) by cloning or downloading and unzipping.\n\n### Remarks\n\nEverything was coded using:\n\n  - [**SAA1064 IC**](https://www.nxp.com/docs/en/application-note/AN264.pdf) from NXP,\n  - [**7 Segments**](https://de.wikipedia.org/wiki/Segmentanzeige) displays; _in German langugage only_,  \n  - [**arduino**](https://www.arduino.cc/) project,\n  - [**arduino IDE**](https://www.arduino.cc/en/main/software) _around 2014_,\n  - [**arduino Makefile**](https://github.com/sudar/Arduino-Makefile) for automated building,\n  - [**atom**](https://atom.io/) editor,\n  - [**Gnome**](https://www.gnome.org/) as window manager,\n  - and [**debian**](https://www.debian.org/) GNU/Linux.\n\nhave fun :-)\n\n## Change Log\n\n**20230518**\n  - updating copyright by year ..\n\n**20200414**\n  - bug fix on added say word method; was in byte code not array index!\n\n**20200413**\n  - released version v1.1:\n    - due to [issue \\#1](https://github.com/graetz23/coolSAA1064/issues/1), the created _setup()_ method for calling 'Wire.begin()',\n    - by version 1.1, call 'saa1064.setup()' in arduino's 'setup()'.\n  - released version v1.:\n    - added standard say mathods:\n      - sayOn, sayOFF, and sayGO,\n      - sayOPEn, sayPLAY, sayLOAd, and sayDISC.\n    - Therefore I\n      - moved '-' from id 26 to 27,\n      - moved ']' from id 27 to 28,\n      - moved '°' from id 28 to 29,\n      - added 'Y' to as id 26.\n    - moved \\_init() method to line _100_ to fix it there for referencing,\n    - In honors to the _discontinued_ SAA1064, rewritten readme, added pictures, examples, ..\n\n**20140215**\n  - first stable implementation available.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraetz23%2FcoolSAA1064","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraetz23%2FcoolSAA1064","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraetz23%2FcoolSAA1064/lists"}