LCD Interfacing: In this tutorial i will show you how to interface 16x2 LCD with micro-controller. 16x2 means there are two rows and each row contain maximum 16 characters. For more detail refer to the LCD datasheet, which you are using. Basic Connection: Applies 5v to pin 2 and gnd to pins 1 & 5. Use variable resistor at pin 3 to set contrast. Pins 7 to 14 are the data pins,, used to send/rec data. Pin 6 is of enable; every time when you write to lcd you should have to give high to low, to this pin. pin 4 is register select pin use to give commands like clear, home etc. In this tutorial i will interface lcd in 4-bit instead of 8-bit, so we only required four data pins. Code: Lets write a code that will display the motor status and its direction; it will be fun!!!! Requirements: Design a motor controller circuit using l298 and display its status on lcd. LCD is connected to portb and motor controller circuit is at portd. Required two switches to change motor direction; if both ar
Comments
Post a Comment