Hi Joep & all

The HD44780_common.jal I have, does not content a char user defined routine
for CGRAM.

Here is one version (which works):

procedure lcd_custom(
   byte in address,
   byte in b0,
   byte in b1,
   byte in b2,
   byte in b3,
   byte in b4,
   byte in b5,
   byte in b6,
   byte in b7
) is
   _lcd_write_command ( LCD_SET_CGRAM_ADDRESS + (address<< 3))
   _lcd_write_data( b0 )
   _lcd_write_data( b1 )
   _lcd_write_data( b2 )
   _lcd_write_data( b3 )
   _lcd_write_data( b4 )
   _lcd_write_data( b5 )
   _lcd_write_data( b6 )
   _lcd_write_data( b7 )
end procedure

and another version (which does not work unless the chardata is completely
defined before the procedure, which
makes the procedure call not very usefull).

var byte chardata[8]  -- define area for custom designed character

procedure lcd_custom_b (byte in address) is        -- address 0 to 7
  _lcd_write_command ( LCD_SET_CGRAM_ADDRESS + (address<< 3))

  lcd = chardata[0]
  lcd = chardata[1]
  lcd = chardata[2]
  lcd = chardata[3]
  lcd = chardata[4]
  lcd = chardata[5]
  lcd = chardata[6]
  lcd = chardata[7]

  -- set LCD back to normal operation
  _lcd_restore_cursor
end procedure

If trying to call procedure like this, got error:
chardata = {0xff, 0xf1, 0xf5, 0xf1, 0xf7, 0xf7, 0xff, 0 } ; error constant
expression expected
lcd_custom_b ( 0 )

So, how can be written the whole chardata, except :
chardata[1] = 0xff
chardata[2] = 0xf1
etc.
which has nonsense

thx,
Vasile

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to