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.

PicBasic Pro and Graphics LCD

Status
Not open for further replies.

aghazi

Junior Member level 2
Joined
Jan 23, 2006
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,551
lcd picbasic

Hi,

I know how to use Hitachi 44780 based character lcd with PIC using Picbasic pro. Can anyone please guide me how to use Graphics LCD instead? I want to use it with PIC16F877A and picbasic pro.

Really appreciate your help. Thanks.

AG
 

picbasic glcd

i am also interest
 

pic basic lcd

Hi, All,
GLCD can work with any PIC. however it requires considerably more I/O lines. PROTON BASIC supports GLCD on PIC16 Family.
 

picbasic pro glcd

So it means that we can not use graphic lcd in picbasic pro? Hard to believe.
 

picbasic graphic lcd

i am also very very interest but i think GLCD works with PIC18 only
this link for mikrobasic
https://www.mikroe.com/en/books/picbasicbook/07.htm

All Mikroe PIC based boards support PIC16 chips with GLCD, and there installation disks include examples for 16F877 and GLCD. Full support is provided through their proprietory languages as well.

The Oshon sim also provides GLCD support from BASIC, including simulation of the GLCD on the PC, see www.oshonsoft.com for a fully working evaluation.
 

proton basic glcd

well mr agazhi ,

graphic lcd also runs on 8-bit data , so it is 100% interfaceable with pic16 series.

as far as coding is concerned mailme back . i have successfully interfaced it with all the text and rectangles etc .

its very simple , all you have to do is write functions for:

command write
data write
rectangle coordinates
line draw etc...

prefer to make your own functions instead of using inbuilt libraries

sample code in basic rough idea , remember all the code might not be right according to you , but it works according to the application i had , i am reading code for characters 5X7 through 5 lookups i.e 5 columns:

define osc 20
trisc = $00
trisd = $00


en var portd.0
rw var portd.1
rs var portd.2
cs1 var portd.3
cs2 var portd.4
reset var portd.5

temp1 var byte
temp2 var byte
c1 var byte
temp var byte

xemp var byte

m var byte
x_pos1 var byte
x_pos2 var byte

up_page var byte
down_page var byte

upper_line var byte
lower_line var byte

B1 var byte
y_pos1 var byte
y_pos2 var byte

x var byte
y var byte

a var byte
b var byte
c var byte
d var byte
e var byte

i var byte
b0 var byte


rs = 1
rw = 0
en = 0
x = 0
y = 0
cs1 = 1
cs2 = 1

xemp = $00

'x_pos1 = 8
'x_pos2 = 63

'y_pos1 = 2
'y_pos2 = 60

'temp1 = x_pos1
'temp2 = x_pos2

'up_page = x_pos1 / 8
'down_page = x_pos2 / 8

'upper_line = temp1 // 8
'lower_line = temp2 // 8
type var byte


reset = 0
pause 1000
reset = 1


temp = $3e
gosub command_write

pause 100

temp = $3f
gosub command_write

pause 100
'*******************************************************************************
clear_display: 'clrscr


for x = 0 to 7
temp = $b8 + x
gosub command_write

for y = 0 to 63 'column increase automatic on every write
temp = $00
gosub data_write
next y
next x

pause 1000
'*******************************************************************************
cs2 = 0
gosub starting_address

goto alpha_change

column_change: if (y < 125 ) then
temp = $40 + y

endif
gosub command_write


page_change: if (x <= 7) then
temp = $b8 + x
else
x = 0
temp = $b8 + x
endif
gosub command_write

alpha_change:

