Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Code for PIC32MZ compiles on MPLABX but fails when a function is called

Status
Not open for further replies.

ernpao

Full Member level 1
Joined
Sep 16, 2010
Messages
98
Helped
26
Reputation
52
Reaction score
22
Trophy points
1,298
Activity points
2,043
I've got a test project for a PIC32MZ chip (PIC32MZ2048ECH100, microchip's PIM) that compiles just fine. The code works up to a certain point.

My code is just meant to test an LCD module by filling the screen with a 16-bit color variable and incrementing the value of this variable (by 0xFF) on each pass of the main loop so what I get is a screen that gradually changes color from 0x0000 to 0xFFFF. I was able to test this on my hardware and it has worked up to this point.

Now, I tried to add and call a function that prints an image i stored as an array of 16 bit colors (with 320*240 elements). The code compiles, but when I program my hardware, it fails when it reaches that part of the code.

I've attached my project and hope someone can help me understand what I'm doing wrong. Thanks in advance.
 

Attachments

  • PIC32MZ_Test.X.zip
    330.6 KB · Views: 74

Update: It looks like my large const array is what is causing the problem. I tried my code on a smaller 100*100 array and the code works fine if I try to send half of the array (but not if I try to send the whole array). I find this unusual since I have had no problem using large arrays before (MPLABX or MikroC). Has anyone had the same sort of problem with large arrays in an MCU before? Any guidance would be appreciated. Thanks.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top