Hello, I'm new to PIC's and still on my trial period using PBP3. I have a fairly good understanding of electronics, and have written alot of programs in BASIC (about 30 years ago!). PBP3 seems like a great program, and I got off to a good start with simple LED control programs and testing my tweaks.
But today, I have spent 6+ frustrating hours and really havent gotten anywhere. My confidence and ambition is on the floor, so I'm reaching out for help....
All I want to do, is get the 4-bit "Hello World" LCD display program, provided by PBP as an example, to run with my 16F688.
I believe the root problem is that the LCDOUT command is set up to use PortB.3 for the LCD Enable signal. But, 16F688 doesnt have a PortB, it only has PortA and PortC. I tried to add a statement to DEFINE PORTC.0 (Pin-10 on the 16F688) but I keep getting ASM Error 113 (symbol not defined). I've tried many other things, too....some generating errors, some not. I put an LED lighting command inside the loop, to make sure its working, and it is. I just get nothing on the display except for solid black boxes on power-up.
Would someone please give me a hand? I could really use the help, to get moving forward again.
Heres the raw/original sample program I am trying to use, its straight from the PBP3 website. It was apparently written for Ver 2.6 and I have Ver 3.0.6.1
' Name : LCD.pbp
' Compiler : PICBASIC PRO Compiler 2.6
' Assembler : PM or MPASM
' Target PIC : 16F or 18F
' Hardware : LCD display
' Oscillator : Any internal or external
' Keywords : LCDOUT
' Description : PICBASIC PRO program to demonstrate operation of an LCD in 4-bit mode.
'
' LCD should be connected as follows:
' LCD PIC
' DB4 PortA.0
' DB5 PortA.1
' DB6 PortA.2
' DB7 PortA.3
' RS PortA.4 (add 4.7K pullup resistor to 5 volts)
' E PortB.3 <============ 16F688 doesnt have a Port B
' RW Ground
' Vdd 5 volts
' Vss Ground
' Vo 20K potentiometer (or ground)
' DB0-3 No connect
Pause 500 ' Wait for LCD to startup
mainloop:
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "Hello" ' Display Hello
Pause 500 ' Wait .5 second
Lcdout $fe, 1 ' Clear LCD screen
Lcdout "World"
Pause 500 ' Wait .5 second
Goto mainloop ' Do it forever
End
Thanks for any help on this!
Bill![]()
Bookmarks