LOOKUP b0,["the easiest way to earn money is smugglingbut
that is dangerous!"],c1
type = c1
if (type != 33 ) then
i = type - 32
else
goto l
endif


gosub display_0
gosub data_write
y = y + 1
gosub test_mid
gosub test_last
pause 10



gosub display_1
gosub data_write
y = y + 1
gosub test_mid
gosub test_last
pause 10




gosub display_2
gosub data_write
y = y + 1
gosub test_mid
gosub test_last
pause 10


gosub display_3
gosub data_write
y = y + 1
gosub test_mid
gosub test_last
pause 10



gosub display_4
gosub data_write
y = y + 1
gosub test_mid
gosub test_last
pause 10

temp = $00
gosub data_write
y = y + 1
gosub test_mid
gosub test_last
pause 10


b0 = b0 + 1
pause 2

goto column_change



goto l
'-------------------------------------------------------------------------------
'------------------------------sub-routines-------------------------------------
test_mid: if (y == 64) then
cs1 = 0
cs2 = 1

temp = $b8 + x
gosub command_write
temp = $40
gosub command_write
pause 5

endif
return



test_last: if (y == 126) then
cs1 = 1
cs2 = 0
x = x + 1
temp = $b8 + x
gosub command_write

temp = $40
gosub command_write
y = 0
endif
return

starting_address:
b0 = 0
y = 0
x = 0
temp = $c0
gosub command_write
temp = $b8 + x
gosub command_write
temp = $40 + y
gosub command_write
return

space: temp = $00
gosub data_write
return

data_write: rw = 0
rs = 1
portc = temp
en = 1
pause 5
en = 0
return

command_write: rw = 0
rs = 0
portc = temp
en = 1
pause 5
en = 0
return

display_0:
if (i <= 64 ) then ' ! " # $ % & '
( ) * + , - . / 0 1 2 3 4
5 6 7 8 9 : ; < = > ? @
A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \
] ^ _ `
LOOKUP2 i , [$00, $00, $00, $14, $24, $23, $36,
$00, $1c, $00 ,$14, $08, $00, $08, $00, $20, $3E, $00, $42, $21,
$18, $27, $3C, $01, $36, $06 , $00, $00, $08, $14, $00, $02 ,
$32, $7e, $7f, $3e, $7f, $7f, $7f, $3e, $7f, $00, $20 ,$7f, $7f, $7f,
$7f, $3e, $7f , $3e, $7f, $46, $01, $3f, $1f , $3f, $63 ,$07, $61 ,
$7f ,$02, $00 ,$04 ,$40 ,$00 ],B1
portc = B1
temp = portc
RETURN
else
i = i - 65 ' a b c d e f g h
i j k l m n o p q r s t u v
w x y z { | } ~
LOOKUP2 i , [$20, $7f, $38, $38, $38, $08, $08,
$7f, $00, $00 ,$7f, $00, $7c, $7c, $38, $7c , $08, $7c, $48, $04, $3c,
$1c , $3c, $44 ,$0c, $44, $08 ,$00 ,$00 ,$00 ],B1
portc = B1
temp = portc
i = i + 65
RETURN
endif




display_1:
if (i <= 64 ) then ' ! " # $ % &
' ( ) * + , - . / 0 1 2 3
4 5 6 7 8 9 : ; < = > ? @
A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \
] ^ _ `
LOOKUP2 i , [ $00, $00, $07, $7f, $2a, $13, $49,
$05, $22, $00 ,$08, $08, $50, $08, $60, $10, $51, $42, $61,
$41, $14, $45, $4A, $71, $49, $49 , $36, $56, $14, $14, $41, $01 ,
$49, $11, $49, $41, $41, $49, $09, $41, $08, $41, $40 ,$08, $40,
$02, $04, $41, $09, $41, $09, $49, $01 , $40, $20, $40, $14 , $08, $51 ,
$41 ,$04, $00, $02, $40, $14 ],B1
portc = B1
temp = portc
RETURN
else
i = i - 65 ' a b c d e f g
h i j k l m n o p q r s t u
v w x y z { | } ~
LOOKUP2 i , [ $54, $48, $44, $44, $54, $7e, $54,
$08, $44, $20 ,$10, $41, $04, $08, $44, $14 , $14, $08, $54, $3f, $40,
$20 , $40, $28 ,$50, $64, $36 ,$00 ,$00 ,$08 ],B1
portc = B1
temp = portc
i = i + 65
RETURN
endif






