chipKIT® Development Platform

Inspired by Arduino™

Interfacing With keppad and LCD

Created Tue, 04 Feb 2014 04:11:01 +0000 by ajitnayak


ajitnayak

Tue, 04 Feb 2014 04:11:01 +0000

Dear all,

[url]http://www.digibay.in/433-16x2-lcd-and-keypad-shield-i2c-spi-for-arduino?filter_name=LCD[/url]

[url]http://www.digibay.in/253-4%C3%975-matrix-20-key-membrane-switch-keypad?filter_name=keypad[/url]

I am planning to use above component as interface.I need small coding help here. I need to set perameter like below latitude:__degree longitude:__degree date:dd/mm/yy time:hh/mm/sec start time:9 stop time:18 Enter to save data. Once data being set it has used throughout program. and provision to change the perameter. Can some one help me in coding.

I gone through LCD and Keypad Interface . But i need some code to get started.


guymc

Tue, 04 Feb 2014 18:19:30 +0000

Well, the best way to learn coding is to start with a simple example program. The MPIDE includes dozens of examples, so choose an easy one (such as blink) and jump in. Once you get the example running on your hardware, then proceed to make a single, minor change and run it again. Once you confirm that the behavior has changed as expected, try it again in a different way, or with a different example.

MPIDE along with a chipKIT/Fubarino/Arduino board is the prefect environment for self-learning. Take small steps, and always begin with a known, working condition. I think you will be surprised at how quickly you can make progress.

If you get stuck, we're always here to help. But you need to learn a few simple things first, before we can have a productive conversation.

Welcome aboard, ajitnayak!


ajitnayak

Wed, 05 Feb 2014 04:49:47 +0000

I have tried simple things Like blinke rtc interface gps interface and all.

But not tried Communicated LCD and Keypad WIth Chipkit uno 32. I need algorithm help here also like If i am looking from Application end usage How to configure user data and use data to other calculation in program. And also possible to modify the values and being updated There.


ajitnayak

Thu, 06 Feb 2014 11:48:00 +0000

Can some One share Me the Circuit diagram for Connecting 4X4 Keypad and 16X2 LCD interface.


majenko

Thu, 06 Feb 2014 11:55:30 +0000

Have you tried asking google? The schematics will be exactly the same as doing it on an Arduino, you just have a greater choice of pins.


hdphilip

Fri, 07 Feb 2014 07:22:02 +0000

here's a good place to start.

http://tronixstuff.com/tutorials/


ajitnayak

Sat, 15 Feb 2014 13:40:31 +0000

Dear all.

I am using Below circuit for interfacing Lcd and keypad. [url]http://www.freetronics.com/pages/16x2-lcd-shield-quickstart-guide#.Uv9jb87pegI.[/url] Basically i completed above code and seems working fine. Now plan to build algorithms such that i configure data like date , time, latitude, longitude . after Modifying Display Date and time On screen with Desired angle calculation. Desired angle might Refer to motor Encoder output0-5v converted 0-360 degree.Now i Need Suggestion On Building the code. The Algorithms Steps. I can modify @ any instant. If change time Desired angle has to change accordingly. After changing It show date and time with angle Desired position. The LCd and Keypad Interface working fine. Can someone help to build algorithm


ajitnayak

Sat, 15 Feb 2014 13:43:16 +0000

Have you tried asking google? The schematics will be exactly the same as doing it on an Arduino, you just have a greater choice of pins.

Intially google it. after some trial and Errors LCD and keypad seems Working fine.


ajitnayak

Sat, 15 Feb 2014 13:46:28 +0000

Well, the best way to learn coding is to start with a simple example program. The MPIDE includes dozens of examples, so choose an easy one (such as blink) and jump in. Once you get the example running on your hardware, then proceed to make a single, minor change and run it again. Once you confirm that the behavior has changed as expected, try it again in a different way, or with a different example. MPIDE along with a chipKIT/Fubarino/Arduino board is the prefect environment for self-learning. Take small steps, and always begin with a known, working condition. I think you will be surprised at how quickly you can make progress. If you get stuck, we're always here to help. But you need to learn a few simple things first, before we can have a productive conversation. Welcome aboard, ajitnayak!

**I completed Basic stage Of LCd and Keypad Interface. Now I Need sample code Where i can Modify the values and Program start running using these Modified values. I have the build circuit as above [url]http://www.freetronics.com/pages/16x2-lcd-shield-quickstart-guide#.Uv9jb87pegI.[/url]

**


ajitnayak

Mon, 17 Feb 2014 05:44:59 +0000

ANy update on coding


guymc

Mon, 17 Feb 2014 21:16:11 +0000

It sounds like you're off to a great start.

One thing you'll probably need is a way to format and display values that have been calculated at run-time. You can do that by creating a char array or buffer that is large enough to hold a complete display line:

char line1_dat[] = "abcdefghijklmnop"; // max 16 char string

You will also need a char pointer variable, which is a convenient way to pass the buffer around:

char *line1 = (char *) &line1_dat;

To load the buffer, use snprintf(), which has the added benefit of protecting memory in case we try to write too much. In this example, a text label and integer variables var1 and var2 are formatted into the buffer. The first parameter is the buffer. The second parameter is the buffer size; anything written beyond that length will be safely discarded. The third parameter is the format string, followed by the variables you want to print:

snprintf(line1, 16, "values: %i  %i", var1, var2);

Once the buffer has been loaded, you can pass it to LCD:

lcd.print(line1);

Hope this helps..


ajitnayak

Tue, 18 Feb 2014 11:55:21 +0000

Dear all,

Some how i made code working . But i am facing wiered problem here.

I have 2 codes here. code 2 and code3: In code 2 i am updating date/time. latitude ,longitude . In this code, it allows user to set the value . once it set modify value can seen serial monitor and not exit loop unless the perameter being set.

code3: this my main code. It uses same thing but problem here is as soon as try to modify the value it getout of the loop.Can someone review the code.

The CODE2 is cutted and pasted in LCD.h and LCD_c file of the code3.rar file.Let me know why it is doing it