Revision: 1701
Author: jsuijs
Date: Wed Feb 24 14:28:54 2010
Log: minor modifications to samples.
http://code.google.com/p/jallib/source/detail?r=1701

Modified:
 /trunk/sample/16f648a_serial_hardware.jal
 /trunk/sample/16f648a_startersguide_lcd.jal
 /trunk/sample/16f723_serial_hardware.jal
 /trunk/sample/16f73_serial_hardware.jal
 /trunk/sample/16f877_serial_hardware.jal
 /trunk/sample/16f877_startersguide_lcd.jal
 /trunk/sample/16f877a_serial_hardware.jal
 /trunk/sample/16f877a_startersguide_lcd.jal
 /trunk/sample/16f88_serial_hardware.jal
 /trunk/sample/16f88_startersguide_lcd.jal
 /trunk/sample/18f14k50_serial_hardware.jal
 /trunk/sample/18f2450_serial_hardware.jal
 /trunk/sample/18f2450_startersguide_lcd.jal
 /trunk/sample/18f4550_serial_hardware.jal
 /trunk/sample/18f4550_startersguide_lcd.jal
 /trunk/test/external/lcd/test_startersguide_lcd.jal
 /trunk/test/peripheral/usart/test_serial_hardware.jal

=======================================
--- /trunk/sample/16f648a_serial_hardware.jal   Sun Aug 16 16:42:16 2009
+++ /trunk/sample/16f648a_serial_hardware.jal   Wed Feb 24 14:28:54 2010
@@ -39,12 +39,6 @@
 pragma target WDT  disabled
 pragma target LVP  disabled

-;@jallib section led
--- LED IO definition
-alias led             is pin_b3
-alias led_direction   is pin_b3_direction
-alias led2            is pin_b1
-alias led2_direction  is pin_b1_direction

 include delay

@@ -58,16 +52,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -86,6 +70,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/16f648a_startersguide_lcd.jal Wed Feb 24 08:07:00 2010
+++ /trunk/sample/16f648a_startersguide_lcd.jal Wed Feb 24 14:28:54 2010
@@ -10,18 +10,18 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------
 --
 -- This file has been generated from:
@@ -59,46 +59,46 @@
 alias led2            is pin_b1
 alias led2_direction  is pin_b1_direction

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+ lcd_write_char(" ") -- 3rd char, equivalent to the previous line
    end if

 end loop
-
=======================================
--- /trunk/sample/16f723_serial_hardware.jal    Mon Nov  9 16:32:06 2009
+++ /trunk/sample/16f723_serial_hardware.jal    Wed Feb 24 14:28:54 2010
@@ -48,13 +48,6 @@
 pragma target PLLEN F16MHZ
 pragma target DEBUG DISABLED
 pragma target VCAPEN pin_A0
-;@jallib section led
--- LED IO definition
-alias led             is pin_a7
-alias led_direction   is pin_a7_direction
-alias led2            is pin_a6
-alias led2_direction  is pin_a6_direction
-

 include delay

@@ -69,16 +62,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -97,6 +80,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/16f73_serial_hardware.jal     Sat Feb 20 10:03:18 2010
+++ /trunk/sample/16f73_serial_hardware.jal     Wed Feb 24 14:28:54 2010
@@ -37,12 +37,6 @@
 pragma target OSC HS               -- HS crystal or resonator
 pragma target clock 20_000_000     -- oscillator frequency
 pragma target WDT  disabled
-;@jallib section led
--- LED IO definition
-alias led             is pin_c0
-alias led_direction   is pin_c0_direction
-alias led2            is pin_c1
-alias led2_direction  is pin_c1_direction

 include delay

@@ -56,16 +50,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -84,6 +68,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/16f877_serial_hardware.jal    Sun Feb 21 01:27:07 2010
+++ /trunk/sample/16f877_serial_hardware.jal    Wed Feb 24 14:28:54 2010
@@ -35,12 +35,6 @@
 pragma target OSC        hs
 pragma target   LVP disabled
 pragma target   WDT disabled
-;@jallib section led
--- LED IO definition
-alias led             is pin_b6
-alias led_direction   is pin_b6_direction
-alias led2            is pin_a1
-alias led2_direction  is pin_a1_direction

 include delay

@@ -54,16 +48,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -82,6 +66,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/16f877_startersguide_lcd.jal  Wed Feb 24 08:07:00 2010
+++ /trunk/sample/16f877_startersguide_lcd.jal  Wed Feb 24 14:28:54 2010
@@ -10,18 +10,18 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------
 --
 -- This file has been generated from:
@@ -68,46 +68,46 @@
 alias led2            is pin_a1
 alias led2_direction  is pin_a1_direction

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+ lcd_write_char(" ") -- 3rd char, equivalent to the previous line
    end if

 end loop
