Author: jsuijs
Date: Sun Oct 26 06:19:04 2008
New Revision: 477

Added:
    trunk/unvalidated/sample/test/board/board_16f88_js.jal
    trunk/unvalidated/sample/test/external/lcd/test_hello_world_lcd.jal
Modified:
    trunk/unvalidated/sample/test/board/board_16f648a_js.jal
    trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal
    trunk/unvalidated/sample/test/external/lcd/test_lcd_hd44780_4.jal
    trunk/unvalidated/sample/test/jal/test_serial_format.jal

Log:
New test, boardfile. all test and board files are jsg compliant now

Modified: trunk/unvalidated/sample/test/board/board_16f648a_js.jal
==============================================================================
--- trunk/unvalidated/sample/test/board/board_16f648a_js.jal    (original)
+++ trunk/unvalidated/sample/test/board/board_16f648a_js.jal    Sun Oct 26  
06:19:04 2008
@@ -1,12 +1,17 @@
---  
--------------------------------------------------------------------------
--- BOARD FILE
---  
--------------------------------------------------------------------------
--- This file defines the configuration of a specific
--- test-board for JALLIB testing.
+-- ------------------------------------------------------
+-- Title: BOARD FILE for [see filename]
+-- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
+-- Adapted-by:
+-- Compiler: >=2.4g
  --
