PDA

View Full Version : PBP 2.50 UPGRADE problems!!!!



earltyso
- 14th January 2008, 17:37
aaaaaahhhhhh!
I just upgraded my PBP to 2.50 from 2.40, yep along time in the making.
Now one of my codes no longer works the same as it used to.

This is what I am seeing.....
under my old code I have the following constants for my LCD lines for a 4x20 line LCD

Row1 CON 128
Row2 CON 192
Row3 CON 148
Row4 CON 212


LCDOut 254,1
LCDOut 254,Row1, " Welcome to the "
LCDOut 254,Row2,0,1," All-In-One ",4,5
LCDOut 254,Row3,2,3," Light & Water ",6,7
LCDOut 254,Row4, " Controller! "

Now when I ouput the same code as before...Row1 is shifted 2 places to the right on my LCD without me changing the code in any way. The crazy thing is that no matter what I do to the Row1 CONSTANT definition ex: CON 130 the text stays in the same place on the screen on line 1, I can only change the text by placing more spaces in between the " ". Even adding EX: Row1+3 had no effect. What is up?????

I'm going crazy or something. I am using the same 16f877A chip as before, same PCB, same programmer, same MCS IDE, same fuse settings, just the newest PBP 2.50. Could my PIC be damaged?

Like I mentioned before this program worked fine before the upgrade to PBP 2.50 ANY help would be great!

skimask
- 14th January 2008, 17:50
aaaaaahhhhhh!
What happens if you change the actual text?
For instance, change 'Welcome to the' to 'Testing the new'
Try it and and see what happens.

earltyso
- 14th January 2008, 17:57
The text changes but still off position by 2 places to the left, I should now correct what I was saying earlier, ROW1 has been shifted to the LEFT 2 places NOT to the right 2 places. Either way, the problem is still there.

I also tried modifying the CONSTANTS for ROW's 2, 3, & 4,....they work fine and update with any editing, ex: Row2+4 and CON 194 change Row2 immediately.

It's just Row1

mister_e
- 14th January 2008, 18:07
mmm, i don't know, it's working here. Maybe some timing issue for a 'X' lcd type. Try to insert a PAUSE after the LCDOUT 254,1.

skimask
- 14th January 2008, 18:08
The text changes but still off position by 2 places to the left, I should now correct what I was saying earlier, ROW1 has been shifted to the LEFT 2 places NOT to the right 2 places. Either way, the problem is still there.
I also tried modifying the CONSTANTS for ROW's 2, 3, & 4,....they work fine and update with any editing, ex: Row2+4 and CON 194 change Row2 immediately.
It's just Row1

Change all of those constants from:
Row(whatever) to Ln(whatever)....
see what happens.

Also, it might be a timing problem. Shifting to the LEFT tells me it's missing an E pulse because the LCD is busy doing it's thing.
-----LCDOut 254,1-----
takes quite a bit more time to execute than the rest of the LCD commands.
Increase your LCD_COMMANDUS value or put an extra pause of a couple milliseconds after that command.

earltyso
- 14th January 2008, 18:20
You were right! There is some kind of timing problem that has come up with the new software that wasn't there before, perhaps my oscillator is spontaneously acting weird. I am going to guess that the newest PBP has changed the whole LCDOUT 254,1 command a bit. I am currently running at 4Mhz which I know is not recommended for the LCDOUT commands, I have always run 12 Mhz before but wanted to try 4 anyway.

Thanks for your help, a small delay of 1ms seems to be enough for now until I change out the crystal.

LCDOut 254,1
pause 1
LCDOut 254,Row1, " Welcome to the "
LCDOut 254,Row2,0,1," All-In-One ",4,5
LCDOut 254,Row3,2,3," Light & Water ",6,7
LCDOut 254,Row4, " Controller! "

Thanks again!!!!!!!

skimask
- 14th January 2008, 18:22
Read the manual...You'll find DEFINE LCD_COMMANDUS and DATA_US. Increase those and you should be ok without the extra pause.

earltyso
- 14th January 2008, 18:28
I will be sure to do that.

Acetronics2
- 14th January 2008, 20:07
Hi,

I had the same issue with PbP 2.50a some times ago ...

Thought it was my LCD a bit lazy!!!

DEFINE LCD_COMMANDUS 2000 solved that ...

May be a better PBP timing ... the datasheet told 1.62 ms !!! LOL ...

Alain

Darrel Taylor
- 14th January 2008, 20:59
Interesting.

The default timing has been changed in 2.50

2.46 - pbppic14.lib
ifndef LCD_COMMANDUS ; LCD command delay in us
LCD_COMMANDUS EQU 2000
endif
ifndef LCD_DATAUS ; LCD data delay in us (0 - 255)
LCD_DATAUS EQU 50
endif


2.50 - pbppic14.lib
ifndef LCD_COMMANDUS ; LCD command delay in us
LCD_COMMANDUS EQU 1500
endif
ifndef LCD_DATAUS ; LCD data delay in us (0 - 255)
LCD_DATAUS EQU 44
endif

Added: And yes, it's in the manual. (sort of)

earltyso
- 15th January 2008, 17:01
DEFINE LCD_COMMANDUS 2050
DEFINE LCD_DATAUS 75

I added the above Defines and this worked out great! Saw in the manual ...what I thougth was the default value (for PBP 2.50A) of 2000 and 50 respectively....I will now drop the delays down to 2000 and 50 respectively.

Thanks again for bringing some clarity to my confusion!!

skimask
- 15th January 2008, 19:15
The LCD_CommandUS/DataUS change fixed my intermittent/couldn't-find problem on my 3 LCD OBD2 reader/scanner also.

Rob
- 7th March 2008, 10:37
Hi,

just to add to this in case this helps someone else if they experience the same problem.

I had a fair few of the same LCDs all running the same code. After a couple of hours, some of the LCDs would be blank (showing no text at all). Defining the LCD_COMMANDUS back to 2000 and also the LCD_DATAUS back to 50 solved the problem.

I didn't used to have this problem when using PBP 2.47 only since I upgraded to 2.50 - that'll teach me to always use Defines instead of relying on the library defaults!

Maybe no-one else will have this problem, maybe some will. Just thought I'd share!

Cheers

Rob

Dave
- 7th March 2008, 11:58
Rob, Also make sure you download the latest patch for 2.50 from the web site. I had a problem with the LOOKUP2 statement and that fixed it....

Dave Purola,
N8NTA

Rob
- 7th March 2008, 15:42
Rob, Also make sure you download the latest patch for 2.50 from the web site. I had a problem with the LOOKUP2 statement and that fixed it....

Dave Purola,
N8NTA


Will do - thanks very much!