-
=======================================
--- /trunk/sample/16f877a_serial_hardware.jal   Sat Feb 13 07:53:07 2010
+++ /trunk/sample/16f877a_serial_hardware.jal   Wed Feb 24 14:28:54 2010
@@ -35,10 +35,6 @@
 pragma target OSC        hs
 pragma target   LVP disabled
 pragma target   WDT disabled
-;@jallib section led
--- LED IO definition
-alias led             is pin_c2
-alias led_direction   is pin_c2_direction

 include delay

@@ -52,16 +48,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -80,6 +66,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/16f877a_startersguide_lcd.jal Wed Feb 24 08:07:00 2010
+++ /trunk/sample/16f877a_startersguide_lcd.jal Wed Feb 24 14:28:54 2010
@@ -10,18 +10,18 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------
 --
 -- This file has been generated from:
@@ -55,46 +55,46 @@
 alias led             is pin_c2
 alias led_direction   is pin_c2_direction

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+ lcd_write_char(" ") -- 3rd char, equivalent to the previous line
    end if

 end loop
-
=======================================
--- /trunk/sample/16f88_serial_hardware.jal     Mon Nov  9 16:32:06 2009
+++ /trunk/sample/16f88_serial_hardware.jal     Wed Feb 24 14:28:54 2010
@@ -49,12 +49,6 @@
 ;pragma target CCP1MUX   pin_B3            -- ccp1 pin on B3
 ;OSCCON_IRCF = 7                           -- set prescaler to 1 (8 MHz)

-;@jallib section led
--- LED IO definition
-alias led             is pin_b3
-alias led_direction   is pin_b3_direction
-alias led2            is pin_b1
-alias led2_direction  is pin_b1_direction

 include delay

@@ -68,16 +62,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -96,6 +80,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/16f88_startersguide_lcd.jal   Wed Feb 24 08:07:00 2010
+++ /trunk/sample/16f88_startersguide_lcd.jal   Wed Feb 24 14:28:54 2010
@@ -10,18 +10,18 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------
 --
 -- This file has been generated from:
@@ -69,46 +69,46 @@
 alias led2            is pin_b1
 alias led2_direction  is pin_b1_direction

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+ lcd_write_char(" ") -- 3rd char, equivalent to the previous line
    end if

 end loop
-
=======================================
--- /trunk/sample/18f14k50_serial_hardware.jal  Fri Jan 29 14:24:50 2010
+++ /trunk/sample/18f14k50_serial_hardware.jal  Wed Feb 24 14:28:54 2010
@@ -73,12 +73,6 @@
 pragma target EBTRB         DISABLED        -- boot block not protected
pragma target HFOFST ENABLED -- THE_SYSTEM_CLOCK_IS_HELD_OFF_UNTIL_THE_HFINTOSC_IS_STABLE

-;@jallib section led
--- LED IO definition
-alias led             is pin_c4
-alias led_direction   is pin_c4_direction
-alias led2            is pin_c6
-alias led2_direction  is pin_c6_direction

 include delay

@@ -93,16 +87,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -121,6 +105,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/18f2450_serial_hardware.jal   Fri Jan 29 14:24:50 2010
+++ /trunk/sample/18f2450_serial_hardware.jal   Wed Feb 24 14:28:54 2010
@@ -68,12 +68,6 @@
 pragma target EBTR1         DISABLED    -- table read block 1 not protected
 pragma target EBTRB         DISABLED    -- boot block not protected

-;@jallib section led
--- LED IO definition
-alias led             is pin_b3
-alias led_direction   is pin_b3_direction
-alias led2            is pin_b1
-alias led2_direction  is pin_b1_direction

 include delay

@@ -89,16 +83,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -117,6 +101,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/18f2450_startersguide_lcd.jal Wed Feb 24 08:07:00 2010
+++ /trunk/sample/18f2450_startersguide_lcd.jal Wed Feb 24 14:28:54 2010
@@ -10,18 +10,18 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------
 --
 -- This file has been generated from:
@@ -88,46 +88,46 @@
 alias led2            is pin_b1
 alias led2_direction  is pin_b1_direction

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+ lcd_write_char(" ") -- 3rd char, equivalent to the previous line
    end if

 end loop
-
=======================================
--- /trunk/sample/18f4550_serial_hardware.jal   Fri Jan 29 14:24:50 2010
+++ /trunk/sample/18f4550_serial_hardware.jal   Wed Feb 24 14:28:54 2010
@@ -77,12 +77,6 @@
 pragma target EBTR3         DISABLED    -- table read block 3 not protected
 pragma target EBTRB         DISABLED    -- boot block not protected

-;@jallib section led
--- LED IO definition
-alias led is pin_b3
-alias led_direction is pin_b3_direction
-alias led2 is pin_b1
-alias led2_direction is pin_b1_direction

 include delay

