Help with connecting LK162 to PIC24FJ
Posted: Wed Feb 13, 2008 1:40 pm
I can not get the LK162 and PIC to talk..... any ideas would be greatly appreciated.
Here is what I have tried so far.....
I know I am programming UART comm correctly on the PIC... I altered the PIC program to transmit to hyperterminal and data was received.
I know the LCD is working - I have no problem interfacing it with an ATmega168 via UART
I have moved the UART lines to different pins on the PIC to be sure it was not a problem with pins or a conflict with the programmer.
I setup my PIC to send the signals to the ATmega168 - all the ATmega168 does is relay what is received from the PIC to the LCD - this works fine.
I also attempted to use an op-amp (rail-2-rail) to convert a 3v signal to 5v - cannot get this to work but I am still playing with it
I will also try a diode bridge to convert the 3v signal to 5v....
Anyone have any ideas ??? I can post my code if that will help.... but like I said, the code seems to work fine with several different tests....
So what makes the transmit signal different out of the PIC verses the ATmega168 ? and why can the ATmega168 receive the PIC signal, but the LCD can't ?
Is it something simple like the ATmega168 UART being bi-endian (bit-wise) and the LCD not ? something else for me to research - but if anyone knows the endian-ness of PICs and/or ATmega168s let me know. I guess a simple test would be to send the bits in reverse order and see if anything shows on the LCD.... ie. 254 = 11111110, so I would send 01111111 (decimal 127) instead ?
Like I said, any thoughts on this would be much appreciated.
Here is what I have tried so far.....
I know I am programming UART comm correctly on the PIC... I altered the PIC program to transmit to hyperterminal and data was received.
I know the LCD is working - I have no problem interfacing it with an ATmega168 via UART
I have moved the UART lines to different pins on the PIC to be sure it was not a problem with pins or a conflict with the programmer.
I setup my PIC to send the signals to the ATmega168 - all the ATmega168 does is relay what is received from the PIC to the LCD - this works fine.
I also attempted to use an op-amp (rail-2-rail) to convert a 3v signal to 5v - cannot get this to work but I am still playing with it
I will also try a diode bridge to convert the 3v signal to 5v....
Anyone have any ideas ??? I can post my code if that will help.... but like I said, the code seems to work fine with several different tests....
So what makes the transmit signal different out of the PIC verses the ATmega168 ? and why can the ATmega168 receive the PIC signal, but the LCD can't ?
Is it something simple like the ATmega168 UART being bi-endian (bit-wise) and the LCD not ? something else for me to research - but if anyone knows the endian-ness of PICs and/or ATmega168s let me know. I guess a simple test would be to send the bits in reverse order and see if anything shows on the LCD.... ie. 254 = 11111110, so I would send 01111111 (decimal 127) instead ?
Like I said, any thoughts on this would be much appreciated.