LCD_Custom_Test example not working on LV 24-33A

General discussion on mikroC for dsPIC30/33 and PIC24.
Post Reply
Author
Message
nitrofuzzy
Posts: 3
Joined: 21 Feb 2009 08:47

LCD_Custom_Test example not working on LV 24-33A

#1 Post by nitrofuzzy » 21 Feb 2009 09:04

Hi,

I just got my newly purchased LV 24-33A development kit and have tested out some examples that comes with the CD. The first 2 examples I have tested out are "led_blinking" and "button" examples. They worked perfectly alright.

When I tested out the "lcd_custom" example, it won't work. I checked my development board settings.
These are the hardware configurations at the moment of test:
>All pins of switches SW1, SW3, SW4, SW5 are switched to OFF
>All pins of SW2 are switched to OFF except for LCD/GLCD BACKLIGHT pin.
>I have also varied the contrast during the test to see if I missed the characters with too low or too high contrast. Nope, still the same.

Below is the source code I have used:

char txt[10] = "mikro";

void main() {
//--- PORTB - all digital
ADPCFG = 0xFFFF;

//Lcd_Custom_Init_LV_24_33();
Lcd_Custom_Config(&PORTB, 4, 5, 6, 7, &PORTB, 2, -1, 3);
Lcd_Custom_Out(1,3, txt);
Lcd_Custom_Out(2,6, txt);
Lcd_Custom_Chr(2,7, 'a');
Lcd_Custom_Out(1,10, txt);
Lcd_Custom_Chr(1,11, 'o');

}//~!

Please note that I have used "Lcd_Custom_Config()" function in my earlier attempts. Then I norticed it's for the older LV 24-33 board, not the LV 24-33A board. Since LV 24-33 used PORTD as control & data, LV 23-33A used PORTB as control & data.

Please help me to solve this problem.

Sincerely & Best Regards,


Nelson

nitrofuzzy
Posts: 3
Joined: 21 Feb 2009 08:47

#2 Post by nitrofuzzy » 21 Feb 2009 09:24

Hi,

My apologies for not looking into the LV 24-33A development kit webpage and download the examples from there.

However, I do not understand a small part on this function call:
"Lcd_Custom_Config(&PORTB, 7,6,5,4, &PORTB, 2,0,3);"
I can understand all the parameters except for "ctrl_rw". It seems pin 0 of PORTB is configured to "ctrl_rw" on the LCD where in actual fact it's hardwired to ground. Is PORTB pin 0 used as a dummy because we cannot pass other values outside of 0-15 to "ctrl_rw"?

Hope anyone can enlighten me on this part.

Thanks & Regards,


Nelson

Hugh
Posts: 11
Joined: 21 Feb 2009 11:40

#3 Post by Hugh » 21 Feb 2009 12:15

Hi,

Apologies to Nelson as I'm not answering his last question but
I had exactly the same problem.

My LV 24-33A kit came with 2 CDs with identical labels. One CD appeared not to have any examples the other had examples for the LV 24-33 - not the LV 24-33A.

Having tried the example for the LCD4BitTest for the LV 24-33 (not realising it wasn't the same for the LV 24-33A) I was on the point of calling my supplier in the belief I had a faulty LCD but having also tried the Graphic LCD with its example as well, which didn't work either, I though it unlikely that both LCDs would be faulty!

I am not new to PIC programming but, as I wanted more IO, have migrated to mikroElectronika to enable me to program the PIC24 range in Basic.

Therefore having paid around £200 GBP (including VAT and delivery) for the development kit I was slightly disappointed that it wasn't supplied with correctly working examples on the CD. This could have severely disheartened a "newbie" who had bought the kit and who couldn't figure out the problem.

I was also forced to use the forum to discover the problem with the ICD hardware not being found when I tried to test the ICD.

Having said all that I must say that the Development kit appears to be well thought out and will be useful in developing my next project.

Regards

Hugh

Post Reply

Return to “mikroC for dsPIC30/33 and PIC24 General”