Newbie Alert

General discussion on mikroBasic for dsPIC30/33 and PIC24.
Post Reply
Author
Message
ideasman
Posts: 50
Joined: 01 Mar 2009 23:10

Newbie Alert

#1 Post by ideasman » 01 Mar 2009 23:28

HI

I just received my easy ds4 and I have tried a few examples with leds which have worked, so now I moved on to the lcd examples on the website under books in the DS basic book and I'm not having any success.

1) I started a new project
2)went with the default settings pressed OK
3) put in code 8 bit version

dim txt as string[10]

main:
ADPCFG = $FFFF ' PORTB to be digital
Lcd8_Init(PORTB, 7, 6, 5, 4, 3, 2, 1, 0, PORTD, 0, 1, 2)
Lcd8_Cmd(LCD_CURSOR_OFF)
Lcd8_Cmd(LCD_CLEAR)

Lcd8_Out(1, 1, "mikroElektronika")
Lcd8_Out(2, 1, "2x16 LCD Testing")
end.

4)Compile
5 ) Then F11

What Is going on were am I making a mistake
Please note I have not registered my compiler does this limit use of this code, I have sent off the email.

Also Another question the library file(Consisting if bitmaps in example) for the Glcd is this put in the project file you create.

Cheers

Ideasman

goran.marinkovic
mikroElektronika team
Posts: 265
Joined: 25 Nov 2008 09:09

#2 Post by goran.marinkovic » 03 Mar 2009 17:40

Hi,

Your code should be like this:

Code: Select all

program TestingSomething     ' in program you should put name of the project

dim txt as string[10]


ADPCFG = $FFFF ' PORTB to be digital
Lcd8_Init(PORTB, 7, 6, 5, 4, 3, 2, 1, 0, PORTD, 0, 1, 2)
Lcd8_Cmd(LCD_CURSOR_OFF)
Lcd8_Cmd(LCD_CLEAR)

Lcd8_Out(1, 1, "mikroElektronika")
Lcd8_Out(2, 1, "2x16 LCD Testing")

end.
Regards

Thomas.Pahl@t-online.de
Posts: 158
Joined: 24 May 2008 15:55
Location: Germany

Re: Newbie Alert

#3 Post by Thomas.Pahl@t-online.de » 03 Mar 2009 17:50

Hello,

try lcd in 4-bit mode with the suiting examples.

regards
Thomas

ideasman
Posts: 50
Joined: 01 Mar 2009 23:10

Thanks

#4 Post by ideasman » 06 Mar 2009 23:27

Thanks guys I now have it working in 4 bit mode







Cheers
Ideasman

Post Reply

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