Search found 14 matches

by evanwright
Tue May 09, 2006 11:03 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Please excuse my ignorance.

But, you are a very smart girl!

Thanks again,
-evan
by evanwright
Tue May 09, 2006 10:45 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Hey Raquel,
I dont mean to sound cheesy but, you are my hero!

Thankyou so much. It is working perfectly now.

You are a very smart guy.

Thanks again,

-evan
by evanwright
Tue May 09, 2006 10:40 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

I believe that either I am incorrectly reading the lcd and always reading the value 0xff. Or for some reason the only values in the keypad buffer are 0xff.
by evanwright
Tue May 09, 2006 10:27 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

This is my latest code:

void main(void) //main program begins here
{


setup();
command(clrscn);
command(repeatModeOff);
command(transmitkeyOff);
command(clearKeyBuf);

printChar('T');
printChar('e');
printChar('s');
printChar('t');
printChar(':');

printChar('n');

loop:
kp = getKey ...
by evanwright
Tue May 09, 2006 9:52 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Hey Raquel,
I tried out your code suggestions and Im still not getting the expected results. Do you have any more ideas?

Do you have any simular examples that might help me?

Thanks,
-evan
by evanwright
Fri May 05, 2006 12:23 pm
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Raquel,

Just a quick question.

What is the poll keypad command? Is it not necessary for the way I am trying to read the keypad?

I wont be able to try out your suggestions untill later but I will let you know if that helps.

Also, I reallized that the block means there is probably nothing in ...
by evanwright
Fri May 05, 2006 11:00 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Hey Raquel,

Well, I have looked at the waveforms over and over and I have finally come up with the following code. It seems to be reading the lcd however it only prints a solid square on the screen. I think I may have the reading sequence correct however maybe my logic on how to read from the lcd ...
by evanwright
Wed May 03, 2006 3:28 pm
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Hey Raquel,

Well, I havent had any more luck, however maybe the changes i made were not correct. Here is my updated code. Any ideas? (Did you notice the keypad commands I have in clrscn(). Maybe those are wrong)

-evan

void main(void) //main program begins here
{

unsigned char kp;
clrscn ...
by evanwright
Wed May 03, 2006 12:04 pm
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Hey Raquel,
So I have finally mastered writing all the commands to the lcd thanks to you.

But I havent been successful with reading the keypad yet. I have a 4x4 keypad wired to the lcd correctly. I have included the code I am using. Everyonce in a while I will get one key pressed to display but ...
by evanwright
Tue May 02, 2006 10:58 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Oh, I see. So each command you send has to be proceded by a 0xfe.

Oh, and I finally got it to display Hello. It turns out that one big problem was the following code at the end of each function. I was forgetting to clear the PIR1bits.SSPIF bit.

SSPCON2bits.PEN = 1; //send stop bit
while ...
by evanwright
Mon May 01, 2006 5:43 pm
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Well, we are definately getting somewhere now. For the first time ever I have seen something on the lcd besides the start up screen. However, instead of "Hello" like the program is designed to output I just get a "K" in the top left corner.

You were right about the while loops though. Thankyou ...
by evanwright
Mon May 01, 2006 5:24 pm
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Okay, so I understand now.

Anyways, this pic does have internal pull up resistors but I have them dissabled. I have a 10k pull up resistors on my board for both SDA and SCL.

Both lines are staying high.
by evanwright
Mon May 01, 2006 4:31 pm
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

Thanks for replying. I disconnected the lcd and still no activity on either sda or scl lines. Also, if the default jumpers(J1 and J2 installed) gave you an I2C address of 0x5c or 1011100 then to write to the lcd you would send 10111000 or b8 right? Maybe I am confused about the whole 7bit addressing ...
by evanwright
Mon May 01, 2006 11:00 am
Forum: LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT
Topic: I2C on my 18f452.....please help
Replies: 27
Views: 37886

I2C on my 18f452.....please help

I just picked up a lk204-25 lcd and I am using a microchip 18f452 pic. I have tried countless different things to get this lcd to work. However, nothing seems to have any effect on the display.

I am using a 4MHz crystal and 10k pull up resistors on the SDA and SCL lines. I have also tried 4.7k ...