View previous topic :: View next topic |
Author |
Message |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
[SOLVED] PCD Sanity Check w/BYTE sized CONST strings/values |
Posted: Mon Dec 28, 2009 6:26 pm |
|
|
Hey there,
I'm using a verified LCD driver to talk with my Explorer 16.
the LCD.c was a carry over from all the CCS usual stuff.
And it's worked in the past.
When I compile the module into my stuff now, I have LCD init problems which I've whittled down to the LCD Init String which is normally posed as:
BYTE const LCD_INIT_STRING [] = {0x38, 0x0C, 0x01, 0x06};
I get the right number of bytes (4) written to the display (byte wide port on PORTE) but the bytes are wrong.
They come out 0x38, 0x00, 0x01, 0x00
I know there's compiler changes all the time. I even tried
#DEVICE CONST=
with the ROM and ROMI to see how MPLAB sees the output different.
When MPLAB's WATCH can see LCD_INIT_STRING, it has the wrong content (it's a printf to a UART!!) vs the right content on my scope but MPLAB lists the const as "out of bounds"
I'm using PCD 4.103 w/PIC24FJ128GA010.
The LCD works fine, I loaded up old working code that verifies its operation.
Thanks,
-Ben
EDIT: I looked at prog ROM and the spot that CCS sticks the string reads:
$0157E8 0C0038
$0157EA 060001
Which if I'm reading this right, is getting packed wrong.
_________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D
Last edited by bkamen on Tue Dec 29, 2009 12:19 am; edited 1 time in total |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Dec 28, 2009 9:00 pm |
|
|
I don't have that compiler, but if you want a work-around, try removing
the 'const'. Let it be a RAM array.
It sounds like a possible bug and it should be investigated, but if
you were in a hurry to test the program... |
|
![](templates/subSilver/images/spacer.gif) |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
|
Posted: Mon Dec 28, 2009 11:07 pm |
|
|
PCM programmer wrote: | I don't have that compiler, but if you want a work-around, try removing
the 'const'. Let it be a RAM array.
It sounds like a possible bug and it should be investigated, but if
you were in a hurry to test the program... |
I did a couple of other tests to show the code should it send out the right string works... but packing the array is busted.
I did try removing CONST and the array works as I'd expect.
(sigh) I submitted a bug report to CCS.
Wow.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
![](templates/subSilver/images/spacer.gif) |
bkamen
Joined: 07 Jan 2004 Posts: 1611 Location: Central Illinois, USA
|
packed byte arrays in PCD Fixed in 4.104 |
Posted: Tue Dec 29, 2009 12:38 pm |
|
|
This has been resolved with the latest version (4.104).
FAST! _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
![](templates/subSilver/images/spacer.gif) |
|