Author: [email protected]
Date: Mon Mar 16 02:14:57 2009
New Revision: 859
Modified:
trunk/include/external/lcd/lcd_dog_m_4.jal
trunk/include/external/lcd/lcd_dog_m_8.jal
trunk/include/external/lcd/lcd_dog_m_spi.jal
Log:
small cleanup
Modified: trunk/include/external/lcd/lcd_dog_m_4.jal
==============================================================================
--- trunk/include/external/lcd/lcd_dog_m_4.jal (original)
+++ trunk/include/external/lcd/lcd_dog_m_4.jal Mon Mar 16 02:14:57 2009
@@ -41,20 +41,15 @@
--
-- Available functions for application programs:
--
---
--- _lcd_writenibble(byte)
-
-
-
--- _lcd_write(<byte>) sends byte from value to
+-- __lcd_write(<byte>) sends byte from value to
-- register of the lcd and
-- shift cursor position 1
right
--
-- _lcd_write_data(<byte>) write data to lcd using
--- _lcd_write(<byte>) lcd_rs
high
+-- __lcd_write(<byte>) lcd_rs
high
--
-- _lcd_write_data(<byte>) write command to lcd using
--- _lcd_write(<byte>) lcd_rs
low
+-- __lcd_write(<byte>) lcd_rs
low
--
-- lcd_init() initialize the LCD
controller
--
@@ -89,8 +84,8 @@
-- Send byte to the LCD as 2 nibbles (most significant nibble first)
-- and automatically set the cursor one position right.
-- ----------------------------------------------------------
-procedure _lcd_write(byte in value) is
-
+procedure __lcd_write(byte in value) is
+-- pragma inline
lcd_dataport = (value >> 4)
lcd_en = high -- trigger on
@@ -110,24 +105,24 @@
--
----------------------------------------------------------------------------
-- sends data byte in value to LCD
--- for slow commands an extra delay should be added --
+--
--
----------------------------------------------------------------------------
procedure _lcd_write_data(byte in value) is
- lcd_rs = high --
select instruction
- _lcd_write( value ) -- output byte
+-- pragma inline
+ lcd_rs = high --
select data
+ __lcd_write( value ) -- output byte
end procedure
---------------------------------------------------------------------------
--
----------------------------------------------------------------------------
-- sends command byte in value to LCD
--- for slow commands an extra delay should be added
---
+--
--
----------------------------------------------------------------------------
procedure _lcd_write_command(byte in value) is ;
- pragma inline
+-- pragma inline
lcd_rs = low -- select instruction
- _lcd_write( value ) -- output byte
+ __lcd_write( value ) -- output byte
if value < 4 then -- "clear display' and
'return home'
delay_10us( lcd_long_delay ) -- require extra delay
@@ -143,11 +138,11 @@
--
----------------------------------------------------------------------------
--- Initialize display in 1 ans 2 or 3 line, display on, no cursor shown an
cursor
+-- Initialize display in 1 and 2 or 3 line, display on, no cursor shown an
cursor
-- moves to the right.
--
----------------------------------------------------------------------------
procedure lcd_init() is
- pragma inline
+-- pragma inline
delay_1ms( 45 ) -- powerup delay for 45mS
if LCD_ROWS == 1 then
_lcd_write_command( 0b_0010_0000 ) -- function 4bit
N=0,5x7dots
Modified: trunk/include/external/lcd/lcd_dog_m_8.jal
==============================================================================
--- trunk/include/external/lcd/lcd_dog_m_8.jal (original)
+++ trunk/include/external/lcd/lcd_dog_m_8.jal Mon Mar 16 02:14:57 2009
@@ -42,15 +42,15 @@
-- Available functions for application programs:
--
--
--- _lcd_write(<byte>) sends byte from value to
+-- __lcd_write(<byte>) sends byte from value to
-- register of the lcd and
-- shift cursor position 1
right
--
-- _lcd_write_data(<byte>) write data to lcd using
--- _lcd_write(<byte>) lcd_rs
high
+-- __lcd_write(<byte>) lcd_rs
high
--
-- _lcd_write_command(<byte>) write command to lcd using
--- _lcd_write(<byte>) lcd_rs
low
+-- __lcd_write(<byte>) lcd_rs
low
--
-- lcd_init() initialize the LCD
controller
--
@@ -85,7 +85,8 @@
-- Send byte to the LCD and automatically set the cursor
-- one position right.
-- ----------------------------------------------------------
-procedure _lcd_write(byte in value) is
+procedure __lcd_write(byte in value) is
+-- pragma inline
lcd_dataport = value -- replace low nibble
lcd_en = high -- trigger on
asm nop -- delay (> 400 ns)
@@ -97,24 +98,24 @@
--
----------------------------------------------------------------------------
-- sends data byte in value to LCD
--- for slow commands an extra delay should be added --
+--
--
----------------------------------------------------------------------------
procedure _lcd_write_data(byte in value) is
- lcd_rs = high --
select instruction
- _lcd_write( value ) -- output byte
+-- pragma inline
+ lcd_rs = high --
select data
+ __lcd_write( value ) -- output byte
end procedure
---------------------------------------------------------------------------
--
----------------------------------------------------------------------------
-- sends command byte in value to LCD
--- for slow commands an extra delay should be added
---
+--
--
----------------------------------------------------------------------------
procedure _lcd_write_command(byte in value) is ;
- pragma inline
+-- pragma inline
lcd_rs = low -- select instruction
- _lcd_write( value ) -- output byte
+ __lcd_write( value ) -- output byte
if value < 4 then -- "clear display' and
'return home'
delay_10us( lcd_long_delay ) -- require extra delay
@@ -130,11 +131,11 @@
--
----------------------------------------------------------------------------
--- Initialize display in 1 ans 2 or 3 line, display on, no cursor shown an
cursor
+-- Initialize display in 1 and 2 or 3 line, display on, no cursor shown an
cursor
-- moves to the right.
--
----------------------------------------------------------------------------
procedure lcd_init() is
- pragma inline
+-- pragma inline
delay_1ms( 45 ) -- powerup delay for 45mS
if LCD_ROWS == 1 then
_lcd_write_command( 0b_0011_0000 ) -- function 8bit
N=0,5x7dots
Modified: trunk/include/external/lcd/lcd_dog_m_spi.jal
==============================================================================
--- trunk/include/external/lcd/lcd_dog_m_spi.jal (original)
+++ trunk/include/external/lcd/lcd_dog_m_spi.jal Mon Mar 16 02:14:57 2009
@@ -47,22 +47,22 @@
-- pin_b1_direction = output
-- 4. Call lcd_init() to initialize the lcd controller.
-- Above is an example for a 2x16 LCD:
--- --
+--
-- Available functions for application programs:
--- --
--- --
--- _lcd_write(<byte>) ends byte from value to
+--
+--
+-- __lcd_write(<byte>) ends byte from value to
-- register of the lcd and
-- shift cursor position 1
right
--- --
+--
-- _lcd_write_data(<byte>) write data to lcd using
--- _lcd_write(<byte>) lcd_rs
high
--- --
+-- __lcd_write(<byte>) lcd_rs
high
+--
-- _lcd_write_data(<byte>) write command to lcd using
--- _lcd_write(<byte>) lcd_rs
low
--- --
+-- __lcd_write(<byte>) lcd_rs
low
+--
-- lcd_init() initialize the LCD
controller
--- --
+--
--
-- Dependencies: delay.jal
--
@@ -92,8 +92,8 @@
-- sends byte from value to register of the lcd
-- (this procedure is only used inside this file)
--
----------------------------------------------------------------------------
-procedure _lcd_write(byte in value) is
- pragma inline
+procedure __lcd_write(byte in value) is
+-- pragma inline
lcd_csb = low -- select lcd (wake him
up)
for 8 loop -- loop for sending
serial
information
var bit bit7 at value : 7
@@ -111,24 +111,24 @@
--
----------------------------------------------------------------------------
-- sends data byte in value to LCD
--- for slow commands an extra delay should be added --
+--
--
----------------------------------------------------------------------------
procedure _lcd_write_data(byte in value) is
- lcd_rs = high --
select instruction
- _lcd_write( value ) -- output byte
+-- pragma inline
+ lcd_rs = high --
select data
+ __lcd_write( value ) -- output byte
end procedure
---------------------------------------------------------------------------
--
----------------------------------------------------------------------------
-- sends command byte in value to LCD
--- for slow commands an extra delay should be added
---
+--
--
----------------------------------------------------------------------------
procedure _lcd_write_command(byte in value) is ;
- pragma inline
+-- pragma inline
lcd_rs = low -- select instruction
- _lcd_write( value ) -- output byte
+ __lcd_write( value ) -- output byte
if value < 4 then -- "clear display' and
'return home'
delay_10us( lcd_long_delay ) -- require extra delay
@@ -144,11 +144,11 @@
--
----------------------------------------------------------------------------
--- Initialize display in 1 ans 2 or 3 line, display on, no cursor shown an
cursor
+-- Initialize display in 1 and 2 or 3 line, display on, no cursor shown an
cursor
-- moves to the right.
--
----------------------------------------------------------------------------
procedure lcd_init() is
- pragma inline
+-- pragma inline
delay_1ms( 45 ) -- powerup delay for 45mS
_lcd_write_command( 0b_0011_0000 ) -- function 8bit
N=1,5x7dots
_lcd_write_command( 0b_0011_0001 ) -- function 8bit
N=1,5x7dots IS1=1
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---