Author: robhamerling
Date: Tue Oct 28 06:34:46 2008
New Revision: 493
Modified:
trunk/unvalidated/sample/by_device/16f690/hello_world_lcd.jal
trunk/unvalidated/sample/by_device/16f819/hello_world_lcd.jal
trunk/unvalidated/sample/by_device/16f88/hello_world_lcd.jal
Log:
Restored display of running counter in hex (was temporary decimal).
Note: a 16F819 with 32KHz xtal runs now at normal speed!
Modified: trunk/unvalidated/sample/by_device/16f690/hello_world_lcd.jal
==============================================================================
--- trunk/unvalidated/sample/by_device/16f690/hello_world_lcd.jal
(original)
+++ trunk/unvalidated/sample/by_device/16f690/hello_world_lcd.jal Tue Oct
28 06:34:46 2008
@@ -20,11 +20,11 @@
enable_digital_io()
-var bit LED is pin_A0 -- LED to see proper PIC startup
-pin_A0_direction = output
+var bit LED is pin_A0 -- LED to see proper PIC startup
+pin_A0_direction = output
-const LCD_ROWS = 4 -- 4x20 LCD
-const LCD_CHARS = 20
+const LCD_ROWS = 4 -- 4x20 LCD
+const LCD_CHARS = 20
var bit LCD_RS is pin_C4 -- LCD command/data select.
var bit LCD_EN is pin_C7 -- LCD data trigger
var byte lcd_dataport is portC_low -- LCD data
@@ -60,14 +60,8 @@
counter = counter + 1 -- update counter
lcd_setcursor(1,0) -- second line
- print_byte_dec(lcd, counter) -- output in hex format
+ print_byte_hex(lcd, counter) -- output in hex format
delay_100ms(3) -- wait a little
-
- if counter == 255 then -- counter wrap
- lcd_setcursor(1,1) -- 2nd line, 2nd char
- lcd = " " -- clear 2nd char
- lcd = " " -- clear 3rd char
- end if
end loop
Modified: trunk/unvalidated/sample/by_device/16f819/hello_world_lcd.jal
==============================================================================
--- trunk/unvalidated/sample/by_device/16f819/hello_world_lcd.jal
(original)
+++ trunk/unvalidated/sample/by_device/16f819/hello_world_lcd.jal Tue Oct
28 06:34:46 2008
@@ -56,14 +56,8 @@
counter = counter + 1 -- update counter
lcd_setcursor(1,0) -- second line
- print_byte_dec(lcd, counter) -- output in hex format
+ print_byte_hex(lcd, counter) -- output in hex format
delay_100ms(3) -- wait a little
-
- if counter == 255 then -- counter wrap
- lcd_setcursor(1,1) -- 2nd line, 2nd char
- lcd = " " -- clear 2nd char
- lcd = " " -- clear 3rd char
- end if
end loop
Modified: trunk/unvalidated/sample/by_device/16f88/hello_world_lcd.jal
==============================================================================
--- trunk/unvalidated/sample/by_device/16f88/hello_world_lcd.jal
(original)
+++ trunk/unvalidated/sample/by_device/16f88/hello_world_lcd.jal Tue Oct
28
06:34:46 2008
@@ -21,10 +21,10 @@
enable_digital_io()
-var bit LED is pin_A4 -- LED to see proper PIC startup
+var bit LED is pin_A4 -- LED to see proper PIC startup
-const LCD_ROWS = 4 -- 4x20 LCD
-const LCD_CHARS = 20
+const LCD_ROWS = 4 -- 4x20 LCD
+const LCD_CHARS = 20
var bit LCD_RS is pin_B6 -- LCD command/data select.
var bit LCD_EN is pin_B7 -- LCD data trigger
var byte lcd_dataport is portA_low -- LCD data
@@ -61,14 +61,8 @@
counter = counter + 1 -- update counter
lcd_setcursor(1,0) -- second line
- print_byte_dec(lcd, counter) -- output in hex format
+ print_byte_hex(lcd, counter) -- output in hex format
delay_100ms(3) -- wait a little
-
- if counter == 255 then -- counter wrap
- lcd_setcursor(1,1) -- 2nd line, 2nd char
- lcd = " " -- clear 2nd char
- lcd = " " -- clear 3rd char
- 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
-~----------~----~----~----~------~----~------~--~---