- on Microcontrollers
- Published in issue 7/2000 on page 0
Implementing the I2C Bus
New instructions for MCS-51 BASIC
The popular but already somewhat outdated programming language MCS-51 BASIC does not have any instructions for controlling an I2C bus. Fortunately, it’s easy to add home-made instructions to this version of BASIC.More than twelve years ago, when Intel’s development engineers made their BASIC interpreter (which was actually intended for internal, experimental use) available to the general public in the form of the mask-programmed 8052-AH-BASIC microcontroller, the development of I2C communications was still in its infancy. It’s thus no surprise that no thought was given to instructions for controlling an I2C bus. Of course, it is possible to program an I2C interface using the regular instructions, since there is no minimum clock frequency specified for I2C communications.