Thanks a mil
I will try to get it working
Patrick
I have tried it an get similar behaviour to the orig program
Im using a bootloader,can his have influance as it might occupy the Data codespace
Im now more determant to get to the bottom of this
See include photo
If you're using a Bootloader, be sure you place the following line at the top of your code
DEFINE LOADER_USED 1
if it doesn't work, post your whole code here, and tell us your PIC #, OSC speed, AND config fuses list you set when you loaded your bootloader firmware in your PIC.
One thing is sure, your LCD is not initialised properly.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The code is as posted by flotulopex with the next as top of file:
@ DEVICE pic16F876, XT_OSC ' System Clock Options
@ DEVICE pic16F876, WDT_ON ' Watchdog Timer
@ DEVICE pic16F876, PWRT_ON ' Power-On Timer
@ DEVICE pic16F876, BOD_ON ' Brown-Out Detect
@ DEVICE pic16F876, LVP_OFF ' Low-Voltage Programming
@ DEVICE pic16F876, CPD_OFF ' Data Memory Code Protect
@ DEVICE pic16F876, PROTECT_OFF
' Program Code Protection
@ DEVICE pic16F876, WRT_OFF ' Flash Memory Word Enable
DEFINE LOADER_USED 1 ' If using bootloader to program pic
DEFINE LCD_DREG PORTC 'Define PIC port used for LCD Data lines
DEFINE LCD_DBIT 0 'Define first pin of portc connected to LCD DC4
DEFINE LCD_RSREG PORTC 'Define PIC port used for RS line of LCD
DEFINE LCD_RSBIT 4 'Define Portc pin used for RS connection
DEFINE LCD_EREG PORTC 'Define PIC port used for E line of LCD
DEFINE LCD_EBIT 5 'Define PortC pin used for E connection
DEFINE LCD_BITS 4 'Define the 4 bit communication mode to LCD
DEFINE LCD_LINES 2 'Define using a 2 line LCD
DEFINE LCD_COMMANDUS 2000 'Define delay time between sending LCD commands
DEFINE LCD_DATAUS 50 'Define delay time between data sent.
Hi,
If you can get your lcd to respond atleast then please tryout the following code. You will be surprised.
I post a little program here and would like you guys to try it out U N-E D I T E D. Please use the LCD Defines as your config. You can use a 16/20 characters display if you wish. Steve would you mind explaining I am a little too drunk.
Code:MAIN: LCDOUT $FE,1 LCDOUT "MERRY CHRISTMAS AND HAPPY NEW YEAR 2007 " LCDOUT $FE,$C0 LCDOUT "***FROM YOUR FRIEND SOUGATA IN INDIA****" PAUSE 1000 LOOP: LCDOUT $FE, $18 PAUSE 500 GOTO LOOP
Regards
Sougata
Wow! Well done.
In the "LOOP:", let's go the other way: "LCDOUT $FE, $1C" - from the LEFT to the Right.
Roger
LMAO! Well even drunk you got itTake one of those...
Well explanation is easy, but i will make it simple and skip some information.
LCDOUT $FE,1
LCDOUT "MERRY CHRISTMAS AND HAPPY NEW YEAR 2007 "
LCDOUT $FE,$C0
LCDOUT "***FROM YOUR FRIEND SOUGATA IN INDIA****"
There you fill the LCD memory/buffer...plahplahplah
LOOP:
LCDOUT $FE, $18
PAUSE 500
GOTO LOOP
For this one, open a HD44780 LCD datasheet, and find the 'Cursor or display shift' Register. Now, read the S/C bit information. You don't like the way it move, set the R/L bit.
EDIT: Yup Flotulopex, you got it!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks