Recent Posts

Freescale/NXP MPC5606B: LCD 16x2_4-bit Mode Program


What ever programs we have seen till now, All of them were programs for specific module.

Now this is the Library to interface 16x2 LCD to MPC5606B or any other DSP of similar family.
- Interfacing LCD with microcontroller is very common, But I couldn't find library for 16x2 LCD interfacing for DSP.
- I have developed this library with the help of my friend Akshay Nirgude by porting already existing library for ATmega 32 micro-controller.


In this example,
- 16x2 LCD module interfacing is done in 4 bit mode.
- RS, RW and Enable connections can be seen or changed in file "LCD16x2_4bitMode.h"
- Similarly, D0 to D7 LCD connections can be defined in "LCD16x2_4bitMode.h" file.
- We have implemented, delay method in this LCD interfacing program.
(Another is busy flag method)
- delay generated in the program is using Real Time Clock (RTC)



Problem Statement:Interface 16x2 LCD in 4 bit mode and display string on the LCD.

Program Outcome: (Following string will be seen on LCD)
LCD Checking...
Done.

LCD INITIALIZED!
     APDAGA


Connections
:
LCD PINS => Pad No.  => Port No.
LCD_RS   => PCR[88]  => PF[8]
LCD_RW   => PCR[89]  => PF[9] 
LCD_EN   => PCR[90]  => PF[10]

LCD_D0   => PCR[80]  => PF[0] //NoConnection for 4 bit Modee 
LCD_D1   => PCR[81]  => PF[1] //NoConnection for 4 bit Modee 
LCD_D2   => PCR[82]  => PF[2] //NoConnection for 4 bit Modee 
LCD_D3   => PCR[83]  => PF[3] //NoConnection for 4 bit Mode
LCD_D4   => PCR[84]  => PF[4]
LCD_D5   => PCR[85]  => PF[5]
LCD_D6   => PCR[86]  => PF[6]
LCD_D7   => PCR[87]  => PF[7]


NOTE:
> Program developed by Akshay P Daga

Exercise:
Make the connections shown above:
- Observe whether strings are displayed on the LCD display.

Downloads:
LCD_16x2_4bit_Mode_TRK-MPC5606B_APDaga

Click here to see more codes for Freescale/NXP MPC56xx Family.

Feel free to ask doubts in the comment section. I will try my best to solve it.
If you find this helpful by any mean like, comment and share the post.
This is the simplest way to encourage me to keep doing such work.

Thanks and Regards,
-Akshay P. Daga

No comments