Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 /* 00002 * PCF8576 + GH08172 LCD test program 00003 */ 00004 00005 #include "mbed.h" 00006 #include "PCF8576.h" 00007 00008 PCF8576 lcd(D14, D15); 00009 Ticker flipper; 00010 00011 void blink() 00012 { 00013 static uint32_t cnt = 0; 00014 const uint32_t ptn[5] = {0, 1, 3, 7, 0xF}; 00015 00016 if (cnt > 4) { 00017 cnt = 0; 00018 } 00019 lcd.icon(ptn[cnt++]); 00020 } 00021 00022 int main() 00023 { 00024 char buf[6]; 00025 flipper.attach(&blink, 0.4); 00026 00027 lcd.print("mbed"); 00028 wait(5); 00029 00030 int cnt = 0; 00031 while(1) { 00032 sprintf(buf, "%6d", cnt++); 00033 lcd.print(buf); 00034 wait(0.1); 00035 } 00036 }
Generated on Thu Jul 14 2022 04:36:08 by
1.7.2
NXP PCF8576 Universal LCD driver