@@ -97,16 +91,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -125,6 +109,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 end loop
=======================================
--- /trunk/sample/18f4550_startersguide_lcd.jal Wed Feb 24 08:07:00 2010
+++ /trunk/sample/18f4550_startersguide_lcd.jal Wed Feb 24 14:28:54 2010
@@ -10,18 +10,18 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------
 --
 -- This file has been generated from:
@@ -143,46 +143,46 @@
 alias led2 is pin_b1
 alias led2_direction is pin_b1_direction

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+ lcd_write_char(" ") -- 3rd char, equivalent to the previous line
    end if

 end loop
-
=======================================
--- /trunk/test/external/lcd/test_startersguide_lcd.jal Wed Feb 24 08:07:00 2010 +++ /trunk/test/external/lcd/test_startersguide_lcd.jal Wed Feb 24 14:28:54 2010
@@ -10,65 +10,65 @@
 -- Description:
 -- This sample shows how to setup an LCD and writes
 -- "Hello World" to the first line, using a string and the print library.
--- A counter is printed to show the running forever loop.
+-- A counter is printed to show the running forever loop.
 -- --
 -- This file defines a test for JALLIB testing, using a test-board
 --  defined by a BOARD file .
 --
 -- Sources:
 --
--- Notes:
--- This testfile is based on the program for lcd_hd44780_4.jal
+-- Notes:
+-- This testfile is based on the program for lcd_hd44780_4.jal
 -- The main difference is that it is adapted for a 2x16 display.
 -- setup: an hd44780 compatible display, used in 4-bit mode.
---
+--
-- --------------------------------------------------------------------------

 ;@jallib use chipdef
 ;@jallib use lcd_hd44780_4
 ;@jallib use led

+include delay
+
 enable_digital_io()

 led_direction = output

-
-lcd_rs_direction        = output
-lcd_en_direction        = output
-lcd_dataport_direction  = output
-
-include lcd_hd44780_4                   -- LCD library with 4 data lines
-include print                           -- formatted output library
-
-for 4 loop -- blink LED 4 times to indicate startup +for 4 loop -- blink LED 4 times to indicate startup
    LED = on
    delay_100ms(2)
    LED = off
    delay_100ms(2)
 end loop

-const byte str1[] = "Hello world!"      -- define strings
-
-lcd_init()                              -- initialize LCD
-
-lcd_cursor_position(0,0)                -- to 1st line, 1st char
-print_string(lcd, str1)                 -- show hello world!
+lcd_rs_direction        = output
+lcd_en_direction        = output
+lcd_dataport_direction  = output
+
+include lcd_hd44780_4                -- LCD library with 4 data lines
+lcd_init()                           -- initialize LCD
+
+include print                        -- formatted output library
+
+const byte str1[] = "Hello world!"   -- define strings
+
+lcd_cursor_position(0,0)             -- to 1st line, 1st char
+print_string(lcd, str1)              -- show hello world!

 var byte counter = 0

-forever loop                            -- loop forever
-
-   counter = counter + 1                -- update counter
-   lcd_cursor_position(1,0)             -- second line
-   print_byte_hex(lcd, counter)         -- output in hex format
-   delay_100ms(3)                       -- wait a little
-
-   if counter == 255 then               -- counter wrap
-      lcd_cursor_position(1,1)          -- 2nd line, 2nd char
-      lcd = " "                         -- clear 2nd char
-      lcd = " "                         -- clear 3rd char
+forever loop                         -- loop forever
+
+   counter = counter + 1             -- update counter
+   lcd_cursor_position(1,0)          -- second line
+   print_byte_hex(lcd, counter)      -- output in hex format
+   delay_100ms(3)                    -- wait a little
+
+   if counter == 255 then            -- counter wrap
+      lcd_cursor_position(1,1)       -- 2nd line, 2nd char
+      lcd = " "                      -- clear 2nd char
+      lcd_write_char(" ")            -- 3rd char, equivalent to
+                                     -- the previous line
    end if

 end loop
-
-
=======================================
--- /trunk/test/peripheral/usart/test_serial_hardware.jal Sun Mar 15 10:24:52 2009 +++ /trunk/test/peripheral/usart/test_serial_hardware.jal Wed Feb 24 14:28:54 2010
@@ -23,7 +23,6 @@
 -- ------------------------------------------------------

 ;@jallib use chipdef
-;@jallib use led

 include delay

@@ -37,16 +36,6 @@

 include print                       -- output library

-led_direction = output
-for 4 loop
-   LED = on
-   delay_100ms(3)
-   LED = off
-   delay_100ms(3)
-end loop
-
-
-
 const byte str1[] = "Hello serial world"   -- define a string
 print_string(serial_hw_data, str1)  -- output string to serial

@@ -65,6 +54,5 @@
        if (counter == 0) then
           counter = 50000
       serial_hw_data = "."
-      LED = ! LED
    end if
 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