My project requires a couple of custom characters to be output to ta 16x2 LCD Module. I was wondering if its possible using mikroBasic. A friend of mine suggested BASCOM AVR has it implimented. Can anyone help me in finding a way to do the same in mikroBasic for AVR?
Please Advice!
Thank You
Custom Character in LCD 16x2 Module
This can be done my LCD Custom Character tool.
This is not yet implemented in mikroBasic for AVR, but you can find it in mikroBasic for dsPIC,
which can be downloaded for the following location:
http://www.mikroe.com/en/compilers/mikrobasic/dspic/
If this is a big file to you, please leave you e-mail, so I could send you this tool.
This is not yet implemented in mikroBasic for AVR, but you can find it in mikroBasic for dsPIC,
which can be downloaded for the following location:
http://www.mikroe.com/en/compilers/mikrobasic/dspic/
If this is a big file to you, please leave you e-mail, so I could send you this tool.
Thank You for your reply.
My project uses ATMEL MEGA based controllers. Can the tool be used with MikroBasic for AVR too? if not can this feature be expected in the next release of mikrobasic for AVR?
My e-Mail is joprinz@yahoo.com
Please Advice!
Thank You
My project uses ATMEL MEGA based controllers. Can the tool be used with MikroBasic for AVR too? if not can this feature be expected in the next release of mikrobasic for AVR?
My e-Mail is joprinz@yahoo.com
Please Advice!
Thank You
Thank You for your Reply.
However I am unable to display custom characters using the same.
Here is the code I am using
Plz Advice where I am going wrong!
Thank You.
However I am unable to display custom characters using the same.
Here is the code I am using
Code: Select all
program MikroBasicCustomLCDTest
const character as byte[8] = (0,0,1,2,20,8,0,0)
sub procedure CustomChar(dim pos_row as byte, dim pos_char as byte)
dim i as byte
LCD_Cmd(72)
for i = 0 to 7
LCD_Chr_Cp(character[i])
next i
LCD_Cmd(LCD_RETURN_HOME)
LCD_Chr(pos_row, pos_char, 1)
end sub
main:
Lcd_Init(PORTA, 2, 1, PORTA, LCD_HI_NIBBLE) ' Initialize LCD
Lcd_Cmd(LCD_CURSOR_OFF)
CustomChar(1,1)
end.
Thank You.
-
- Posts: 15
- Joined: 04 Jul 2007 05:22
- Location: Crimea
Code: Select all
const char_00 as byte[8] = (0,0,1,2,20,8,0,0)
dim
i,
addr as byte
main:
Lcd_Init(PORTA, 2, 1, PORTA, LCD_HI_NIBBLE) ' Initialize LCD
Lcd_Cmd(LCD_CURSOR_OFF)
addr = 0
Lcd_Cmd($40 + addr)
for i = 0 to 7
Lcd_Chr_Cp(char_00[i])
next i
Lcd_Chr(1, 1, 0)
joprinz wrote:Thank You :D
Hello,
Sorry about the delay but I post the same problem.
Here is my code, custom character does not
Thank you
Code: Select all
program Basiclcd
'*******************************************************************************
'* Procedure:
'*******************************************************************************
sub procedure fred()
Lcd8_Out(1, 2, "Laser Beam 6000RGB")
end sub
const char_00 as byte[8] = (0,0,1,2,20,8,0,0)
const char_01 as byte[8] = (0,0,1,2,20,8,0,0)
dim i,addr as byte
'*******************************************************************************
'* Variable:
'*******************************************************************************
dim templcd as byte 'Variable Lcd Demarrage
dim placlcd as byte 'Variable Lcd Demarrage
'*******************************************************************************
'* Symbole:
'*******************************************************************************
'*******************************************************************************
'* Config:
'*******************************************************************************
Lcd8_Config(PORTE, PORTD, 5,6,7, 7,6,5,4,3,2,1,0)
TRISE=%00000000
TRISA=%11111001
ADCON1= %11111111
'*******************************************************************************
'* Constante:
'*******************************************************************************
'*******************************************************************************
'* Fonctions:
'*******************************************************************************
'*******************************************************************************
'* Startup:
'*******************************************************************************
PORTE.4=1
PORTA.1=0
Lcd8_Out(1, 2, "Laser Beam 4000RGB")
Lcd8_Out(2, 1, "Shiftech Engineering")
Lcd8_Out(3, 4, "Starting laser")
Lcd8_Out(4, 1, "[")
Lcd8_Out(4, 20, "]")
placlcd=2
for templcd = 2 to 19
Lcd8_chr(4,placlcd, $ff)
placlcd=placlcd+1
Delay_ms(200)
next templcd
Lcd8_Cmd(LCD_CLEAR)
Lcd8_Out(1, 2, "Laser Beam 4000RGB")
Lcd8_Out(2, 1, "Shiftech Engineering")
Lcd8_Out(3, 3, "Key Switch OFF")
key:
if PORTA.0=0 then
goto lop
end if
goto key
'*******************************************************************************
'* Main prog:
'*******************************************************************************
lop:
Lcd8_Cmd(LCD_CLEAR)
Lcd_Cmd(LCD_CURSOR_OFF)
addr = 0
Lcd_Cmd($40 + addr)
for i = 0 to 7
Lcd_Chr_Cp(char_00[i])
next i
Lcd_Chr(1, 1, 0)
Delay_ms(2000)
goto lop
end.