display_2:
if (i <= 64 ) then ' ! " # $ % &
' ( ) * + , - . / 0 1 2 3
4 5 6 7 8 9 : ; < = > ? @
A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \
] ^ _ `
LOOKUP2 i , [$00, $4f, $00, $14, $7f, $08, $55,
$03, $41, $41 ,$3e, $3e, $30, $08, $60, $08, $49, $7f, $51,
$45, $12, $45, $49, $09, $49, $49 , $36, $36, $22, $14, $22, $51 ,
$79, $11, $49, $41, $41, $49, $09, $49, $08, $7f, $41 ,$14,
$40, $0c, $08, $41, $09, $51, $19, $49, $7f , $40, $40, $38, $08 , $70,
$49 , $41 ,$08, $41, $01, $40, $02 ],B1
portc = B1
temp = portc
RETURN
else
i = i - 65 ' a b c d e f g
h i j k l m n o p q r s t u
v w x y z { | } ~
LOOKUP2 i , [ $54, $44, $44, $44, $54, $09, $54,
$04, $7d, $40 ,$28, $7f, $18, $04, $44, $14 , $14, $04, $54, $44, $40,
$40 , $30, $10 ,$50, $54, $41 ,$7f ,$41 , $04 ],B1
portc = B1
temp = portc
i = i + 65
RETURN
endif

display_3:
if (i <= 64 ) then ' ! " # $ % &
' ( ) * + , - . / 0 1
2 3 4 5 6 7 8 9 : ; < = >
? @ A B C D E F G H I J
K L M N O P Q R S T U V W X
Y Z [ \ ] ^ _ `
LOOKUP2 i , [$00, $00, $07, $7f, $2a, $64, $22,
$00, $00, $22, $08 ,$08, $00, $08, $00, $04, $45, $40,
$49, $4b, $7f, $45, $49, $05, $49, $49 , $00, $00, $41, $14, $14,
$09 , $41, $11, $49, $41, $22, $49, $09, $49, $08, $41, $3f
,$22, $40, $02, $10, $41, $09, $21, $29, $49, $01 , $40, $20, $40, $14
, $08, $45 , $00 ,$10, $41, $02, $40, $04 ],B1
portc = B1
temp = portc
RETURN
else
i = i - 65 ' a b c d e f g
h i j k l m n o p q r s t u
v w x y z { | } ~
LOOKUP2 i , [$54, $44, $44, $48, $54, $01, $54,
$04, $40, $44 ,$44, $40, $04, $04, $44, $14 , $18, $04, $54, $40, $20,
$20 , $40, $28 ,$50, $4c, $00 ,$00 ,$36 , $08 ],B1
portc = B1
temp = portc
i = i + 65
RETURN
endif



display_4:
if (i <= 64 ) then ' ! " # $ % &
' ( ) * + , - . / 0 1 2
3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K
L M N O P Q R S T U V W X Y Z
[ \ ] ^ _ `
LOOKUP2 i , [$00, $00, $00, $14, $12, $62, $50,
$00, $00, $1c ,$14, $08, $00, $08, $00, $02 , $3e, $00, $46,
$31, $10, $39, $30, $03, $36, $3e , $00, $00, $00, $14, $08, $06
, $3e , $7e, $36, $22, $1c, $41, $01, $7a, $7f, $00, $01
,$41, $40, $7f, $7f, $3e, $06, $5e, $46, $31, $01, $3f, $1f, $3f, $63,
$07, $43 , $00 ,$20, $7f, $04, $40, $00 ],B1
portc = B1
temp = portc
RETURN
else
i = i - 65 ' a b c d e f g
h i j k l m n o p q r s t u
v w x y z { | } ~
LOOKUP2 i , [ $78, $38, $20, $7f, $18, $02, $3c,
$78, $00, $3d ,$00, $00, $78, $78, $38, $08 , $7c, $08, $20, $20, $7c,
$1c , $3c, $44 ,$3c, $44, $00 ,$00 ,$08 , $04 ],B1
portc = B1
temp = portc
i = i + 65
RETURN
endif



l: goto l
end
 

pic basic pro graphic lcd

All my programms i write with picbasic pro , but for GLCD i use Proton.
 

graphic lcd pic basic

i use picbasic pro,what should i do?
 

lcd connected to pic with picbasic pro

any answer?
 

connected lcd in to pic with picbasic pro

Any answer?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top