Sample code for PIC18F452 to a 632 or 634 display???

paysonbadboy

New member
This thing is kicking my butt.

Last year when I bought a few of the Crystal Fonts displays I got them to work with the Basic Stamp.

Now I am learning to use the Microchip processors and am finding any info to set up the programming properly using PicBasic Pro

I have altered a few lines of what I used with the Stamp, but all I get is jibberish on the display.

If it was a parallel display I could use the LCDOUT code with my programmer, but this thing is a serial one wire and I don't know if I should use SEROUT or SEROUT2, etc....


Any sample code, like setting up the LCD if needed, and a few lines to do something like clr the screen and print a message?
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

paysonbadboy

New member
Wait a sec...

I am testing a PIC18452 and using an oddball crystal osc which is 3.57 (guess what that was for)
and maybe since it's NOT 4 MHZ (like my osc define is) could that be throwing all timing out the window???
The setup is working for other tests, but timing isn't critical with what I have got the controller to do.

I have some more controllers on order, some with internal osc

Still would like some sample code if anyone knows any. Thanks.
 

paysonbadboy

New member
LOL yeah. But that page was for programming in ASSEMBLER. I'm more of a "Basic" type of guy.

I used your LCD's on the Basic Stamp from Parallax. The MicroChip using the PiBasic Pro compiler is very similar and I just got some of those this week!

I got garbage on the display no matter what mode I tried. I think it was 9600 inverted that worked before. n9600 or something.

But like I said in my last post, I am not using the correct external Crystal Oscilator so maybe that is messing it all up?


I was hoping someone used Pic Basic Pro. Once I saw how they set it up for a SERIAL LCD I could learn from there...



Now my manual does show how to do it in parallel mode with some Hitachi LCD chip??? Then I can use the LCDOUT instructions in my manual.....
 

CF Tech

Administrator
If the clock frequency of the processor is different from what the serial routines expect, then that could certainly explain it.

Try setting the baud at 9600*4/3.57 = 10756 baud.
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

paysonbadboy

New member
I'll try that and see if it works. LOL!

Tuesday I have some F688's and some other nifty PIC's being shipped so I may try again with those as well.


I guess PIC's were not meant to operate on a color burst crystal??? :D
 

paysonbadboy

New member
Well... seems like you can't put in that odd baud rate using PicBasic Pro. Maybe if it was in Assembler or something. But I am not to that level yet.

I also tried defining the osc at 3.57 instead of 4 at the beginning of the program, and it didn't accept that at all.



Well. when I get the controllers on Tuesday I'll find out if it is the clock or not. Most of my new ones can use internal clocks.
 

paysonbadboy

New member
Well well, my order of PIC's from Microchip came a day earlier.

I hooked up a 16F688 that has an INTERNAL clock and it works.

must have been the oddball oscillator I was using for sure!



The 632 is now making a great "debug" type of interface for me to work on the controller's Analog to Digital conversions and what not.

I still would like to find a good command list that would work with Pic Basic Pro

Some of the commands set up for the Basic Stamp do not work :(
 
Top