Hi Skimask,
Thank you! I didn't know about that. Please let us know what you find out!
/Henrik Olsson.
Hi Skimask,
Thank you! I didn't know about that. Please let us know what you find out!
/Henrik Olsson.
Originally Posted by HenrikOlsson
I just checked it out.
If you look in any .lst file that contains any LCD defines or usage, you'll see that the LCD_COMMANDUS is a word variable internal to PBP and, as I suspected, LCD_DATAUS is a byte variable internal to PBP. So, you can't use anything higher than 255 in LCD_DATAUS.
Another thing to be changed in upcoming PBP manuals...
JDG
well, i've NEVER use a higher value than 100uSec (50uSev typical) on those various LCD i work and i worked. I don't believe there's some on the market that will really need more than 100 uSec.
If the LCD show only Black square it's because it fail to initialise properly or the contrast is set to max.
Reasons to fail:
- Too short startup delay, some may need up to secondes... try PAUSE 2000, if it works, reduce it 'till you find a comfort zone
- Some wires are swapped between them
- In 4 bit mode, you must use DB4, db5, db6,db7.... AND some model need to send unused pins somewhere gnd or VDD, check the datasheet
- the R/W is not connected to GND
- you're using RA.4 without pull-up resistors
- your supply line is poor and noisy
- you're using a xtal>4 MHZ and you didn't set HS config fuse
Last edited by mister_e; - 9th December 2006 at 11:44.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi,
Thanks for verifying that Skimask!
Steve, you are most certanly right about the timing, no LCD should need more than 100uS for data. But my advice of trying with 500 was not a very good one since I didn't know of the 8-bit clamp.
All valid points from you Steve, Dragonballs problem seems to be timing related since it works when he's using a slower clock than 4Mhz. But at 4Mhz it seems to skip the first characters, if I understood it correctly.
/Henrik Olsson.
Originally Posted by HenrikOlsson
I think the 500 idea was good enough since 500-256=244. Should be more than enough for a data delay...
Put a 5 second pause at the beginning of the program, that'll extinguish any doubt about the power up on the LCD. If that don't fix it, it's something else.
JDG
Hi DragonBall_6,
As I didn't see it listed in your code, do you have appropriate define osc X in your code and question 2 is have you set config fuses to HS when trying to use fast oscillator speed?
JS
Thanks to all the reply,
After I change it to PIC16F876 and 4Mhz cystal, pause 500, commandus 2000 and dataus 1000. It is work.
I had adding 4 button to increment the hrs,minute,day and month.
I feel happy.THANK YOU ALL THAT PROVIDE ME A LOT OF INFORMATION.
I have thinking to advancing my project by using the A/D function.
The idea is get the input from the solar PV and sent into the PIC16F876.
When the voltage is lower than 2 volt then motor stop and vice versa.
The input voltage from the solar PV is up to 15 volt.
Can someone help and guide me thru the basic part such as the initialization of the of the PIC???
Possible that the PIC get the analog input above 5Volt????
Any suggestion and Please advice....Thanks
Bookmarks