2005-06-22 02:40 PM
Question about multi-paged memory switching?
2011-05-17 03:07 AM
Hello,I'am a new uPSD user,I use a upsd3234a in my new project.
Now, I have a problem on page memory switching. Refer to application note an1816,I modified the example code ''dk3200_4_c'' to fit my own pcbboard,all settings (include the PSD and keil compiler)are almost the same as the example .It's all ok if I didn't use the ''code banking'',but if I programed the chip using ''code banking'',system displayed normally when the code runs in ''common'' area, when the code jump to any ''bank'' area,system seems ''dead''.why? Who can help me? Thanks! [ This message was edited by: mike_n on 18-06-2005 11:12 ]2011-05-17 03:07 AM
mike,
It probably has something to do with your compiler/linker. Are you using Keil's tools? Make sure you've set all the banking stuff properly. If it runs in the common area, but hangs elsewhere, it might be that somehow your paging your interrupt vectors out of the address space, so you crash on the first interrupt after a page change.2011-05-17 03:07 AM
phaze426
Thank you for your reply. Yes,I'm using Keil's tools,and I think I have set all the banking stuff properly.The program simulated run well in Keil environment,bank switching seems ok,I also simulated an extern interrupt 0 (EX0) when the program was in bankx,it processed ok too.So I really don't know what shell i to do now.2011-05-17 03:07 AM
phaze426
You are right.I did use a programmable chip-select output for LCD.My purpose which useing page register bit pgr6 is that to distinguish LCD,DS12C887,PRINTER... etc from XRAM,because I'd assigned these devices' address above 0x8000.otherwise the xram's address and the peripheral device's address would conflicted.2011-05-17 03:07 AM
Hi,phaze426
Sorry,I'd made an unforgivable mistake! In my system,I assigned 0x8800 to 0x8a00 to LCD w/r. so in the page register,the pgr6 bit should be set when using LCD. Due to some reasons,I set this bit only once at the beginning of the program, thus, in normal case (not using BANK or before jump to banks),the program run well because the page register didn't be changed,but whan banking,page register was changed,the pgr6 bit was cleared,so LCD displayed nothing,the program was checking the LCD status in endless situation. [ This message was edited by: mike_n on 22-06-2005 07:08 ]2011-05-17 03:07 AM
mike,
Why woudl you choose to use one of the page register bits for your LCD and then use code banking? Perhaps one of the programmable chip-select outputs on the chip would be a better choice? Anyhow... glad you found your problem.