Picbasic Pro LCD2041 problems

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

Moderators: Henry, Mods

Post Reply
smitty505000
LCD?
Posts: 2
Joined: Tue Sep 12, 2006 7:37 pm

Picbasic Pro LCD2041 problems

Post by smitty505000 »

Hello all,

I am ready to pull my hair out! I am trying to get the 2041 to receive code from a pic 16f628 20mhz via serout2. I have tried every baud setting and just get garbage. I have set the jumpers on the back of the 2041 to TTL. Here is the simple Picbasic PRO code I am using to test the lcd.

DEFINE OSC 20 ' We're using a 20MHz oscillator

main: pause 1000 ' wait for the LCD to startup
SEROUT2 PORTB.5, 16468, [254, 88] ' clear display
SEROUT2 PORTB.5, 16468, ["HELLO WORLD"] ' send hello world
pause 1000 ' wait one second
goto main ' do it again

Before trying the lcd on the pic, I hooked it to my pc with the jumpers in the RS232 position and it worked fine with the uproject program. At that point I sent raw data to the lcd and set it for 9600 baud. I checked it again in uproject and it confirmed the 9600 baud setting.

Any ideas????

Thanks,
Smitty
smitty505000
LCD?
Posts: 2
Joined: Tue Sep 12, 2006 7:37 pm

Post by smitty505000 »

I Solved the problem!! I was using a pic 16f628-20p which has a 20 mhz internal ocs. After doing some research Seams the internal osc isnt that acurate. Maybe thats why microchip dosnt make them anymore. I put an external 20mhz resonator on and it works great now with baud setting 84 (9600, driven, true, no parity).

Smitty
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Glad to hear. Thank you for posting on the forum.

The info you shared might help someone out there.
Raquel Malinis
Design and Development
Matrix Orbital
Post Reply