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 #include "mbed.h" 00002 #include "my_i2c.h" 00003 00004 DigitalOut myled(LED1); 00005 00006 // Connections made: 00007 // SDA to pin9 of LPC4088 QSB 00008 // SCL to pin10 of LPC4088 QSB 00009 // on I2C bus is PCF8574 connected at sub-address 0 (0x40). 00010 // all supplied at 3.3V 00011 // no external pullup (5K internal pullup used by my_i2c functions) 00012 // 00013 // note in the my_i2c functions a delay of 1us is added after each transition of the pin. 00014 // so this means an absolute maximum frequency of 500kHz. 00015 00016 int main() { 00017 00018 while(1) { 00019 myled = 1; 00020 my_i2cStart(0x40); 00021 my_i2cWrite (0x55); 00022 my_i2cStop(); 00023 wait(0.5); 00024 myled = 0; 00025 my_i2cStart(0x40); 00026 my_i2cWrite (0xAA); 00027 my_i2cStop(); 00028 wait(0.5); 00029 } 00030 }
Generated on Fri Jul 15 2022 13:24:00 by
1.7.2