Problems using PIC32 C compiler and VisualGLCD
Posted: 31 Jan 2012 05:02
Hi
It seems to be that I'm from the few that are currently using a PIC32 with the visual GLCD...
I have been working for the last year with visual GLCD, visual TFT and so on, and I feel comfortable using them, and I have been using them succesfully, with some mino issues like the problems that happen when you want to change the caption of a button mainly during the program, and if you want to mix text with numbers and so on...
It happened that for my application a PIC18 was insufficient, in terms of RAM and ROM, (I was using a SmartGLCD) so I decided to use a freshly designed control board for a GLCD screen virtually Identical to the used in the smartglcd board (with the RA6963 controller and so on)... but with a PIC32mx340f512H (if I recall correctly now...) and also I included a micro sd slot and so on...so far so good...
I decided to go that way for obvious reasons (more ram, rom and storage space) and also as now VisualGLCD now supports PIC32 then I proceded...
First I noticed on the visualGLCD project settings that you could assign ANY data pin of the GLCD to any i/o pin of the MCU (thats great...it helps with pcb routing a lot!)...but at first I thought it's great, and all the other pins listed on the project settings look normal...
Unfortunately...after I ordered the pcbs...received them...soldered and so on (and made the programmer recognize the mcu)...I started working on the firmware (modding my current project to fit it to the pic32...), but first, I decided to start a test program from scratch to see if the system works...BUT then I started to realize the following:
If you select a PIC18 on the project settings, you will see a pinout list that actually corresponds to the pinout of the RA6963C based GLCDs, BUT if you select a PIC32, the pin definitions do not actually match the pins of the GLCD!
but assume you wired it right...(I thought that the cs lines named there were a typo..and I thought it was fs1 and fs2...) and then generate the code and you go to the MikroC for PIC32 compiler and you try to compile and then you find the following:
1. If you don't use the touch screen option and you "uncheck it" on visual GLCD, the visualGLCD STILL generates the code for it with todo's on the pins, thresholds and calibration constants...and then you get the annoying bit definitions for the ADC lines and so on..EACH TIME YOU GENERATE THE CODE! a workaround I've made is just to fill it with any values and some free pins on the mcu and be able to get rid of the compilation error or commenting/deleting this lines manually on the code.
2. The compiler arises a long list of errors associated to the pin definitions of the GLCD...it says it can't find the Data port, the WR, CS, reset and so on lines.
Too bad since it seems that you guys at ME made a great job making the visualGLCD more versatile making it possible to assign any pin of the GLCD to any pin on the MCU (which I did) but you did not modify the T6963C libraries to fit this new feature! and obviously it makes IMPOSSIBLE to use the announced feature of VisualGLCD compatible with PIC32 compiler...which is obviously NOT compatible... With this problem, I just lost more than 20 hours of work, the project shall now wait I don't know how much time, and it should have been just a couple of hours migrating the code from a PIC18 to a PIC32...
I bed you pardon If I'm definately wrong with my statements...what I'm telling you is what just happened this afternoon to me while working, and right now I don't have the screenshots..but I think the problem is easily reproduced just by creating a project with a PIC32 and then filling the desired configuration...and then trying to compile it on the mikroc pro for pic32 compiler.
Tomorrow I can get the screenshots for the issues related.
Thank you
Jorge
It seems to be that I'm from the few that are currently using a PIC32 with the visual GLCD...
I have been working for the last year with visual GLCD, visual TFT and so on, and I feel comfortable using them, and I have been using them succesfully, with some mino issues like the problems that happen when you want to change the caption of a button mainly during the program, and if you want to mix text with numbers and so on...
It happened that for my application a PIC18 was insufficient, in terms of RAM and ROM, (I was using a SmartGLCD) so I decided to use a freshly designed control board for a GLCD screen virtually Identical to the used in the smartglcd board (with the RA6963 controller and so on)... but with a PIC32mx340f512H (if I recall correctly now...) and also I included a micro sd slot and so on...so far so good...
I decided to go that way for obvious reasons (more ram, rom and storage space) and also as now VisualGLCD now supports PIC32 then I proceded...
First I noticed on the visualGLCD project settings that you could assign ANY data pin of the GLCD to any i/o pin of the MCU (thats great...it helps with pcb routing a lot!)...but at first I thought it's great, and all the other pins listed on the project settings look normal...
Unfortunately...after I ordered the pcbs...received them...soldered and so on (and made the programmer recognize the mcu)...I started working on the firmware (modding my current project to fit it to the pic32...), but first, I decided to start a test program from scratch to see if the system works...BUT then I started to realize the following:
If you select a PIC18 on the project settings, you will see a pinout list that actually corresponds to the pinout of the RA6963C based GLCDs, BUT if you select a PIC32, the pin definitions do not actually match the pins of the GLCD!
but assume you wired it right...(I thought that the cs lines named there were a typo..and I thought it was fs1 and fs2...) and then generate the code and you go to the MikroC for PIC32 compiler and you try to compile and then you find the following:
1. If you don't use the touch screen option and you "uncheck it" on visual GLCD, the visualGLCD STILL generates the code for it with todo's on the pins, thresholds and calibration constants...and then you get the annoying bit definitions for the ADC lines and so on..EACH TIME YOU GENERATE THE CODE! a workaround I've made is just to fill it with any values and some free pins on the mcu and be able to get rid of the compilation error or commenting/deleting this lines manually on the code.
2. The compiler arises a long list of errors associated to the pin definitions of the GLCD...it says it can't find the Data port, the WR, CS, reset and so on lines.
Too bad since it seems that you guys at ME made a great job making the visualGLCD more versatile making it possible to assign any pin of the GLCD to any pin on the MCU (which I did) but you did not modify the T6963C libraries to fit this new feature! and obviously it makes IMPOSSIBLE to use the announced feature of VisualGLCD compatible with PIC32 compiler...which is obviously NOT compatible... With this problem, I just lost more than 20 hours of work, the project shall now wait I don't know how much time, and it should have been just a couple of hours migrating the code from a PIC18 to a PIC32...
I bed you pardon If I'm definately wrong with my statements...what I'm telling you is what just happened this afternoon to me while working, and right now I don't have the screenshots..but I think the problem is easily reproduced just by creating a project with a PIC32 and then filling the desired configuration...and then trying to compile it on the mikroc pro for pic32 compiler.
Tomorrow I can get the screenshots for the issues related.
Thank you
Jorge