+-- This file is part of jallib  (http://jallib.googlecode.com)
+-- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
+--
+-- Description: This file defines the configuration of a specific  
test-board.
+-- --
  -- BOARD DESCRIPTION
  -- -----------------
---
+-- --
  -- * Darf board connector D0 t/m D7 pin-out of the test board:
  --       D0 A0
  --       D1 A1
@@ -16,18 +21,20 @@
  --       D5 B4
  --       D6 B3
  --       D7 B1
---
+-- --
  -- * 20 MHz resonator
---
+-- --
  -- Dwarf LCD connection (with 2 additional LEDS)
  -- D0 t/m D3   = dataport high nibble
  -- D4          = E
  -- D5          = RS
  -- D6, D7      = led
  --
+-- Sources:
+--
+-- Notes:
  --
--- At the end, include a specific test.
---  
--------------------------------------------------------------------------
+-- ------------------------------------------------------

  -- chip setup
  include 16f648a

Modified: trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal
==============================================================================
--- trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal (original)
+++ trunk/unvalidated/sample/test/board/board_16f877a_dwarf.jal Sun Oct 26  
06:19:04 2008
@@ -1,19 +1,29 @@
---  
--------------------------------------------------------------------------
--- BOARD FILE
---  
--------------------------------------------------------------------------
--- This file defines the configuration of a specific
--- test-board for JALLIB testing.
+-- ------------------------------------------------------
+-- Title: BOARD FILE for [see filename]
+-- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
+-- Adapted-by:
+-- Compiler: >=2.4g
  --
+-- This file is part of jallib  (http://jallib.googlecode.com)
+-- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
+--
+-- Description: This file defines the configuration of a specific  
test-board.
+-- --
+-- BOARD DESCRIPTION
+-- -----------------
+-- --
  -- DB01 - Dwarf board for 40pin pic
  -- DBxx (8 leds) on port A
  -- DB017 (LCD) on port B
+--
+-- Sources:
+--
+-- Notes:
  --
---  
--------------------------------------------------------------------------
--- At the end, include a specific test.
---  
--------------------------------------------------------------------------
+-- ------------------------------------------------------

  -- chip setup
-include 16F877a
+include 16f877a

  pragma target clock 20_000_000                  -- xtal frequency
  pragma target OSC        hs
@@ -21,8 +31,8 @@
  pragma target   WDT disabled

  -- LED setup
-var bit LED           is pin_a0
-var bit LED_direction is pin_a0_direction
+var bit led           is pin_a0
+var bit led_direction is pin_a0_direction

  -- PWM setup
  var bit pwm_direction = pin_b0_direction

Added: trunk/unvalidated/sample/test/board/board_16f88_js.jal
==============================================================================
--- (empty file)
+++ trunk/unvalidated/sample/test/board/board_16f88_js.jal      Sun Oct 26  
06:19:04 2008
@@ -0,0 +1,75 @@
+-- ------------------------------------------------------
+-- Title: BOARD FILE for [see filename]
+-- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
+-- Adapted-by:
+-- Compiler: >=2.4g
+--
+-- This file is part of jallib  (http://jallib.googlecode.com)
+-- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
+--
+-- Description: This file defines the configuration of a specific  
test-board.
+-- --
+-- BOARD DESCRIPTION
+-- -----------------
+-- --
+-- * Darf board connector D0 t/m D7 pin-out of the test board:
+--       D0 A0
+--       D1 A1
+--       D2 A2
+--       D3 A3
+--       D4 B0
+--       D5 B4
+--       D6 B3
+--       D7 B1
+-- --
+-- * 20 MHz resonator
+-- --
+-- Dwarf LCD connection (with 2 additional LEDS)
+-- D0 t/m D3   = dataport high nibble
+-- D4          = E
+-- D5          = RS
+-- D6, D7      = led
+--
+-- Sources:
+--
+-- Notes:
+--
+-- ------------------------------------------------------
+
+-- chip setup
+include 16f88
+
+--
+-- This program assumes a 20 MHz resonator or crystal
+-- is connected to pins OSC1 and OSC2.
+pragma target OSC HS               -- HS crystal or resonator
+pragma target clock 20_000_000     -- oscillator frequency
+pragma target WDT  disabled
+pragma target LVP  disabled
+
+-- LED setup
+var bit led           is pin_b3   -- alias
+var bit led_direction is pin_b3_direction
+
+-- PWM setup
+;var bit pwm_direction = pin_b0_direction
+
+-- LCD setup
+var bit lcd_rs               is pin_b4 -- LCD command/data select.
+var bit lcd_rs_direction is pin_b4_direction
+var bit lcd_en           is pin_b0 -- LCD data trigger
+var bit lcd_en_direction is pin_b0_direction
+
+var byte lcd_dataport is porta_low -- LCD data  port
+var byte lcd_dataport_direction is porta_low_direction -- LCD data  port
+const byte LCD_ROWS     = 2                   -- 2 lines
+const byte LCD_CHARS    = 16                  -- 16 chars per line
+
+-- I2C setup
+var volatile bit i2c_scl            is pin_b4
+var volatile bit i2c_scl_direction  is pin_b4_direction
+var volatile bit i2c_sda            is pin_b3
+var volatile bit i2c_sda_direction  is pin_b3_direction
+
+-- ccp setup
+var volatile bit pin_ccp1_direction is pin_b3_direction

Added: trunk/unvalidated/sample/test/external/lcd/test_hello_world_lcd.jal
==============================================================================
--- (empty file)
+++ trunk/unvalidated/sample/test/external/lcd/test_hello_world_lcd.jal Sun  
Oct 26 06:19:04 2008
@@ -0,0 +1,80 @@
+-- Title: Hello world with an LCD
+-- Author: Eur Van Andel, Copyright (c) 2008, all rights reserved.
+-- Adapted-by: Rob Hamerling, Joep Suijs
+-- Compiler: >=2.4g
+--
+-- This file is part of jallib (http://jallib.googlecode.com)
+-- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
+--
+-- Description: this sample shows how to setup an LCD and writes
+-- "Hello World" to the first line, using a string and the print library.
+-- Line 3 and line 4 are used as well, but will work properly only on a  
4x20 LCD.
+-- A counter is printed to show the running forever loop.
+--
+
+;include 16f88
+
+;pragma target   CLOCK 20_000_000        -- xtal frequency
+;pragma target   OSC   HS
+;pragma target   LVP disabled
+;pragma target   WDT disabled
+
+enable_digital_io()
+
+;var  bit  LED        is pin_A4           -- LED to see proper PIC startup
+led_direction = output
+
+;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
+
+;portA_direction         = all_output    -- LCD data and LED on portA
+;portB_direction         = all_output    -- LCD handshake lines on portB
+
+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
+;include delay_any_mc                    -- delay library
+
+for 4 loop                              -- blink LED 4 times
+   LED = on
+   delay_100ms(2)
+   LED = off
+   delay_100ms(2)
+end loop
+
+const byte str1[] = "Hello world!"      -- define strings
+const byte str2[] = "third line"
+const byte str3[] = "fourth line"
+
+lcd_init()                              -- initialize LCD
+
+print_string(lcd, str1)                 -- show hello world!
+lcd_setcursor(2,0)                      -- to 3rd line
+print_string(lcd, str2)
+lcd_setcursor(3,0)                      -- to 4th line
+print_string(lcd, str3)
+
+var byte counter = 0
+
+forever loop                            -- loop forever
+
+   counter = counter + 1                -- update counter
+   lcd_setcursor(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_setcursor(1,1)                -- 2nd line, 2nd char
+      lcd = " "                         -- clear 2nd char
+      lcd = " "                         -- clear 3rd char
+   end if
+
+end loop
+
+

Modified: trunk/unvalidated/sample/test/external/lcd/test_lcd_hd44780_4.jal
==============================================================================
--- trunk/unvalidated/sample/test/external/lcd/test_lcd_hd44780_4.jal    
(original)
+++ trunk/unvalidated/sample/test/external/lcd/test_lcd_hd44780_4.jal   Sun  
Oct 26 06:19:04 2008
@@ -1,22 +1,33 @@
---  
--------------------------------------------------------------------------
--- LCD_hd44780_4 TEST file
---  
--------------------------------------------------------------------------
+-- ------------------------------------------------------
+-- Title: Test program for i2c_software.jal
+--
+-- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
+--
+-- Adapted-by:
+--
+-- Compiler: >=2.4g
+--
+-- This file is part of jallib  (http://jallib.googlecode.com)
+-- Released under the BSD license  
(http://www.opensource.org/licenses/bsd-license.php)
+--
+-- Description: Level 0 i2c test program
+--    interact with an i2c eeprom using the i2c primitives
+-- --
  -- This file defines a test for JALLIB testing, using a test-board
  --  defined by a BOARD file .
  --
--- setup: an hd44780 compatible display, used in 4-bit mode.
+-- Sources:
  --
---  
--------------------------------------------------------------------------
+-- Notes:
+-- setup: an hd44780 compatible display, used in 4-bit mode.
  --
  --  
--------------------------------------------------------------------------
-
-
  include delay

  enable_digital_io()

-lcd_RS_direction = output
-lcd_EN_direction = output
+lcd_rs_direction = output
+lcd_en_direction = output
  ;lcd_d4_direction = output
  ;lcd_d5_direction = output
  ;lcd_d6_direction = output

Modified: trunk/unvalidated/sample/test/jal/test_serial_format.jal
==============================================================================
--- trunk/unvalidated/sample/test/jal/test_serial_format.jal    (original)
+++ trunk/unvalidated/sample/test/jal/test_serial_format.jal    Sun Oct 26  
06:19:04 2008
@@ -1,10 +1,7 @@
  -- ------------------------------------------------------
  -- Title: Test program for format.jal
---
  -- Author: Joep Suijs, Copyright (c) 2008..2008, all rights reserved.
---
  -- Adapted-by:
---
  -- Compiler: >=2.4g
  --
  -- This file is part of jallib  (http://jallib.googlecode.com)

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