Author: eur.van.andel
Date: Mon Oct 27 13:46:53 2008
New Revision: 492

Modified:
    trunk/unvalidated/sample/by_device/16f877a/hello_world_lcd.jal

Log:
hello_world_lcd fixed


Modified: trunk/unvalidated/sample/by_device/16f877a/hello_world_lcd.jal
==============================================================================
--- trunk/unvalidated/sample/by_device/16f877a/hello_world_lcd.jal       
(original)
+++ trunk/unvalidated/sample/by_device/16f877a/hello_world_lcd.jal      Mon Oct 
 
27 13:46:53 2008
@@ -21,50 +21,20 @@

  enable_digital_io()

+const byte  LCD_ROWS = 4
+const byte  LCD_CHARS = 20
+var   bit   LCD_RS           is pin_b5       -- LCD command/data select.
+var   bit   LCD_EN           is pin_b4       -- LCD data trigger
+var   byte  LCD_dataport     is portb_low    -- LCD data nibble
+portb_direction              = all_output    -- LCD data is portb_low
+include lcd_hd44780_4                        -- LCD library with 4 data  
lines
+lcd_init()

-var bit  LED        is pin_a0       -- LED to see proper PIC startup
-pin_a0_direction    = output
-
-var  bit  LCD_RS        is pin_b5       -- LCD command/data select.
-var  bit  LCD_EN        is pin_b4       -- LCD data trigger
-var byte  lcd_data_port is portb_low    -- LCD data
-
-portb_direction     = all_output    -- LCD data is portb_low
-
-
-include lcd_hd44780_4               -- LCD library with 4 data lines
-include print                       -- output library
-
-for 4 loop
-    LED = on
-    delay_100ms(3)
-    LED = off
-    delay_100ms(3)
-end loop
+include print

  const byte str1[] = "Hello world"   -- define a string
-print_string(hd44780, str1)             -- output string to LCD
-
-const byte str2[] = "line 2"        -- define a string
-const byte str3[] = "line 3"        -- define a string
-
-
-hd44780_line2()
-print_string(hd44780, str2)
-hd44780_line3()
-print_string(hd44780, str3)
-
-
-var byte counter = 0
-
-forever loop                        -- loop forever
-
-    hd44780_line1()                            -- second line
-    print_byte_hex(hd44780, counter)    -- output in hex format
-    counter = counter + 1                      -- if LCD not cleared, those 
lines will stay  
the same
-    delay_100ms(2)
+print_string(lcd, str1)             -- output string to LCD

-end loop




--~--~---------~--~----~------------~-------~--~----~
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