LCD test (dspicPro4 with mikroC dspic v4)

General discussion on mikroC for dsPIC30/33 and PIC24.
Post Reply
Author
Message
MHI
Posts: 56
Joined: 13 Mar 2010 20:52

LCD test (dspicPro4 with mikroC dspic v4)

#1 Post by MHI » 20 Apr 2010 11:28

Hello all,
I have a little question, Is there anyway to configure the LCD on the dsPICPRO4 board with the old dspic compiler, I have tried all the functions:
for example in the help it's written:

Code: Select all

void Lcd8_Custom_Config(unsigned int * data_port, unsigned int db7, unsigned int db6, unsigned int db5, unsigned int db4, unsigned int db3, unsigned int db2, unsigned int db1, unsigned int db0, unsigned int * ctrl_port, unsigned int rs, unsigned int ctrl_rw, unsigned int enable);
The footprint of the board regarding the LCD is represented in the following picture:
lcd.jpg
lcd.jpg (46.95 KiB) Viewed 3248 times
so I must type : Lcd8_custom_congig(&PORTD,7,6,5,4,GND,GND,GND,GND,&PORTB,4,GND,6)
How the compiler will understand the GND ?? I don't know it may be easy, what should i put instead of GND ?

I also have seen the pro edition it's very clear to initialize the lcd, using sbit, but i want to work on the old version.

Please help ?? what should I do ?

User avatar
tihomir.losic
mikroElektronika team
Posts: 2138
Joined: 02 Dec 2009 14:16
Location: Serbia
Contact:

Re: LCD test (dspicPro4 with mikroC dspic v4)

#2 Post by tihomir.losic » 21 Apr 2010 10:16

Hello,

please, try this example code (dsPICPRO4, dsPIC30F6014A):

Code: Select all

char text[6] = "mikro";

void main() {

  ADPCFG = 0xFFFF;

  Lcd_Custom_Config(&PORTD, 7,6,5,4, &PORTB, 4,0,6);
  Lcd_Custom_Cmd(LCD_CURSOR_OFF);
  Lcd_Custom_Out(1,3, text);
  Lcd_Custom_Out(2,6, text);
  Lcd_Custom_Chr(2,7, 'a');
  Lcd_Custom_Out(1,10, text);
  Lcd_Custom_Chr(1,11, 'o');
}
Best regards,

Losic Tihomir
mikroElektronika [Support team]

MHI
Posts: 56
Joined: 13 Mar 2010 20:52

Re: LCD test (dspicPro4 with mikroC dspic v4)

#3 Post by MHI » 21 Apr 2010 18:06

Thank you Losic :D, my problem was with the representation of Ground ..

Thanks again

Post Reply

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