I2C and SSPIF

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
combatc2
LCD?
Posts: 3
Joined: Tue Dec 12, 2006 8:30 pm
Location: USA

I2C and SSPIF

Post by combatc2 »

I am trying to communicate via I2C (LVKP162-12 PCB R3.0) with a PIC18F452 (Master). I have a second LCD that I'm using to troubleshoot with and have found that I get stuck in a while loop while waiting for an aknowledgement back from the slave.

I was testing out the code on forum post:

http://lcdforums.com/forums/viewtopic.p ... 1e1e#17470

with only a few minor changes.

I de-soldered the three RS232 jumpers and put two of them on the I2C protocol jumpers and am not sure if this was done successfully. Is there any way to check to make sure the jumpers are soldered on correctly?

I attached the code (and it's with the quikflash board http://www.picbook.com )


Any help is greatly appreciated and merry X-mas to all.


Thanks,
Carl
Attachments
I2C.c
Driver program
(783 Bytes) Downloaded 378 times
I2C.h
Includes functions from the above mentioned forum post
(1.27 KiB) Downloaded 344 times
LCD.h
Controls on-board Qwikflash LCD for troubleshooting
(1.02 KiB) Downloaded 427 times
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hello Carl,

Thank you for your post.

I suggest that instead of troubleshooting with another LCD, just use a scope. You might want to simplify the code as well (taking away all the troubleshooting LCD's code) to be able to pin point what the problem is. Your code looks fine, I just wornder about all the extra stuff. Start with something simple, like clearing the screen on the LK162-12, ie. send 254 / 88 via I2C.

Please let me know how it works out.
Raquel Malinis
Design and Development
Matrix Orbital
Post Reply