Author: robhamerling
Date: Wed Apr 1 12:51:08 2009
New Revision: 905
Modified:
trunk/include/external/lcd/lcd_hd44780_4.jal
trunk/include/external/lcd/lcd_hd44780_8.jal
Log:
Write data delay (of >400 ns) now processor speed independent
with _usec_delay(1) in stead of 1 NOP
Modified: trunk/include/external/lcd/lcd_hd44780_4.jal
==============================================================================
--- trunk/include/external/lcd/lcd_hd44780_4.jal (original)
+++ trunk/include/external/lcd/lcd_hd44780_4.jal Wed Apr 1 12:51:08 2009
@@ -31,10 +31,10 @@
-- and variables (aliases):
-- var byte lcd_dataport is portA_low -- 4 data pins
-- or
--- var bit lcd_d4 is is pin_A3 -- databit d4 pin
--- var bit lcd_d5 is is pin_A1 -- databit d5 pin
--- var bit lcd_d6 is is pin_C0 -- databit d6 pin
--- var bit lcd_d7 is is pin_C2 -- databit d7 pin
+-- var bit lcd_d4 is pin_A3 -- databit d4 pin
+-- var bit lcd_d5 is pin_A1 -- databit d5 pin
+-- var bit lcd_d6 is pin_C0 -- databit d6 pin
+-- var bit lcd_d7 is pin_C2 -- databit d7 pin
-- --
-- 2. Set the chosen LCD dataport and handshake pins to output:
-- pin_A4_direction = output
@@ -89,7 +89,7 @@
-- generate clockpuls
lcd_en = HIGH -- trigger on
- asm nop -- delay (> 400 ns)
+ _usec_delay(1) -- delay (> 400 ns)
lcd_en = LOW -- trigger off
end procedure
@@ -156,4 +156,5 @@
-- init the API
_hd44780_init()
+
end procedure
Modified: trunk/include/external/lcd/lcd_hd44780_8.jal
==============================================================================
--- trunk/include/external/lcd/lcd_hd44780_8.jal (original)
+++ trunk/include/external/lcd/lcd_hd44780_8.jal Wed Apr 1 12:51:08 2009
@@ -34,14 +34,14 @@
-- var byte lcd_dataport_low is portD_high -- 4 low order
data pins
-- var byte lcd_dataport_high is portC_high -- 4 high order
data pins
-- or
--- var bit lcd_d0 is is pin_D0 -- databit d0 pin
--- var bit lcd_d1 is is pin_D1 -- databit d1 pin
--- var bit lcd_d2 is is pin_C6 -- databit d2 pin
--- var bit lcd_d3 is is pin_C7 -- databit d3 pin
--- var bit lcd_d4 is is pin_B0 -- databit d4 pin
--- var bit lcd_d5 is is pin_B1 -- databit d5 pin
--- var bit lcd_d6 is is pin_C0 -- databit d6 pin
--- var bit lcd_d7 is is pin_C2 -- databit d7 pin
+-- var bit lcd_d0 is pin_D0 -- databit d0 pin
+-- var bit lcd_d1 is pin_D1 -- databit d1 pin
+-- var bit lcd_d2 is pin_C6 -- databit d2 pin
+-- var bit lcd_d3 is pin_C7 -- databit d3 pin
+-- var bit lcd_d4 is pin_B0 -- databit d4 pin
+-- var bit lcd_d5 is pin_B1 -- databit d5 pin
+-- var bit lcd_d6 is pin_C0 -- databit d6 pin
+-- var bit lcd_d7 is pin_C2 -- databit d7 pin
-- --
-- 2. Set the chosen LCD handshake pins to output:
-- pin_D2_direction = output
@@ -109,7 +109,7 @@
end if
lcd_en = HIGH -- trigger on
- asm nop -- delay (> 400 ns)
+ _usec_delay(1) -- delay (> 400 ns)
lcd_en = LOW -- trigger off
delay_10us(4) -- > 37 us
end procedure
@@ -163,4 +163,5 @@
-- init the API
_hd44780_init()
+
end procedure
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---